Action bar navigation modes are deprecated in Android L

The new Android Design Support Library adds TabLayout, providing a tab implementation that matches the material design guidelines for tabs. A complete walkthrough of how to implement Tabs and ViewPager can be found in this video Now deprecated: The PagerTabStrip is part of the support library (and has been for some time) and serves as … Read more

How can I change default dialog button text color in android 5

Here’s a natural way to do it with styles: If your AppTheme is inherited from Theme.MaterialComponents, then: <style name=”AlertDialogTheme” parent=”ThemeOverlay.MaterialComponents.Dialog.Alert”> <item name=”buttonBarNegativeButtonStyle”>@style/NegativeButtonStyle</item> <item name=”buttonBarPositiveButtonStyle”>@style/PositiveButtonStyle</item> </style> <style name=”NegativeButtonStyle” parent=”Widget.MaterialComponents.Button.TextButton.Dialog”> <item name=”android:textColor”>#f00</item> </style> <style name=”PositiveButtonStyle” parent=”Widget.MaterialComponents.Button.TextButton.Dialog”> <item name=”android:textColor”>#00f</item> </style> If your AppTheme is inherited from Theme.AppCompat: <style name=”AlertDialogTheme” parent=”ThemeOverlay.AppCompat.Dialog.Alert”> <item name=”buttonBarNegativeButtonStyle”>@style/NegativeButtonStyle</item> <item name=”buttonBarPositiveButtonStyle”>@style/PositiveButtonStyle</item> </style> <style name=”NegativeButtonStyle” parent=”Widget.AppCompat.Button.ButtonBar.AlertDialog”> … Read more

Manifest merger failed : uses-sdk:minSdkVersion 14

Note: This has been updated to reflect the release of API 21, Lollipop. Be sure to download the latest SDK. In one of my modules I had the following in build.gradle: dependencies { compile ‘com.android.support:support-v4:+’ } Changing this to dependencies { // do not use dynamic updating. compile ‘com.android.support:support-v4:21.0.0’ } fixed the issue. Make sure … Read more

Material effect on button with background color

When you use android:background, you are replacing much of the styling and look and feel of a button with a blank color. Update: As of the version 23.0.0 release of AppCompat, there is a new Widget.AppCompat.Button.Colored style which uses your theme’s colorButtonNormal for the disabled color and colorAccent for the enabled color. This allows you … Read more

appcompat-v7:21.0.0′: No resource found that matches the given name: attr ‘android:actionModeShareDrawable’

While the answer of loeschg is absolutely correct I just wanna elaborate on it and give a solution for all IDE’s (Eclipse, IntellJ and Android Studio) even if the errors differentiate slightly. Prerequirements Make sure that you’ve downloaded the latest extras as well as the Android 5.0 SDK via the SDK-Manager. Android Studio Open the … Read more

Exception ‘open failed: EACCES (Permission denied)’ on Android

Google has a new feature on Android Q: filtered view for external storage. A quick fix for that is to add this code in the AndroidManifest.xml file: <manifest … > <!– This attribute is “false” by default on apps targeting Android Q. –> <application android:requestLegacyExternalStorage=”true” … > … </application> </manifest> You can read more about … Read more

Why is my Button text forced to ALL CAPS on Lollipop?

I don’t have idea why it is happening but there 3 trivial attempts to make: Use android:textAllCaps=”false” in your layout-v21 Programmatically change the transformation method of the button. mButton.setTransformationMethod(null); Check your style for Allcaps Note: public void setAllCaps(boolean allCaps), android:textAllCaps are available from API version 14.

This Activity already has an action bar supplied by the window decor

I think you’re developing for Android Lollipop, but anyway include this line: <item name=”windowActionBar”>false</item> to your theme declaration inside of your app/src/main/res/values/styles.xml. Also, if you’re using AppCompatActivity support library of version 22.1 or greater, add this line: <item name=”windowNoTitle”>true</item> Your theme declaration may look like this after all these additions: <!– Base application theme. –> … Read more

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