android-appcompat

Appcompat v7 and ActionBarActivity

邮差的信 提交于 2020-01-15 12:29:11
问题 I'm following this tutorial to make and app with action bar for 2.3.x devices. But i cannot import appcompat-v7 to my projecto... It gives me lots of errors like these: [2014-11-06 14:19:23 - AcordeNoPonto] C:\Workspace\appcompat_v7\res\values-v21\themes_base.xml:194: error: Error: No resource found that matches the given name: attr 'android:colorControlActivated'. [2014-11-06 14:19:23 - AcordeNoPonto] C:\Workspace\appcompat_v7\res\values-v21\themes_base.xml:195: error: Error: No resource

android.support.v7.widget.Toolbar VectorDrawableCompat IllegalStateException when using support lib 24+

末鹿安然 提交于 2020-01-15 04:50:10
问题 I've started a new project in Android Studio and configured my gradle build settings. When I add an android.support.v7.widget.Toolbar to a layout, I get the following error when in design view. Keep note that this error only shows up when previewing with an API less than 21 (specifically APIs 16 - 19). Everything works fine when I preview with API 21 - 24. I have looked at a number of solutions and tried them, but none have solved the issue. One thing I tried doing was adding this to my

Tint CheckBox and Toolbar stuff separately

天涯浪子 提交于 2020-01-14 18:48:51
问题 I'm currently using the usually amazing appcompat-v7 library in my application and I'm trying to tint my CheckBoxes without changing the Icon-Colors in the Toolbar (like the back arrow or those three dots). Following how it looks currently - as you can see not only the CheckBox is tinted pink, the back-arrow / three-dots are also tinted pink. My code: Layout <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height=

Resource not found Exception for vector drawables

旧城冷巷雨未停 提交于 2020-01-14 07:25:06
问题 I am going to run my app on some devices its crashes as logs below: 01-04 16:54:02.206 7466-7466/com.lawnmowers E/AndroidRuntime: FATAL EXCEPTION: main Process: com.lawnmowers, PID: 7466 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.lawnmowers/com.lawnmowers.MapActivityNew}: android.content.res.Resources$NotFoundException: File res/drawable/abc_vector_test.xml from drawable resource ID #0x7f02004f at android.app.ActivityThread.performLaunchActivity(ActivityThread.java

Resource not found Exception for vector drawables

眉间皱痕 提交于 2020-01-14 07:24:27
问题 I am going to run my app on some devices its crashes as logs below: 01-04 16:54:02.206 7466-7466/com.lawnmowers E/AndroidRuntime: FATAL EXCEPTION: main Process: com.lawnmowers, PID: 7466 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.lawnmowers/com.lawnmowers.MapActivityNew}: android.content.res.Resources$NotFoundException: File res/drawable/abc_vector_test.xml from drawable resource ID #0x7f02004f at android.app.ActivityThread.performLaunchActivity(ActivityThread.java

How to apply a custom style to SwitchCompat

你离开我真会死。 提交于 2020-01-14 06:59:06
问题 I would like to apply a custom style to SwitchCompat. Change drawables and text for on and off state. How can I achieve this? I can't find any examples on how this is done. I tried the following in my styles.xml but apparently I'm not using the right parent: <style name="Switch" parent="android:Widget.AppCompat.Widget.CompoundButton.SwitchCompat"> <item name="android:textOn">@string/common_yes</item> <item name="android:textOff">@string/common_no</item> <item name="android:thumb">@drawable

How to apply a custom style to SwitchCompat

放肆的年华 提交于 2020-01-14 06:58:15
问题 I would like to apply a custom style to SwitchCompat. Change drawables and text for on and off state. How can I achieve this? I can't find any examples on how this is done. I tried the following in my styles.xml but apparently I'm not using the right parent: <style name="Switch" parent="android:Widget.AppCompat.Widget.CompoundButton.SwitchCompat"> <item name="android:textOn">@string/common_yes</item> <item name="android:textOff">@string/common_no</item> <item name="android:thumb">@drawable

Android theme will not update status bar color

ぃ、小莉子 提交于 2020-01-14 06:43:37
问题 I'm struggling to get Android to update my status bar color. I'm using AppCompatActivity in Xamarin.Android. My values/styles.xml file is like so: <!-- Main theme --> <style name="MainTheme" parent="MainTheme.Base"> </style> <style name="MainTheme.Base" parent="Theme.AppCompat.Light.DarkActionBar"> <item name="windowNoTitle">true</item> <item name="windowActionBar">false</item> <item name="android:windowBackground">@color/WindowBackground</item> <item name="colorPrimary">@color/Primary</item>

AppCompat SearchView icon can't be GONE

眉间皱痕 提交于 2020-01-14 04:49:16
问题 I'm using android.support.v7.widget.SearchView and i need to make this search icon GONE. I have custom ActionBar layout with SearchView: <android.support.v7.widget.SearchView android:id="@+id/search" android:layout_width="wrap_content" android:layout_height="wrap_content" android:visibility="gone"/> initialize SearchView : searchView = (SearchView) findViewById(R.id.search); AutoCompleteTextView searchText = (AutoCompleteTextView) searchView.findViewById(R.id.search_src_text); searchText

AppCompat SearchView icon can't be GONE

给你一囗甜甜゛ 提交于 2020-01-14 04:48:46
问题 I'm using android.support.v7.widget.SearchView and i need to make this search icon GONE. I have custom ActionBar layout with SearchView: <android.support.v7.widget.SearchView android:id="@+id/search" android:layout_width="wrap_content" android:layout_height="wrap_content" android:visibility="gone"/> initialize SearchView : searchView = (SearchView) findViewById(R.id.search); AutoCompleteTextView searchText = (AutoCompleteTextView) searchView.findViewById(R.id.search_src_text); searchText