Questions tagged [android-appcompat]

The App Compat Support Library package contains several libraries that can be included in your application. Each of these libraries supports a specific range of Android platform versions and set of features.

Description:

There are several libraries designed to be used with Android 2.1 (API level 7) and higher. These libraries provide specific feature sets and can be included in your application independently from each other.

Note: This library depends on the v4 Support Library. If you are using Ant or Eclipse, make sure you include the v4 Support Library as part of this library's classpath.

Here are a few of the key classes included in the v7 appcompat library:

ActionBar - Provides an implementation of the action bar user interface pattern. For more information on using the Action Bar, see the Action Bar developer guide.

AppCompatActivity - Adds an application activity class that can be used as a base class for activities that use the Support Library action bar implementation.

AppCompatDialog - Adds a dialog class that can be used as a base class for AppCompat themed dialogs.

ShareActionProvider - Adds support for a standardized sharing action (such as email or posting to social applications) that can be included in an action bar.

https://developer.android.com/tools/support-library/features.html

Related tags:

2662 questions
403
votes
10 answers

How do I use DrawerLayout to display over the ActionBar/Toolbar and under the status bar?

I've seen in the new material design Side Nav spec that you can display the drawer over the action bar and behind the status bar. How can I implement this?
Chris Banes
  • 31,763
  • 16
  • 59
  • 50
339
votes
4 answers

Upgraded to AppCompat v22.1.0 and now getting IllegalArgumentException: AppCompat does not support the current theme features

I've just upgraded my app to use the newly released v22.1.0 AppCompat and I'm now getting the following exception when I open my app. Caused by: java.lang.IllegalArgumentException: AppCompat does not support the current theme features at…
Chris Banes
  • 31,763
  • 16
  • 59
  • 50
284
votes
22 answers

AppCompat v7 r21 returning error in values.xml?

I'm using Android Studio and when I add compile "com.android.support:appcompat-v7:21.0.0" to my Gradle file, I'm getting a ton of…
Michael Garber
  • 2,896
  • 2
  • 11
  • 14
244
votes
13 answers

Tab not taking full width on Tablet device [Using android.support.design.widget.TabLayout]

I have setup tabs as UPDATE 29/05/2015 this post. Tabs take full width on my Nexus 4 mobile but on nexus 7 tablet it in center and not cover full screen width. Nexus 7 screenshot Nexus 4 screenshot
Max
  • 5,733
  • 4
  • 30
  • 44
236
votes
38 answers

Cannot resolve symbol 'AppCompatActivity'

I've just tried to use Android Studio. I've created blank project and tried to create Activity which extends AppCompatActivity. Unfortunalty Android Studio "says" that it Cannot resolve symbol 'AppCompatActivity' I have compile…
220
votes
23 answers

How to add button tint programmatically

In the new AppCompat library, we can tint the button this way:
217
votes
10 answers

Why does Eclipse automatically add appcompat v7 library support whenever I create a new project?

Why does Eclipse automatically add appcompat v7 library support whenever I create a new project? I am creating a simple project whose MainActivity should extend Activity, but it does not. Eclipse automatically adds action bar support. How do I…
Talha Q
  • 4,350
  • 4
  • 28
  • 40
216
votes
26 answers

No resource found that matches the given name: attr 'android:keyboardNavigationCluster'. when updating to Support Library 26.0.0

I've got this issue while updating to the latest Support Library version 26.0.0 (https://developer.android.com/topic/libraries/support-library/revisions.html#26-0-0): Error:(18, 21) No resource found that matches the given name: attr …
191
votes
18 answers

Remove title in Toolbar in appcompat-v7

The documentation of Toolbar says If an app uses a logo image it should strongly consider omitting a title and subtitle. What is the proper way to remove the title?
timemanx
  • 4,493
  • 6
  • 34
  • 43
184
votes
7 answers

Toolbar and Contextual ActionBar with AppCompat-v7

I am working on using the newly added Toolbar that was introduced in Lollipop and the AppCompat-v7 library. I followed this guide on setting up the Toolbar I noticed that when you invoke something that will bring up the contextual ActionBar (such as…
ariets
  • 4,218
  • 4
  • 28
  • 34
182
votes
24 answers

Cannot resolve symbol 'Theme' in styles.xml (Android Studio)

Since today, Android Studio can't find the AppCompat themes in styles.xml, but for example AppCompatActivity in code does get recognized. My Android Studio version is 2.2.2, Build #AI-145.3360264 I already tried upgrading to the latest build tools,…
FLP
  • 2,050
  • 2
  • 14
  • 16
174
votes
19 answers

Flinging with RecyclerView + AppBarLayout

I am using the new CoordinatorLayout with AppBarLayout and CollapsingToolbarLayout. Below AppBarLayout, I have a RecyclerView with a list of content. I have verified that fling scrolling works on the RecyclerView when I am scrolling up and down the…
170
votes
10 answers

NoClassDefFoundError: android.support.v7.internal.view.menu.MenuBuilder

There is an issue with the Android appcompat v7 library on Samsung devices running Android 4.2. I keep getting crashes with the following stack trace in my Developer Console: java.lang.NoClassDefFoundError:…
Matt K
  • 6,620
  • 3
  • 38
  • 60
165
votes
8 answers

Material Design not styling alert dialogs

I've added the appCompat material design to my app and it seems that the alert dialogs are not using my primary, primaryDark, or accent colors. Here is my base style: