Page 1 of 1

Total Commander on Sony PRS-T1 - problem with dialog colors

Posted: 2012-06-21, 17:57 UTC
by rupor123
Hello

I am using TC on modified Sont PRS-T1 (FroYo). This is eInk device, so standard Android themes where modified to increase contrast. Most noticeable change is the absence of black background and (almost complete) inversion of usual text colors. Total Commander works absolutely beautifully until I hit "second level" of dialogs, for example during attempt to assign internal function to the button, at which point transparent dialog on top of original dialog on top of main window produces a screen with such low contrast that it is not possible to see text at all. Changing colors in the options does not help.

I have screenshots to explain the effect (images taken out of frame buffer directly and I did not convert them into eInk 16 level gray on purpose - in real life it is even worse). Sorry - cannot post links to images yet, so will try in a separate post.

Do you think it would be possible to make last list non-transparent using standard theme colors or use inverted text color or allow color tuning for this visual elements to improve situation with eInk devices?

Thank You!

Posted: 2012-06-21, 18:03 UTC
by rupor123
Here are screenshots:

Main window
Add dialog
And finally internal command

Posted: 2012-06-22, 12:50 UTC
by ghisler(Author)
Thanks for the screenshot. The problem doesn't seem to be the cascaded dialogs, but the default colors of a popup dialog box and the text color in the list. On a phone or tablet, the background color is the same, but the foreground is white, which gives a much better contrast.

Is there any way (programmatically) to detect that the device has an e-paper screen? Or a way to detect the used background and foreground colors? Unfortunately I couldn't find any functions so far...

Posted: 2012-06-22, 13:44 UTC
by rupor123
CoolReader (which is very popular e-book reader available on our device) does it like this:

import android.os.Build;

private static String getBuildField(String fieldName)
{
try
{
return (String)Build.class.getField(fieldName).get(null);
} catch (Exception e)
{
// Log an error
return "";
}
}

MANUFACTURER = getBuildField("MANUFACTURER");
MODEL = getBuildField("MODEL");
DEVICE = getBuildField("DEVICE");

EINK_NOOK = MANUFACTURER.toLowerCase().contentEquals("barnesandnoble") && MODEL.contentEquals("NOOK") && DEVICE.toLowerCase().contentEquals("zoom2");
EINK_SONY = MANUFACTURER.toLowerCase().contentEquals("sony") && MODEL.contentEquals("PRS-T1");

EINK_SCREEN = EINK_SONY || EINK_NOOK;

It is not perfect but it works :) Of course different devices may have different themes - I could take a look at Sony's theme if you specify what elements I should be looking for.

As for used background and foreground colors - it is very interesting question for which I currently have no answer :)

Posted: 2012-06-25, 12:49 UTC
by ghisler(Author)
Hmm, that's a bit lame, it wouldn't detect any future EInk devices. But it's better than nothing...

Posted: 2012-06-29, 02:02 UTC
by rupor123
Than may be something like this (googled - I currently have no access to my computer to actually check it): getResources().getColor(R.color.idname)?

For example:

TypedValue tv = new TypedValue();
getContext().getTheme().resolveAttribute(android.R.attr.textColorSecondary, tv, true);
Color holyColor = getResources().getColor(tv.resourceId);

Where bold is something you are interested in?

Posted: 2012-06-29, 10:05 UTC
by ghisler(Author)
Thanks, I will try that!

Re: Total Commander on Sony PRS-T1 - problem with dialog colors

Posted: 2019-11-22, 15:49 UTC
by jcelle
Hello,
I am jumping on this thread as it is the closest matching my problem right now.
I recently bought an Android eInk device (Likebook Mars), (so it means that this is black and white screen) and Total Commander just looks very bad on it : basically text is black and background is black.
Navigating in the options is difficult.

Is there a way I would not be aware of that could magically make TC display in proper background = white and text = black ?

Thanks in advance.
Jerome

Re: Total Commander on Sony PRS-T1 - problem with dialog colors

Posted: 2019-11-22, 15:59 UTC
by jcelle
OK got it: when you choose the theme (like LIGHT) you have to click on a button at the bottom of the screen named "OK/APPLY"...
This button is invisible by default on these eInk screens but it is there: I clicked at what I guessed could be the good location of the button and I could get the Light theme.
In fact you need a working copy of TC running on a color device besides to know what to do :)

Re: Total Commander on Sony PRS-T1 - problem with dialog colors

Posted: 2019-11-22, 16:09 UTC
by ghisler(Author)
I see - the new beta now has a menu item Dark->Light which allows you to switch from/to light background very easily.