Tag: android-support-library

how to fix eror app\build\intermediates\res\merged\debug\values-v24\values-v24.xml

I get an error when I build a project. Error: Error:Execution failed for task ‘:app:processDebugResources’. > com.android.ide.common.process.ProcessException: Failed to execute aapt C:\Users\MR Maleki\Desktop\WhoIsBetter2\app\build\intermediates\res\merged\debug\values-v24\values-v24.xml Error:(4) Error retrieving parent for item: No resource found that matches the given name ‘android:TextAppearance.Material.Widget.Button.Colored’. Error:(3) Error retrieving parent for item: No resource found that matches the given name ‘android:TextAppearance.Material.Widget.Button.Borderless.Colored’. Error:(3) Error […]

Marked as private warning after changing colour of up arrow

After defining a custom colour for the back arrow in the action bar, a warning is then returned. What can be done to get rid of this warning? final Drawable upArrow = ContextCompat.getDrawable(this, R.drawable.abc_ic_ab_back_mtrl_am_alpha); upArrow.setColorFilter(Color.BLUE, PorterDuff.Mode.SRC_ATOP); actionBar.setHomeAsUpIndicator(upArrow); The resource @drawable/abc_ic_ab_back_mtrl_am_alpha is marked as private in com.android.support:appcompat-v7

appcompat v21 throws java.lang.UnsupportedOperationException

After updating my project to use the appcompat library to version 21.0.0 I have a problem with a context menu created with a gridview multichoice modal event. The same code works nice with appcompat v20. This is the relevant part of the main activity: public class MainActivity extends android.support.v7.app.ActionBarActivity implements AbsListView.MultiChoiceModeListener { … mGridView.setChoiceMode(AbsListView.CHOICE_MODE_MULTIPLE_MODAL); mGridView.setMultiChoiceModeListener(this); […]

DrawableCompat setTint not working on API 19

I am using the DrawableCompat for tinting drawable as below , tinting doesn’t seem to be working on API 19. I am using the support lib version 23.3.0 Drawable drawable = textView.getCompoundDrawables()[drawablePosition]; if (drawable != null) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { drawable.setTint(color); } else { DrawableCompat.setTint(DrawableCompat.wrap(drawable), color); } }

Android Studio Error: “You must install the Android Support Repository though the SDK Manager”

I just initialised a project on Android Studio, and it was working fine in version 0.2.6, but in 0.2.7, I get this error: It creates a folder inside my Applications directory, but it does not initialize the project. Any help regarding this problem would be appreciated. I get no problems with version 0.1.1 through version […]

enum vs android @Intdef – which one is better optimized

I know that when comparing constants to enums constants take up less space and can be primitive. I am researching @Intdef annotation in android and can someone tell me if its better storage to use @Intdef vs a enum. Is it recommended now in android to put enum aside and use @intdef moving forward when […]

Android Support Library: getDrawable independent if vector or not

When working with Android >= 5.0, Drawable d = getResources().getDrawable(R.drawable.icon) Correctly parses the XML and returns a valid drawable. But when using the new Vector Drawable Support Library (Version 23.4, Gradle 2.1.2), this code crashes under Android 4. android.content.res.Resources$NotFoundException … Caused by: org.xmlpull.v1.XmlPullParserException: Binary XML file line #2: invalid drawable tag vector The solution would […]

Nullpointer when using custom adapter in the actionbar list menu (with the compat-v7)

I’m facing a Nullpointer exception when using the latest version of the compatibility lib (namely, v18 of compat-lib, released with the 4.3 Android version) and using the list navigation menu mode in the actionbar. The error occurs in the 2.3.3 version of android. I believe that’s because in this version (and others versions), the whole […]

After setting up android-support-v7-appcompat R.java is missing

I am trying to change my Eclipse project to make it backward compatible to Android 2.1. I followed the instructions to set up the Support Library from here but after I attached the Library project to my project, the R.java from the gen directory gone. Plus I got some errors in the console, like: [2013-09-02 […]

Preferences Support Library – SwitchPreference not working

A few days ago Google introduced the Preference Support Library (Link). I’ve just tried to implement it in my application though it seems like it’s not working with SwitchPreferences which is weird because Google states that we can use the same XML-Files as before and explicity says that SwitchPreferences are now available to all API […]

Android Babe is a Google Android Fan, All about Android Phones, Android Wear, Android Dev and Android Games Apps and so on.