android-appcompat

How to change AppCompatCheckBox color efficiently?

与世无争的帅哥 提交于 2021-02-19 05:41:10
问题 I found a very strange behaviour in my AppCompatCheckBox, already searched a fix for it but didn't find, that's why I decided to ask here. I was trying to change the checked AppCompatCheckBox color programatically (as my app's color scheme changes dinamically, I can't use the XML attributes to color the CheckBox), so I used this approach: chkTos = (AppCompatCheckBox) findViewById(R.id.checkboxTos); ColorStateList colorStateList = new ColorStateList( new int[][]{ new int[]{-android.R.attr

How to change AppCompatCheckBox color efficiently?

早过忘川 提交于 2021-02-19 05:41:07
问题 I found a very strange behaviour in my AppCompatCheckBox, already searched a fix for it but didn't find, that's why I decided to ask here. I was trying to change the checked AppCompatCheckBox color programatically (as my app's color scheme changes dinamically, I can't use the XML attributes to color the CheckBox), so I used this approach: chkTos = (AppCompatCheckBox) findViewById(R.id.checkboxTos); ColorStateList colorStateList = new ColorStateList( new int[][]{ new int[]{-android.R.attr

Appcompact DialogFragment single-choice checkmark color

柔情痞子 提交于 2021-02-18 06:42:07
问题 I have a problem. My activity has style <style name="MaterialTheme" parent="Theme.AppCompat.Light.DarkActionBar"> <item name="colorPrimary">@color/action_bar_background</item> <item name="colorPrimaryDark">@color/action_bar_background</item> <item name="colorAccent">@color/action_bar_background</item> </style> also i have dialogFragment with simple single-choice chooser. @Override public Dialog onCreateDialog(final Bundle savedInstanceState) { final AlertDialog.Builder dialog = new

Android - EditText made programmatically not showing keyboard

岁酱吖の 提交于 2021-02-09 20:23:07
问题 I am making an app where I am using a ArrayAdapter<String> and I am programmatically making an editText view inside of a Relative Layout which is all inside of a AppCompatDialogFragment . Each of the editTexts are showing up and I can click on them, but if it doesn't open the keyboard to type. I have tried things like: EditText editText = (EditText) findViewById(R.id.myTextViewId); editText.requestFocus(); InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD

Can't find / download AppCompat-v7:23.1.1

百般思念 提交于 2021-02-09 07:34:30
问题 What's the matter: I had many problems with "appcompat-v7 23.1.1 not found". None of many solutions worked. After hours of thinking and searching for the answer I've encountered a strange problem. I have got Android Support Library 23.1.1 Installed. All features - except AppCompat-v7 - are installed. Main question is: How to force Android SDK Manager to download AppCompat 23.1.1? Things I did: Reinstalled Android Support Library - didn't work Ran Android SDK Manager as an Administrator - didn

Can't find / download AppCompat-v7:23.1.1

百般思念 提交于 2021-02-09 07:31:17
问题 What's the matter: I had many problems with "appcompat-v7 23.1.1 not found". None of many solutions worked. After hours of thinking and searching for the answer I've encountered a strange problem. I have got Android Support Library 23.1.1 Installed. All features - except AppCompat-v7 - are installed. Main question is: How to force Android SDK Manager to download AppCompat 23.1.1? Things I did: Reinstalled Android Support Library - didn't work Ran Android SDK Manager as an Administrator - didn

How to disable ripple effect on long press of a button in lollipop?

爱⌒轻易说出口 提交于 2021-02-09 02:45:50
问题 How to disable ripple effect on long press of a button in lollipop? When using sherlock long press of a button is not showing ripple effect but when i use appcompat it is showing a ripple effect on click and also on long click of a button . I do not want any ripple effect on the press of a button 回答1: If you have root, have a look at my patch here https://github.com/luv/android5_noripple My patch simply replaces draw function in android.graphics.drawable.Ripple with a function that does

How to disable ripple effect on long press of a button in lollipop?

本秂侑毒 提交于 2021-02-09 02:45:28
问题 How to disable ripple effect on long press of a button in lollipop? When using sherlock long press of a button is not showing ripple effect but when i use appcompat it is showing a ripple effect on click and also on long click of a button . I do not want any ripple effect on the press of a button 回答1: If you have root, have a look at my patch here https://github.com/luv/android5_noripple My patch simply replaces draw function in android.graphics.drawable.Ripple with a function that does

Why doesn't setEnabled(false) trigger a ColorStateList for theme Theme.AppCompat.Light?

你。 提交于 2021-02-08 01:18:59
问题 I am trying to use setEnabled(false) on a Button to show grey disabled state... I can only get the desired result if I force a theme on the button with android:theme="@style/Button" and then change the parent on that Button style to something other than the Theme.AppCompat.Light.DarkActionBar , such as from Material: <style name="Button" parent="android:Theme.Material.Light.NoActionBar"> (even then, only the button background changes, the text color doesn't.) I can't see the Button as grey

Why doesn't setEnabled(false) trigger a ColorStateList for theme Theme.AppCompat.Light?

折月煮酒 提交于 2021-02-08 01:18:12
问题 I am trying to use setEnabled(false) on a Button to show grey disabled state... I can only get the desired result if I force a theme on the button with android:theme="@style/Button" and then change the parent on that Button style to something other than the Theme.AppCompat.Light.DarkActionBar , such as from Material: <style name="Button" parent="android:Theme.Material.Light.NoActionBar"> (even then, only the button background changes, the text color doesn't.) I can't see the Button as grey