android-styles

Setting style=“?android:attr/buttonBarStyle” to parent layout and style=“?android:attr/buttonBarButtonStyle” to buttons make them invisible

纵饮孤独 提交于 2020-01-24 02:22:26
问题 I followed Android recommendation and set style="?android:attr/buttonBarStyle" to parent layout and style="?android:attr/buttonBarButtonStyle" to buttons. So now my layout is something like this: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="horizontal" style="?android:attr/buttonBarStyle"> <Button android:id="@+id/button1" android:layout_width="wrap_content" android:layout

Change Google Places picker Action bar color

杀马特。学长 韩版系。学妹 提交于 2020-01-17 13:09:45
问题 Good morning, i am quite new in Android and i have a problem setting the color of the built-in action bar in Google Places Picker. The documentation of this one clearly says that the action bar color inherits the matherial theme style of the project. The problem is that i have Theme.AppCompat.Light.NoActionBar and the color of this style isn't passed to the Google Place Picker because it uses only the colors of material themes. I would like to ask if it's somehow possible to replace Theme

Set all button style in styles.xml

时光怂恿深爱的人放手 提交于 2020-01-14 19:15:17
问题 I want to make my app to have several styles. The style changes button style, textview color, and layout background color. I have my button style in xml files. And this is my code: style.xml (v21) <style name="ThemeIndigo" parent="@android:style/Theme.Material.NoActionBar"> <item name="android:colorPrimary">@color/indigo</item> <item name="android:colorPrimaryDark">@color/indigo</item> <item name="android:navigationBarColor">@color/indigo_dark</item> <item name="android:buttonStyle">@drawable

Action Bar menu item text color

旧街凉风 提交于 2020-01-09 01:56:13
问题 How to change text color of menu item title. I tried to change it as below <style name="Theme.Kanku.ActionBar.TitleTextStyle" parent="@android:style/TextAppearance.Holo.Widget.ActionBar.Title"> <item name="android:textColor">@color/white</item> </style> But it change color only of Action Bar title text, but not menu item text. 回答1: Try something like this : <style name="ThemeName" parent="@style/Theme.Sherlock.Light"> <item name="actionMenuTextColor">@color/white</item> <item name="android

How to create android spinner without down triangle on the right side of the widget with bottom line

笑着哭i 提交于 2020-01-07 03:15:19
问题 I want to remove down triangle on the right side and wants to bottom line. I am using following code to add bottom line: <Spinner android:id="@+id/buttonSelectCountry" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginBottom="10dp" android:gravity="center" android:spinnerMode="dropdown" android:text="Select country" style="@style/Widget.AppCompat.Spinner.Underlined"/> and following code to remove down arrow: <Spinner android:id="@+id

Button with selector for background color - when clicked the background color is extending out of the button

…衆ロ難τιáo~ 提交于 2020-01-05 08:43:27
问题 To begin with.. the button is added dynamically through code and hence cannot apply the styles in xml. I have few buttons in my activity and i am using a selector to change the background color. The button also has a "shape" attached to it, for border. image_border.xml <?xml version="1.0" encoding="UTF-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" > <solid android:color="@color/dark_grey" /> <stroke android:width="4dp" android:color="@color/light_grey" /> <padding

Custom overflow icon is too big (Using android.support.v7 and AppCompat)

徘徊边缘 提交于 2020-01-05 02:48:33
问题 My goal is to have the action bar be a red color, but since my only options from the default android library were white and black, I tried customizing it. I made some custom red icons by using a paint bucket on gimp to just fill in the white icons and re-save it under a different name. I did the same thing with the overflow icon, but for some reason, it's rendering a lot bigger than my other icons, which I don't want. I am using android:minSdkVersion="15" and targetSdkVersion 21 and the

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

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.