Total Commander on Sony PRS-T1 - problem with dialog colors
Moderators: Hacker, petermad, Stefan2, white
Total Commander on Sony PRS-T1 - problem with dialog colors
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!
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!
- ghisler(Author)
- Site Admin
- Posts: 50541
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
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...
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...
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
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
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

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

- ghisler(Author)
- Site Admin
- Posts: 50541
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Hmm, that's a bit lame, it wouldn't detect any future EInk devices. But it's better than nothing...
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
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?
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?
- ghisler(Author)
- Site Admin
- Posts: 50541
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: Total Commander on Sony PRS-T1 - problem with dialog colors
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
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
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
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

- ghisler(Author)
- Site Admin
- Posts: 50541
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: Total Commander on Sony PRS-T1 - problem with dialog colors
I see - the new beta now has a menu item Dark->Light which allows you to switch from/to light background very easily.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com