android-support-library

Why Android Studio is forcing to use Androidx from Android support library?

醉酒当歌 提交于 2019-12-05 13:44:30
问题 Working on a React Native project but out of sudden it stopped working & started giving an error: Manifest merger failed : Attribute application@appComponentFactory value=(android.support.v4.app.CoreComponentFactory) from [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91 is also present at [androidx.core:core:1.0.0] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory). Suggestion: add ‘tools:replace=“android:appComponentFactory”’ to <application>

Error inflating class Android support design

风流意气都作罢 提交于 2019-12-05 12:43:09
问题 What I am trying to do is use the new android support design library mentioned here: http://android-developers.blogspot.com/2015/05/android-design-support-library.html. I have attempted to use the floating action button as follows in my xml layout (this is where the below error is coming from): <android.support.design.widget.FloatingActionButton android:id="@+id/fab" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignTop="@+id/adview" android:layout

PagerTabStrip not showing in ViewPager in app targeting Android 6.X (N)

随声附和 提交于 2019-12-05 12:20:03
I have an existing app that makes use of ViewPager and PagerTabStrip and this has been working for a long time with various releases of the Android SDK and the com.android.support:appcompat-v7 library. I've just bumped up the compile and target SDK versions of my app from 23 to 24 and the com.android.support:appcompat-v7 library version from 23.4.0 to 24.0.0 ... and I now see that the PagerTabStrip is totally missing from the ViewPager . (Not just missing titles in the PagerTabStrip ... the PagerTabStrip is totally missing from the ViewPager when the views are rendered.) This is how I'm

How to use Snackbar without support library?

痞子三分冷 提交于 2019-12-05 11:46:27
I am developing an Android app which doesn't require backward compatibility. Target SDK version is 22 as of now. I am using native Activity and Fragment and application theme is android:Theme.Material.Light. My problem is that I'm not able to use Snackbar with the existing setup, it throws exceptions like android.view.InflateException: Binary XML file line #18: Error inflating class android.support.design.widget.Snackbar$SnackbarLayout E/AndroidRuntime(19107): at android.view.LayoutInflater.createView(LayoutInflater.java:640) E/AndroidRuntime(19107): at android.view.LayoutInflater

Google Play Services 9.2.0 missing classes [duplicate]

谁说胖子不能爱 提交于 2019-12-05 11:46:04
问题 This question already has answers here : Places class is removed from android play services 9.2.0 (3 answers) Closed 3 years ago . After an update to Google Play Services 9.2.0 of 28th, June, there are some missing classes that prevent working projects from compiling: Error:(24, 35) error: package com.google.android.gms.maps does not exist The same about Google Places, so if you updated to google play services 9.2.0, your project probably won't compile. Downgrading to 9.0.2 solves the problem

Gradle error after add android support design library

不打扰是莪最后的温柔 提交于 2019-12-05 11:24:54
I'm getting this error after add compile 'com.android.support:design:22.2.0' to my gradle file: .../app/build/intermediates/exploded-aar/com.android.support/appcompat-v7/22.2.0/res/values/values.xml with this message Error:(1) Attribute "insetForeground" has already been defined . I have this on my build.gradle file: ` compile 'com.android.support:design:22.2.0' compile 'com.android.support:cardview-v7:22.2.0' compile 'com.android.support:recyclerview-v7:22.2.0' compile 'com.google.android.gms:play-services-base:7.5.0' compile 'com.google.android.gms:play-services-location:7.5.0' compile 'com

Nested fragment with wrong activity reference after configuration change

狂风中的少年 提交于 2019-12-05 10:27:50
I'm finally looking into the new nested fragments APIs in the support library revision 11. Everything It worked pretty well till I tried to use the activity reference held by the nested fragments. After a configuration change the childFragment doesn't seem to get detached and re-attached to the new activity. Basically after an orientation change my childFragment is in an inconsistent state from which I can't get the correct activity instance with getActivity() . I manged to get the correct one using getParentFragment() .getActivity() and it works, but I don't think that's the right way to go.

Custom Support Dialog Fragment text is the wrong color

有些话、适合烂在心里 提交于 2019-12-05 10:19:30
If I put a TextView in a custom dialog box, the text will be black by default. Unfortunately, the support fragment dialogs backgrounds are dark gray. Black on gray is very hard to read. I could change the TextView to white or something like android:textColor="?android:attr/textColorPrimaryInverseDisableOnly" . But the dialog boxes on the new android (Holo Light) are white. So it will be white on white. I could use a hack like forcing it to be white on old versions of Android and forcing it to be black on newer versions of Android, but I'd rather find a more elegant solution. Is there a way to

Is there an alternative to NestedScrollView for use with a WebView?

我的梦境 提交于 2019-12-05 09:41:48
When using a WebView inside a NestedScrollView there are a few issues. The main one I'm fighting is that sites which load more content as you scroll down don't work well, for example vimeo.com. Also setting the view to LAYER_TYPE_HARDWARE doesn't work, probably for the same reason, it basically crashes because of the height. So, is there an alternative to the NestedScrollView if I want to use CoordinatorLayout in order to collapse the toolbar when the user scrolls inside the WebView ? My code is below. In order to reproduce the issue just load vimeo.com and scroll to the bottom. activity

Why option menu items squeezed if I use support library 26? [closed]

自古美人都是妖i 提交于 2019-12-05 08:56:26
The option menu items had the size they supposed to have with support library 25 but when I use 26.0.0, they all get squeezed. menu item xml <?xml version="1.0" encoding="utf-8"?> <menu xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"> <item android:id="@+id/people" android:icon="@drawable/icon_addfriends_newsfeed" android:title="" app:showAsAction="always" /> </menu> onCreateOptionsMenu in AppCompatActivity @Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.newsfeed, menu); return true; }