Strange background of text in custom theme - android

I recently updated my app, changing it's design a bit. Amongst other things, I styled buttons with custom drawables (well - not exactly custom, just taken from ICS release). Everything works well, except for one of the users.
Instead of:
He sees:
This is a Button, but I have also other controls styled with the same background drawable and the problems appears there (so, it's not limited to buttons).
There are two changed style properties that these controls have in common. One is, of course, a background drawable. The other is textAppearance:
<item name="android:textAppearance">?android:attr/textAppearanceMediumInverse</item>
I came to a conclusion, that this user is using some strange theme, which alters the default value of textAppearance* styles. But I have no idea what attribute may control this "text background color" (android:background does not work, checked this just in case). Or maybe I'm looking in the wrong place and this problem is not related to textAppearance?
EDIT:
The background image is a semi-transparent PNG file.
Android version 2.3.7, Motorola Milestone. That's all I got.
EDIT 2, Fixed:
OK, the problem was at the users side, it turned out he was using CyanogenMod7 with forced 16bit trasparency. After switching that option off, everything works.

OK, the problem was at the users side, it turned out he was using CyanogenMod7 with forced 16bit trasparency. After switching that option off, everything works.

Related

Is the padding for icons in PreferenceHeaders different to PreferenceScreens?

I'm working on two apps - one uses PreferenceHeaders for the settings page, whilst the other entirely uses PreferenceScreens. I've got icons next to the setting items in the PreferenceHeaders screen and it works entirely as I'd expect:
Unfortunately, in the other app, the use of the android:icon attribute has a very different outcome, with lots of padding between the icon and the text:
Is this just an issue due to the different preference system, or is it caused by something else in the app, and if it is due to the use of PreferenceScreen, is there any way to make it mirror the behaviour of PreferenceHeaders or should I just switch it?

Android - How to change Default Loading Screen(Screenshot)? [duplicate]

The app itself works completely fine. My question is that on the launching of the app itself, the screen is the Unity default blue for a quick second or so before changing to the black of my first scene.
How do I change this color to be black on startup?
You can change this by going to File --> Build Settings --> Player Settings --> Splash Image --> Background --> Background Color.
From there you can change the background color. You can also change the image, animation type and overlay opacity from there.
Note that there are things you may not be able to change there unless you have Pro license.
EDIT:
Updated to be more detailed of where to change stuff
First change the Splash Image:
There are more options for iOS platform but this settings can still be found in the menu I mentioned above.
If iOS, select iOS as your platform and you can change your Background Color from there:
You should then change the Lunch Screen type from there. Set it to None if you want it to be gone.
If the color does not still change, you can create a Texture with a color of your choice and add it to the Mobile Splash Screen slot:
I believe the OP was looking for the Background Color of the Launch Screens as indicated in these screenshots.
This is taken from an iOS build setting panel. We've observed odd behavior with no textures at all (even though that is what we want), so we use single-pixel, solid-color images as well as a background color to match.
These fields are not made available in the PC/Android build windows, so not 100% sure what the equivalent would be - beyond using flat-colored images. Either way, it is these elements that are used prior to loading your scenes.
I think you are talking about the camera background color. You can set it up in your main camera to black. You can find the camera documentation here.

Change colour scheme of phone specific UI elements (Selected Buttons / Selected EditText)

I'm working on a Nexus S and the phone theme uses Black and Orange. I started with a custom button - changing the background from #android:drawable/btn_default to my own 9 Patch image. This is fine and dandy and there are 100's of tutorials and examples of such littering Google.
The problem is I don't want to create a different style of button. I want the UI in my app to as insofar as possible to stay true to the phones own buttons and UI elements. What I want is to create a custom button which looks exactly like android:state_pressed="true" and android:state_focused="true" but instead of orange, blue.
I also want to do this for selected EditText & Spinners and the like.
Am I doomed to backwards engineer each element, guessing each pixel, one for each state and create 9 patch images of them? That's what I've done below for the blue button - as you can see, close but not exact.
Has android given these buttons out somewhere - if that was true it would take an afternoon but it wouldn't be unreasonable to create the same UI set in a different colour.
Or is the a programmatic way of saying "For this app use this theme" that I've just never heard of (Big ask).
If you look in the Android SDK folder under platforms you will see all of the different SDk levels that you have downloaded. Inside each there is a data/res/drawable folder where there are all of the images used in the UI. You can modify those and add them to your own resources. But yes, any change you want to make to the default UI you will need to implement yourself.

How to handle different android UI's

I recently ran into a problem with my app, On most android phones I have encountered, the UI seems to be mostly light colored. Now though, it seems phones are making a switch over to a darker UI(droid x). Now I found this to be a problem for instance with spinners. I have not set a font color on my spinner, but it gets defaulted to black on all the UI's I have tested on, making it harder to read on the darker UI's. What is the best way to handle this? Pick a neutral color? Design for each UI? Or is there a way to set the font color so the phone's UI can pick it up and set it to their default color?
I had the same problem. I have created a custom theme as a workaround.
See Comment #8 of this link
http://code.google.com/p/android/issues/detail?id=5237

How to Get Android System Colors

I've seen references on how to SET system colours, but I need to find out how you GET them - how do you find out what they are?
On the Samsung Galaxy S for example, the tab views, ListView highlights when you select an item, and the Summary text line on the preference screen are all blue.
There are many apps which immitate this style and I want to do the same. Obviously I cannot just hard code and set the colour to Blue, as other handsets use different colours.
The question is, is there a way to programmatically find out what colour the Preference Screen Summary Line, Tabs, or ListView selections are, so that you can then set that against a TextView elsewhere in your app?
How do I get the android system colours?
There is an answer to this question, but it is probably not the one you wanted to hear. There is no way to reliably do this. The "selection color" is actually part of a nine-patch image, which is provided on a platform specific basis. Some use the standard orange color, some (Sense) uses green, and others use red. With an exhaustive list of these you might be able to create a mapping from hardware to color, but this is not very effective because new hardware comes out all the time, and some of these phones allow sense to be uninstalled.
The only real thing you can do is to make your buttons consistent within the application itself, which is a hard enough task by itself. If you really have to have a custom item with a selection color (which is common enough), then my advice would be to copy the button resources from the platform of your choice (I like the default sdk resources myself) and then manually set them throughout your application. This way they will always look the same no matter which platform you are on, and so will always match your custom views. Note that this will require you to do more than just buttons. Dialogs and menus also will need to be modified, which is possible, but hard.
Really this is a flaw in the way Android was designed, and it causes a lot of us grief. I wish I had a better answer for you, but I think this is the best we've got.
You can specify colours to elements in your XML layout using the #android:color system variable:
<TextView android:background="#android:color/white" android:textColor="#android:color/black" />

Categories

Resources