Theme or coloring issue in android - android

I'm stuck in a unknown issue of coloring. I develop an food delivery application. I set the design of application, for example i take Food Menu screen. Actual output of screen :
I run the app on almost 6 mobiles include samsung, q-mobile, huawei. It works perfect.
But when i run the app on another random samsung mobile it show me the layout like this:
I don't know why this dark gray appear in boxes bakcground. This is happening in only one mobile of samsung. I'm confused because i also check on samsung on other mobile with same android version and it works fine.

The same thing was happening to me on my OnePlus phone. The solution I use was that I added background color for all component that was not using correct color on my OP phone. So in the case of CardView's that you have below, I added app:cardBackgroundColor property to CardView XML component view and it started to show just fine. I didn't investigate any further to know what was the reason behind this, but as you said, it almost certainly got to do something with a different Theme on that Samsung.

Related

Android view elements appear black (only on OnePlus 6 with Android Pie)

I'm working on an MVVM Android application. When I run the app on an OnePlus 6 with Android Pie all views appear in a sort of "dark theme". All the CardViews, Spinners and Dialogs through the app have a black background out of nowhere.
I made a new app with a CardView and let it run on the OnePlus6. That app was normal with a white CardView background.
I also tried to build the app on lots of different phones but only on the OnePlus 6 this sudden "dark theme" appears.
The OnePlus 6 uses the light theme, so that can not be the problem.
Does anyone know where this comes from? What code can I upload to make things extra clear?
one plus 6 has his own theme engine so you have first to installs themes to the mobile using for example : "substratum" then it will be better.
The problem is with the develop options on the phone. I tried to turn that off and on and for a while it worked in the normal way.
I don't know why it turns to black but it has to do with the Developer Options.

Icons randomly replacing one another on compiled Cordova app, Android 7.0 WebView

I'm working on a Cordova mobile app that uses jQuery Mobile. On this app, we've created buttons using icons from the Font Awesome library. In Chrome, everything works great -- the icons appear as they should. However, if we compile the app and run it on our Android test devices then the icons will start to randomly replace other icons on the same page.
If we use Chrome DevTools to inspect the page while the mobile app is running on the phone, the icons display correctly on the desktop inspector, but not on the mobile device.
Here's a screenshot of the icons displaying correctly. This is from Chrome DevTools inspecting the mobile app while it's running live on the mobile device.
Here's a capture of the same screen taken from the device. I've indicated in red where the differences in icons are.
More pertinent observations and facts:
Our primary test devices are Samsung S7s running Android 7.0 -- all of these devices have this same problem.
The icons do not start to replace one another until we've changed pages a couple times.
It's not consistent which icons get replaced. It will vary each time we fire up the app. One icon that gets replaced one time might be left untouched the next time.
This problem does not occur on our older Android test device (Droid Razr Maxx HD running Android 4.4.2).
I've tried re-compiling the app with the android-targetSdkVersion removed, set to 22 and set to 25. In all instances, the icons continue to swap randomly on the newer Androids.
We've upgraded cordova-android to the latest version (6.2.3 as of writing) and the issue remains.
If I use Chrome DevTools to manually remove the Font Awesome icon CSS class (e.g., fa-user-plus) and then re-add it again, the icon will then display correctly on the device.
We've noticed that sometimes (as you can see in the screenshot below) a small white line might appear underneath an icon that has been replaced.
Does anyone know what might be causing this? Any theories on how it's possible for Chrome DevTools to show one thing while the device shows another would also be helpful.
I stumbled across a solution for this problem while debugging a separate issue on the same app where position:relative elements would disappear while I was scrolling on a mobile device.
While I haven't been testing on an iPad, the solution provided in this question iPad Safari scrolling causes HTML elements to disappear and reappear with a delay fixed both issues.
What I did was apply -webkit-transform: translate3d(0,0,0) to the class .ui-btn (the jQuery Mobile class for buttons). After a re-compile, the icons would no longer randomly swap with one another.
I have little insight as to why -webkit-transform: translate3d(0,0,0) fixes this apparent WebView rendering bug. If anyone has a deeper understanding of what's going on, please leave a comment!

Drop-down list in hybrid app has black text on grey backround on certain android devices

We have a hybrid app built with phonegap and jquery mobile.
In one screen we have standard HTML5 select (drop-down list)
On one android device, Samsung S6 Galaxy with Android System WebView M42, the drop-down is shown with black text on grey background. See screenshot.
On all other Android devices it is shown with white text on grey background.
Are there any way of fixing this from the hybrid app?
This is not ideal fix, but i fixed it by switching to older android theme. In your manifest file
android:theme="#style/android:Theme.Holo.Light"
Have you reduced this to the simplest of examples? Just use the default app template, add in jquery mobile and create a list and show it to make sure it really is a problem specific to that device / environment.
The reason I ask is that I ran into similar issues until I ran my app's html and css through the WC3 validators. Turns out there were a couple misplaced tags here and there that caused issues only in some environments.

View(s) not visible on Android Jelly Bean

I'm currently developing an application with which a schedule can be retrieved and viewed. To display the schedule I used the TimeRulerView (and BlocksLayout and BlockView) java source files from the Google IO 2011 app because I liked the look and feel. Source code can be found here: https://github.com/underhilllabs/iosched2011 . (Google replaced there one with the code of IO2012).
Since my Galaxy Nexus updated tot Jelly Bean (4.1.1) yesterday the TimeRulerView (and/or one of the others) doesn't get shown anymore.
The weird thing is that they are actually still there, but there not visible. I can see a scrollbar of the length the timeruler normally has. Also when I normally click on an block in the view I get a little pop-up, and this still happens when not seeing the timeruler or a block.
I tested the original IO2011 app on my JB GN but nothing is visible there either, so the problem lies within (one of) the view(s) or the way JellyBean is rendering the view(s) (project butter maybe?).
See here ( https://dl.dropbox.com/u/7102660/TimeRulerView_JellyBean_problem.zip ) for screenshots on ICS (app working), JB (app not working) and the GoogleIO2011 app.
Could this be something to do with Hardware acceleration? I just recently ran into an issue on couple phones with ICS, but not all phones/devices were affected. Adding the hardwareAccelerated tag to my manifest didn't fix the issue either, and I had to define it on specific views that I did not want to be hardware accelerate. My solution used android:layerType="software" in my xml layouts and setLayerType(LAYER_TYPE_SOFTWARE, null) in the java code.
EDIT: Testing this more, it didn't fix my issue using setLayerType on Jelly Bean. Setting the layer type to software on ICS did fix my issue. The only way I could make the views show up was setting the whole application or specific activity to android:hardwareAccelerated="false".
Thanks to Chris answer I played around with hardware acceleration settings. I use the iosched2011 code as well and only had to remove the line android:layerType="software" from my BlocksLayout View inside the block_content.xml file .

ListPreference on tablet

I have a ListPreference on my android application.
On phone 2.3.4, it has the 'downward triangle with a circle' icon on the right.
But when I run on the same app on Samsung Galaxy, it has no such icon. Can you please tell me how can I fix that?
Thank you.
The missing triangle is probably due to customizations that Samsung has made to Android. If you want to force the list preference to appear the exact same on each device regardless of the vendor you will probably have to subclass the ListPrefernce class and define exactly how you want it to appear, rather than using the definition that ships with the device.
Update I just noticed that you mention you are using a tablet in the title. I'm assuming you're using a Galaxy Tab 10.1 or 8.9. If that is the case the missing triangle is either due to Honeycomb or TouchWiz. If its a Honeycomb customization I wouldn't try to hack one in there.
It really is best for everyone if your app conforms to the UI standards put forth by the OS. Introducing inconsistencies in the UI tends to make users unhappy and can lead to interfaces that are difficult to use.

Categories

Resources