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

Support for Android version of Total Commander

Moderators: white, Hacker, petermad, Stefan2

Post Reply
rupor123
Junior Member
Junior Member
Posts: 4
Joined: 2012-06-20, 14:26 UTC

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

Post 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!
rupor123
Junior Member
Junior Member
Posts: 4
Joined: 2012-06-20, 14:26 UTC

Post by *rupor123 »

Here are screenshots:

Main window
Add dialog
And finally internal command
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post 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...
Author of Total Commander
https://www.ghisler.com
rupor123
Junior Member
Junior Member
Posts: 4
Joined: 2012-06-20, 14:26 UTC

Post 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 :)
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

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
rupor123
Junior Member
Junior Member
Posts: 4
Joined: 2012-06-20, 14:26 UTC

Post 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?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Thanks, I will try that!
Author of Total Commander
https://www.ghisler.com
jcelle
Junior Member
Junior Member
Posts: 35
Joined: 2006-11-08, 14:42 UTC

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

Post 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
jcelle
Junior Member
Junior Member
Posts: 35
Joined: 2006-11-08, 14:42 UTC

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

Post 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 :)
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

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

Post 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.
Author of Total Commander
https://www.ghisler.com
Post Reply