In many application popups, such as the XKCD Browser's "Hint" function (to show the alt-text), most of the dialog box's text is invisible [see attached photo].
Does anyone know why that is? Is there some kind of "white on white" problem? If so, can I modify such popups system-wide?
Running TouchNooter 2.1.31 over Nook 1.1.0 firmware on Nook Simple Touch (N2E)
I am also seeing this quite often. For example on the intent dialogue the "always open with this application" text is invisible (you only see the checkbox).
The XKCD and the "always open" dialog are two separate, but related issues.
It's the clash of frameworks, themes and styles.
For XKCD, I'd take it apart using apktool and fix it so that the text is black.
For "always open", the problem is that they got fancy inserting the option
and they didn't leave space for it in the dialog.
That needs to get fixed in framework-res.apk.
I have a similar white on white problem with submenus in Goldendict. It could be fixed in the res of the goldendict .apk, but after decompiling/recompling and signing, the resulting .apk will install, but gives errors during usage due to "corruption."
As an alternative approach, what specifically would I need to change in the framework-res.apk in order to fix the problem. Is there some style I could modify to adjust the text color in the framework-res.apk?
This is the responsible code from the goldendict apk that is producing the white-on-white problem.
Code:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent">
<TextView android:textAppearance="?android:textAppearanceLarge" android:id="@id/textView1" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginLeft="5.0px" android:text="@string/from" />
<GridView android:id="@id/fromGrid" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_margin="10.0px" android:listSelector="@android:color/transparent" android:columnWidth="50.0sp" android:numColumns="auto_fit" android:layout_weight="1.0" />
<TextView android:textAppearance="?android:textAppearanceLarge" android:id="@id/textView2" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginLeft="5.0px" android:text="@string/to" />
<GridView android:id="@id/toGrid" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_margin="10.0px" android:listSelector="@android:color/transparent" android:columnWidth="50.0sp" android:numColumns="auto_fit" android:layout_weight="1.0" />
<TextView android:textAppearance="?android:textAppearanceLarge" android:id="@id/switchToRecentPairs" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginLeft="5.0px" android:text="@string/switch_to_recent_pairs" />
</LinearLayout>
I just logged on here to report this same problem, but I wasn't sure if it was a white-on-white problem or a missing font problem. Would be really great if someone could fix this globally, although I suspect there's nothing you can do globally to fix a hard-coded colour (I may be wrong). App developers should never use a hard-coded colour, its a sloppy design practice.
can anybody help me to give instruction how to change text color and clock color on hyperion 9 lockscreen?
no respond
decompile framework-res.apk
look at keyguard_screen_lock.xml in layout
Code:
<TextView android:textSize="34.0sp" android:gravity="center" android:id="@id/time" android:layout_width="fill_parent" android:layout_height="wrap_content" />
<TextView android:textSize="18.0sp" android:gravity="center" android:id="@id/date" android:layout_width="fill_parent" android:layout_height="wrap_content" />
you can try adding color
Code:
android:textColor="#ffffffff"
to it (in this case the hex value is white)
so it looks like
Code:
<TextView android:textSize="34.0sp" android:gravity="center" android:textColor="#ffffffff" android:id="@id/time" android:layout_width="fill_parent" android:layout_height="wrap_content" />
<TextView android:textSize="18.0sp" android:gravity="center" android:textColor="#ffffffff" android:id="@id/date" android:layout_width="fill_parent" android:layout_height="wrap_content" />
see what happens
you will have to work out xmls yourself - do some searching - its the best and fastest way to solve something because you will be waiting days and days for an answer like this that google could tell you in a few secs
marcussmith2626 said:
decompile framework-res.apk
look at keyguard_screen_lock.xml in layout
Code:
<TextView android:textSize="34.0sp" android:gravity="center" android:id="@id/time" android:layout_width="fill_parent" android:layout_height="wrap_content" />
<TextView android:textSize="18.0sp" android:gravity="center" android:id="@id/date" android:layout_width="fill_parent" android:layout_height="wrap_content" />
you can try adding color
Code:
android:textColor="#ffffffff"
to it (in this case the hex value is white)
so it looks like
Code:
<TextView android:textSize="34.0sp" android:gravity="center" android:textColor="#ffffffff" android:id="@id/time" android:layout_width="fill_parent" android:layout_height="wrap_content" />
<TextView android:textSize="18.0sp" android:gravity="center" android:textColor="#ffffffff" android:id="@id/date" android:layout_width="fill_parent" android:layout_height="wrap_content" />
see what happens
you will have to work out xmls yourself - do some searching - its the best and fastest way to solve something because you will be waiting days and days for an answer like this that google could tell you in a few secs
Click to expand...
Click to collapse
thank you for your respond
i have tried it and nothing happen to my lockscreen, the color does not change
that's why i ask how to change the color to this forum, i have tried any ways to change the color and nothing happen to my lockscreen
darkterro said:
thank you for your respond
i have tried it and nothing happen to my lockscreen, the color does not change
that's why i ask how to change the color to this forum, i have tried any ways to change the color and nothing happen to my lockscreen
Click to expand...
Click to collapse
look in styles.xml and try and find the style for the date and time ids and see if it has a color
Hey folks, this could be a problem with the way I'm handling layouts, or not. Sort of new to Java and Android SDK.
My goal at this point is to have an app going which has the screen showing a navigation bar at the bottom with an icon, and a toolbar at the top with an "OFF" button and a "Save" button. Between the toolbar and the navigation bar should be a blank, white screen.
But I'm having trouble getting the toolbar to just stay at the top of the screen. The grey background takes up the entire screen in front of what was the white background. A picture of the screenshot is attached.
And here's what I have:
Code:
<RelativeLayout xmlns:android="schemasdotandroiddotcom/apk/res/android"
xmlns:tools="schemasdotandroiddotcom/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".ContactActivity">
<RelativeLayout
android:id="@+id/toolbar"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:background="@color/toolbar_background">
<ToggleButton
android:id="@+id/toggleButtonEdit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentleft="true"
android:layout_marginLeft="20dp"
android:text="@string/toggle_button" />
<Button
android:id="@+id/buttonSave"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="20dp"
android:text="Save" />
<RelativeLayout
android:id="@+id/navbar"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:background="@color/navbar_background"
android:gravity="center_horizontal">
<ImageButton
android:id="@+id/imageButtonList"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginRight="20dp"
android:contentDescription="Contact List Button"
android:src="@drawable/contactlisticon" />
<ImageButton
android:id="@+id/imageButtonMap"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRight0f="@id/imageButtonList"
android:contentDescription="Contact Map Button"
android:src="@drawable/mapicon" />
<ImageButton
android:id="@+id/imageButtonSettings"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:contentDescription="Settings Button"
android:layout_toRight0f="@id/imageButtonMap"
android:src="drawable/settingsicon" />
</RelativeLayout>
Thanks for your help! Sorry if I gave any code that wasn't necessary.
I hope that I posted this thread correctly...
It's my first android app and I am using android studio. I want to get a screenshot of a specifi area.
My xml is in this format:
<LinearLayout>
<RelativeLayout>
<RelativeLayout>
<TextView />
<TextView/>
</RelativeLayout>
</RelativeLayout>
</LinearLayout>
The two textviews are overlapping. The one holds an image (with transparency) and the other one, a background color and a text (this is why I have them on a single RelativeLayout and overlapping). I want to get a screenshot of this RelativeLayout. Any help please? Nothing of what I have used worked.
I'd like to make a few small changes in the framework-res.apk. I thought this might be "easy", but so far it's not.
I decompiled the apk file using apktool and located the two files I wanted to alter in res/layout. I made the changes, then saved the two edited files.
Next I opened the original framework-res.apk archive with WinRAR and then dragged the edited xml files into the proper location ("store", not "normal" or "compress") and then closed the archive.
Finally, I used CWM to copy the new framework-res.apk back to the NST and rebooted.
Boot loop.
Is it not possible to deal with slightly edited xml files in this way?
nmyshkin said:
I'd like to make a few small changes in the framework-res.apk. I thought this might be "easy", but so far it's not.
I decompiled the apk file using apktool and located the two files I wanted to alter in res/layout. I made the changes, then saved the two edited files.
Next I opened the original framework-res.apk archive with WinRAR and then dragged the edited xml files into the proper location ("store", not "normal" or "compress") and then closed the archive.
Finally, I used CWM to copy the new framework-res.apk back to the NST and rebooted.
Boot loop.
It is not possible to deal with slightly edited xml files in this way?
Click to expand...
Click to collapse
I found a working method: https://forum.xda-developers.com/t/...rk-res-apk-with-apktool.1545361/post-23589640
But...I want to move the quicknav bar to the top of the screen. The changes I made in the xml files do that, but the status bar covers the top part of the quicknav bar. Ideally I'd like the quicknav bar to cover the status bar (maybe not allowed?), or at least position right beneath it.
The relevant xml code which seems to control the screen position of the quicknav bar looks like this:
Code:
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout android:id="@id/quickNavMainView" android:background="@drawable/checker" android:layout_width="fill_parent" android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android">
<HorizontalScrollView android:layout_gravity="bottom|center" android:id="@id/quickNavHSView" android:layout_width="fill_parent" android:layout_height="wrap_content">
<LinearLayout android:layout_gravity="bottom|center" android:layout_width="wrap_content" android:layout_height="wrap_content">
<ImageView android:id="@id/home" android:clickable="true" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/c_quicknav_home_normal" />
<ImageView android:id="@id/library" android:clickable="true" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/c_quicknav_library_normal" />
<ImageView android:id="@id/shop" android:clickable="true" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/c_quicknav_shop_normal" />
<ImageView android:id="@id/search" android:clickable="true" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/c_quicknav_search_normal" />
<ImageView android:id="@id/settings" android:clickable="true" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/c_quicknav_settings_normal" />
</LinearLayout>
</HorizontalScrollView>
</FrameLayout>
I've changed "bottom" in lines 4 and 5 to "top". That gets the job done, but with the problem mentioned: the status bar covers the top portion of the quicknav bar.
Help?
Changing framework or services or whatever you don't need to go to recovery.
They are just part of Android and have no influence on the Linux.
Code:
# stop
<do stuff>
# start
How about a screen shot?
I don't even think that I've ever even seen the stock QuickNav.
I'm not sure if this frame is the full screen or what.
How about adding android:layout_marginTop="24dp"?
(That dimension was picked out of the air. YMMV)
Renate said:
How about a screen shot?
I don't even think that I've ever even seen the stock QuickNav.
I'm not sure if this frame is the full screen or what.
How about adding android:layout_marginTop="24dp"?
(That dimension was picked out of the air. YMMV)
Click to expand...
Click to collapse
Thanks for the response. I'll try the marginTop idea. I've been looking all over for something like that but just hadn't generated the proper search string I guess.
Getting screenshots was a lot harder than I anticipated. The quicknav bar seems to disable the side hardware buttons when it is displayed but I finally figured out a way to get reasonable shots. You can clearly see the issue with the status bar when the quicknav buttons are moved to the top.
nmyshkin said:
I finally figured out a way to get reasonable shots.
Click to expand...
Click to collapse
What's the matter? You don't like my AdbGrab.exe (in sig)?
Renate said:
I'm not sure if this frame is the full screen or what.
How about adding android:layout_marginTop="24dp"?
(That dimension was picked out of the air. YMMV)
Click to expand...
Click to collapse
You were close (and right, of course)!
The bar becomes a little scrunched for some reason (less white space above and below icons/text) but it just abuts the status bar with android:layout marginTop="18dp". I don't care much about the loss of the white space, so it's on with the rest of my project.
Thanks again for the help.
Hmm, something's screwy.
Maybe try this:
Code:
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout android:id="@id/quickNavMainView" android:background="@drawable/checker" android:layout_width="fill_parent" android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="18dp">
<ImageView android:id="@id/home" android:clickable="true" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/c_quicknav_home_normal" />
<ImageView android:id="@id/library" android:clickable="true" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/c_quicknav_library_normal" />
<ImageView android:id="@id/shop" android:clickable="true" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/c_quicknav_shop_normal" />
<ImageView android:id="@id/search" android:clickable="true" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/c_quicknav_search_normal" />
<ImageView android:id="@id/settings" android:clickable="true" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/c_quicknav_settings_normal" />
</LinearLayout>
</FrameLayout>
Renate said:
Hmm, something's screwy.
Maybe try this:
Code:
<?xml version="1.0" encoding="utf-8"?>
...etc.
Click to expand...
Click to collapse
It seems to make no discernible difference. I notice that the line:
Code:
<HorizontalScrollView android:layout_gravity="bottom|center" android:id="@id/quickNavHSView" android:layout_width="fill_parent" android:layout_height="wrap_content">
is missing from your version. That, too, seems to make no difference.
There is another xml file which seems to have something to do with the "appicons" (which are just png images stored in the apk, text included):
Code:
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout android:id="@id/appIcon" android:layout_width="wrap_content" android:layout_height="wrap_content"
xmlns:android="http://schemas.android.com/apk/res/android">
<ImageView android:layout_gravity="top|left|center" android:id="@id/badgeImage" android:layout_width="wrap_content" android:layout_height="wrap_content" />
</FrameLayout>
Not seeing anything there that jumps out at me. If the android:layout_marginTop="18dp" is changed to something like "100dp" the bar more or less collapses into a fat line, as well as moving further down the display window, so there is some interaction between the "simple" shifting of the vertical display of the bar and the vertical size of the bar itself.
Like I say, it's not a big deal for me. As long as content is not cut off, a slight flattening of quicknav bar is fine.
All the tiles are 120 x 112 so that the horizontal scroll is overblown. (5 x 120 = 600).
I was trying to get rid of that.
Use my only Linear Layout and change layout_height="112dp"
For testing purposes you can also add android:background="#cccccc".
That way if the LL expands but the buttons don't you can see the shading.
Renate said:
All the tiles are 120 x 112 so that the horizontal scroll is overblown. (5 x 120 = 600).
I was trying to get rid of that.
Use my only Linear Layout and change layout_height="112dp"
For testing purposes you can also add android:background="#cccccc".
That way if the LL expands but the buttons don't you can see the shading.
Click to expand...
Click to collapse
Does the android:background="#cccccc" go in the LinearLayout section or in the overall FrameLayout? Right now it's kinda moot because I can't seem to produce an apk file that does not cause a bootloop. I have a previous trial version with android:layout_ marginTop="20dp" which does NOT produce a bootloop. The file size is about 2874 Kb. Every new version I try to build with Apktool today is coming out around 3366 Kb and they all cause a bootloop. I have no idea what is going on with Apktool, but I'll keep plugging away, with breaks for mental health!
nmyshkin said:
Does the android:background="#cccccc" go in the LinearLayout section...
Click to expand...
Click to collapse
In the LL.
When you're floundering in layouts, it's helpful to set some color background for each containing element.
Obviously, on a B&W device you'll not see that, but a screen grab will show it.
(You can just stick to background colors that are differentiable in B&W,)
The FrameLayout is the whole screen which dims the normal screen.
The LinearLayout should be 600 x 120 automatically.
You can even do a reality check by saying (in LL) android:layout_height="500dp".
Renate said:
When you're floundering in layout...
Click to expand...
Click to collapse
I think "floundering" is the operative word here!
Try as I might, I have been unable to produce a framework-res.apk that did not cause a boot loop IF I left out the
Code:
<HorizontalScrollView android:layout_gravity="bottom|center" android:id="@id/quickNavHSView" android:layout_width="fill_parent" android:layout_height="wrap_content">
This is what I have right now:
Code:
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout android:id="@id/quickNavMainView" android:background="@drawable/checker" android:layout_width="fill_parent" android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android">
<HorizontalScrollView android:layout_gravity="top|center" android:id="@id/quickNavHSView" android:layout_width="fill_parent" android:layout_height="wrap_content">
<LinearLayout android:layout_gravity="top|center" android:layout_width="wrap_content" android:layout_height="112dp" android:layout_marginTop="18dp" android:background="#cccccc">
<ImageView android:id="@id/home" android:clickable="true" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/c_quicknav_home_normal" />
<ImageView android:id="@id/library" android:clickable="true" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/c_quicknav_library_normal" />
<ImageView android:id="@id/shop" android:clickable="true" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/c_quicknav_shop_normal" />
<ImageView android:id="@id/search" android:clickable="true" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/c_quicknav_search_normal" />
<ImageView android:id="@id/settings" android:clickable="true" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/c_quicknav_settings_normal" />
</LinearLayout>
</HorizontalScrollView>
</FrameLayout>
I was surprised to find that changing android:layout_gravity="top|center" in the LinearLayout section did NOT move the bar to the top. It was only when I made the change in the HorizontalScrollView that the bar went to the top of the screen (or almost).
I don't see any shading and perhaps the boxes are now even a bit smaller than before (see screenshot below). Again, I could live with this so it's not a deal-breaker for my intended project. It is interesting (and maybe just a little hair-raising) how these things interact in ways that I would not expect.
When you have a "boot loop" (which is just really Android flailing while the Linux is fine) you should check the logcat, it will tell you where the problem is.
I don't know how I missed where that HorizontalScroll was being used.
Yeah, I do. I was accidentally looking for quickNavHsView and not quickNavHSView.
In services.jar, com/android/server/status/StatusBarService uses that.
It must be a HorizontalScroll. You need that.
The quick nav itself is com/android/server/status/BNGossamerQuickNavbar
The default for layouts is top anyway.
Make the LinearLayout big, android:layout_height="300dp".
You won't see any background of the LL until it's bigger than its contents.
Renate said:
Make the LinearLayout big, android:layout_height="300dp".
You won't see any background of the LL until it's bigger than its contents.
Click to expand...
Click to collapse
OK. I did that but I'm not sure exactly what it tells me except that the size of the layout is greater than the size of the actual navbar images? I see this sort of thing when I am designing a scene in Tasker and the background field is larger than the image itself. There I would know what to do. Here....
Also, how does this relate to the squished (cut off?) images in the navbar?
Edit: I take some of this back now that I have looked more closely at the screenshot. The navbar is not so squished, although still not full size. This would suggest that if I make android:layout_height even larger the navbar will return to normal size. And maybe it does not matter since the background is transparent if I don't specify a color?
So, Bob's your uncle.
For the LinearLayout
android:layout_height="152dp" android:layout_marginTop="40dp"
You don't need to add a background.
How are you getting those screenshots and why are they JPEGs?
You can use
Code:
# screenshot /sdcard/snap.png
I forget if AdbGrab works for that.
There is that whole screenshot/screencap/framebuffer thing.
(Also format 1 & formt 2)
Renate said:
So, Bob's your uncle.
For the LinearLayout
android:layout_height="152dp" android:layout_marginTop="40dp"
You don't need to add a background.
How are you getting those screenshots and why are they JPEGs?
You can use
Code:
# screenshot /sdcard/snap.png
I forget if AdbGrab works for that.
There is that whole screenshot/screencap/framebuffer thing.
(Also format 1 & formt 2)
Click to expand...
Click to collapse
Well, that's just nifty! Thanks for looking at this and helping out.
I'm getting the screenshots using my swiss army knife app QuickTiles which includes a screenshot option. This uses the Screenshot Easy app as a plugin. I selected jpeg as the format, could have been png. You may recall that the native screenshot capabilities of the NST leave something to be desired. Screenshots come out with a green cast (or is is blue?) because of some weird color coding which I can't remember now.
Anyway, I normally have Quick Tiles assigned to the "clock" region of the status bar, but I want the quicknav bar there, so I temporarily assigned Quick Tiles to the "n" button. As much as I love Quick Tiles and spent a lot of time figuring it all out, I will be the first to admit that it is sometimes maddeningly slow to open. Other times it is nearly immediate, just like any other app on the NST. The quicknav bar (which I don't use at all), opens instantaneously. Over time and use I've worked my tile selection down to 5 (6 for my NSTG), so I've been thinking about trying to adapt the quicknav bar to replace Quick Tiles. It doesn't have the gee-whiz stuff like the battery percentage, date, and so on, but the response time is what I'm after at this point in my life.