PreferenceFragmentCompat has padding on PreferenceCategory that I can’t get rid of

Actually there is a better hack to fix this, also with resource overriding: Create res/values-sw360dp-v13/values-preference.xml: <?xml version=”1.0″ encoding=”utf-8″?> <resources xmlns:tools=”http://schemas.android.com/tools”> <bool name=”config_materialPreferenceIconSpaceReserved” tools:ignore=”MissingDefaultResource,PrivateResource”>false</bool> <dimen name=”preference_category_padding_start” tools:ignore=”MissingDefaultResource,PrivateResource”>0dp</dimen> </resources> The <bool> fixes the default value of iconSpacePreserved for all Preference; The <dimen> fixes the PreferenceCategory. EDIT: If you are using androidx.preference:preference:1.1.0-alpha01 or above, you won’t need the … Read more

How to remove Title Bar from Activity extending ActionBarActivity or AppcompatActivity with Dialog Theme

I had same issue and needed to do something like following to resolve (note use of “windowNoTitle” instead of “android:windowNoTitle”) <style name=”Theme.MyDialog” parent=”@style/Theme.AppCompat.Light.Dialog”> <item name=”windowActionBar”>false</item> <item name=”windowNoTitle”>true</item> </style>

Transparent status bar not working with windowTranslucentNavigation=”false”

android:windowTranslucentNavigation does one thing that android:statusBarColor doesn’t do, which is requesting the SYSTEM_UI_FLAG_LAYOUT_STABLE and SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN flags. These are the ones that you need to request in order to draw behind the status bar. Request them in the onCreate of your Activity: getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN); Alternatively you can also simply set your apps theme background and … Read more

java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v4/os/BuildCompat

You are getting NoClassDefFoundError & ClassNotFoundException NoClassDefFoundError in Java comes when Java Virtual Machine is not able to find a particular class at runtime which was available at compile time. FYI You are using Eclipse. Android Studio is a far simpler way to develop for Android if you manage to get the hang of it. … Read more

Status Bar Color not showing – 5.0 Lollipop Android Studio: (AppCompat-v7:r21)

Please read this: For this to take effect, the window must be drawing the system bar backgrounds with android.view.WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS but android.view.WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS must not be set (Source) In case of you don’t know how to add that flag: getWindow().addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);

How do I set the disabled color of a button with AppCompat?

You aren’t using the Widget.AppCompat.Button.Colored style correctly. You’re using a parent style (Widget.AppCompat.Button.Colored), but applying it as a theme. This effectively means that the Widget.AppCompat.Button.Colored part is being ignored entirely and you are instead just changing the default color of the button (which works, but doesn’t handle the disabled case). Instead, you should use a … Read more

how to set colored border on cardview

Started from v28 design support library we can use Material Card View, which provides us with a material styled cardview implementation out of the box. <android.support.design.card.MaterialCardView android:layout_width=”100dp” android:layout_height=”100dp” android:layout_margin=”10dp”> … child views … </android.support.design.card.MaterialCardView> You can further style the cardview by using two of the attributes that come with it: app:strokeColor – The colour to … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)