Questions tagged [android-support-library]

The Android Support Library contains backported APIs from newer platforms and APIs that offer utility functionality.

Description:

The Android Support Library includes static "support libraries" that you can add to your Android application in order to use APIs that are either not available for older platform versions or that offer "utility" APIs that aren't a part of the framework APIs. The goal is to simplify your development by offering more APIs that you can bundle with your application so you can worry less about platform versions.

Related tags:

3568 questions
385
votes
14 answers

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

When attempting to use the latest appcompat-v7 support library in my project, I get the following…
335
votes
27 answers

In android app Toolbar.setTitle method has no effect – application name is shown as title

I'm trying to create simple application using android-support-v7:21 library. Code snippets: MainActivity.java public class MainActivity extends ActionBarActivity { Toolbar mActionBarToolbar; @Override protected void onCreate(Bundle…
krossovochkin
  • 12,030
  • 7
  • 31
  • 54
314
votes
14 answers

How to make ConstraintLayout work with percentage values?

With a Preview 1 of Android Studio 2.2 Google released a new layout in its support library: ConstraintLayout. With ConstraintLayout it is easier to use a Design tool in Android Studio, but I didn't find a way to use relative sizes (percents or…
Yury Fedorov
  • 14,508
  • 6
  • 50
  • 66
248
votes
2 answers

Difference between Activity and FragmentActivity

I was working on fragments and came across two things Activity and FragmentActivity which are used several times. I want to know that is there any difference between these two, because when I changed Activity with FragmentActivity, it had no effect…
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…
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 …
216
votes
26 answers

Multiple dex files define Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat

If I run gradle assembleDebug from the command line, I am suddenly getting this error: UNEXPECTED TOP-LEVEL EXCEPTION: com.android.dx.util.DexException: Multiple dex files define…
xrd
  • 4,019
  • 6
  • 30
  • 39
211
votes
22 answers

How can I access getSupportFragmentManager() in a fragment?

I have a FragmentActivity and I want to use a map fragment within it. I'm having a problem getting the support fragment manager to access it. if (googleMap == null) { googleMap = ((SupportMapFragment) getSupportFragmentManager() …
197
votes
11 answers

BottomNavigationView display both icons and text labels at all times

I am using android.support.design.widget.BottomNavigationView from design support library version 25 compile 'com.android.support:design:25.0.0'
184
votes
10 answers

NavigationView get/find header layout

In my NavigationView I have a header layout with id 'viewId' with active buttons. To setup those buttons, I do the following in activity's onPostCreate: final View panel = findViewById(R.id.viewId); panel.setOnClickListener(new…
184
votes
15 answers

Nested Recycler view height doesn't wrap its content

I have an application that manage collections of books (like playlists). I want to display a list of collection with a vertical RecyclerView and inside each row, a list of book in an horizontal RecyclerView. When i set the layout_height of the inner…
182
votes
28 answers

Change EditText hint color when using TextInputLayout

I am using the new TextInputLayout from the design library. I am able to get it to show and to change the color of the floating label. Unfortunately the actual EditText hint is now always white. I have tried changing the hintColor in XML, styles,…
182
votes
3 answers

Android.app Fragments vs. android.support.v4.app using ViewPager?

I have a question regarding the Android Support Libraries, Fragments, and as a specific example, the ViewPager class. My intention is to create an app with similar functionality to the sample provided on the Android Developer website…
180
votes
10 answers

Resolved versions for app (22.0.0) and test app (21.0.3) differ

After upgrading to API 22 and support lib revision 22 I'm getting the following warning: Warning:Conflict with dependency 'com.android.support:support-annotations'. Resolved versions for app (22.0.0) and test app (21.0.3) differ. Gradle itself…
copolii
  • 14,208
  • 10
  • 51
  • 80
168
votes
10 answers

How to use support FileProvider for sharing content to other apps?

I'm looking for a way to correctly share (not OPEN) an internal file with external application using Android Support library's FileProvider. Following the example on the docs,
1
2 3
99 100