android-theme

Android Styles For API 10 and API 11

微笑、不失礼 提交于 2020-01-05 08:06:23
问题 I am trying to do something that I feel to be very simple in concept. I would like my app to be supported all the way back to API 10 (Gingerbread). To make this look good, I need to make a slight change to the color of the text on my buttons when the device is running API 10. Thus, I want to create two styles: one of which will be used when the device is using API 10 (I want the text color of the buttons to be black in this case), and another when the device is using API 11 or above (the text

How to get device colors?

≡放荡痞女 提交于 2020-01-05 03:26:08
问题 I have a spinner which is in the Emulator light gray with black text also on HTC devices. On the Motorola Defy the control is dark-gray and the text is white. How can I get the default text color of the currient device? 回答1: All the customizations done by carries/manufactures are inside: android:colors android:styles android:themes If you are using a TextView you can check the default text color by creating a TextView object and calling getTextColors(). Another possibility is checking how the

how to create .apk file without using Eclipse

风流意气都作罢 提交于 2020-01-04 06:40:20
问题 I want to create "Theme Creator" for Android, so I want to create .apk file after creating theme. Can anyone guide me how to proceed? Any help in this regard will be well appreciated. 回答1: The best way I have found to create .apk without eclipse, or without any other IDE is to use maven with this neat plugin : Maven-Android-Plugin. It is actively maintained and quite well documented. You can start off with a sample. The downside of this approach is that one has to change the build process and

Why android:buttonStyle does not style buttons?

不羁的心 提交于 2020-01-04 05:49:05
问题 So, I have this weird issue: My app is very simple, main activity with just one button in it and custom theme for the activity set in the manifest. I can confirm the theme works and is selected, as I can change activity background or font color e.g. But when I try to style all Buttons on my activity, it does not work! This is the styles.xml code I use: <resources> <!-- Base application theme. --> <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> <!-- Customize your theme

Error inflating class com.android.internal.widget.ActionBarContainer

狂风中的少年 提交于 2020-01-04 05:34:07
问题 So, recently I had to move my project from where it was due to the Error: File path too long on windows, keep below 240 characters. After moving, and solving other errors when I run my project, the app crashes with android.view.InflateException: Binary XML file line #31: Error inflating class com.android.internal.widget.ActionBarContainer . Unfortunately, I cannot post the logcat message as it is too big to post, so I will just put some Caused by messages here. Apart from the inflate

Android material theme alpha color issue

我的未来我决定 提交于 2020-01-04 04:08:05
问题 I have create one app with build version 5.0 I have write theme below <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar"> <item name="colorPrimaryDark">@color/actionbar_color</item> <item name="colorPrimary">@color/actionbar_color</item> <item name="colorAccent">@color/actionbar_yellow_color</item> <item name="android:windowContentOverlay">@null</item> <item name="android:textColorPrimary">@color/edit_text_color</item> <item name="android:windowBackground">@drawable/ic_app

Style Radio Button and Text inside AlertDialog

青春壹個敷衍的年華 提交于 2020-01-04 02:34:09
问题 I want to show a radio list inside an AlertDialog with custom styling, something like . So I created a custom theme and provided that as an argument to AlertDialog.Builder's constructor. Here's the code for showing the dialog : private void showSortDialog() { final CharSequence[] options = new String[] {"Relevance", "Newest"}; AlertDialog.Builder builder = new AlertDialog.Builder(getActivityReference(), R.style.RadioDialogTheme); builder.setTitle("Sort by"); builder.setSingleChoiceItems

What property controls Spinner dropdown background?

混江龙づ霸主 提交于 2020-01-03 17:30:33
问题 I have a custom theme created with this generator. It has a custom style for Spinners which I don't like. I want to change the background drawable but I can't seem to figure out which property controls this. This is what the themed version looks like And here is what it will look like when using the Holo.Light theme. Notice the dark gray lines around the dropdown list in the first (themed) image. This is what I want to get rid of. What property controls this? I want them to match the default.

How can I change the color of the scrollbar in Android?

别说谁变了你拦得住时间么 提交于 2020-01-03 01:20:13
问题 The current problem is that our theme is inheriting from Theme.AppCompat, which appears to have a white scrollbar, and that is not visible on the white background. I know that I can use <item name="android:scrollbarThumbVertical">@drawable/scroll_thumb</item> And create a shape for the custom Scrollbar. But I only want to change it to a darker color. When I use a simple colored rectangle shape, it has a different width than the normal scrollbar. Is this possible? 回答1: ok, it is possible to

Setting Theme.Holo.Light changes everything except checkboxes in list

烈酒焚心 提交于 2020-01-02 06:34:32
问题 <style name="CustomTheme" parent="@android:style/Theme.Holo.Light"> I made my own theme and added a reference to it in my manifest. Everything looks perfect (buttons, textboxes etc) except for the checkboxes in my custom list. android:checkMark="?android:attr/listChoiceIndicatorMultiple" The checkbox in my listitem is the default checkbox from Theme.Holo and I can't figure out why. Grateful for any help! 回答1: I am having the same problem. I have no idea why it isn't choosing the correct