android-support-library

FAB (floating action button) doesn't float

随声附和 提交于 2019-12-10 04:10:22
问题 I've tried to use the floatingactionbutton element but it doesn't float in UI layout, the floating button occupies part of the layout and isn't over the component, in my case is a viewpager, button doesn't float this is my layout: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" xmlns:app="http://schemas.android.com/apk/res-auto" tools:context="com

android.support.v4.util.Pair vs android.util.Pair

浪尽此生 提交于 2019-12-10 03:10:08
问题 I read about support.v4 lib that allows android backward compatibility. So IIUC, when there is an ambiguity - it's always best practice to import the lib from android.support.v4 ... right? 回答1: Yeah, it's wise but not always needed. I this case Pair is API 5 and quite usefull class so it was added to v4 library. Another example are Fragments . If you want to use ViewPager with Fragments most probably you need Fragments from v4 as ViewPager is from v4 as well... 来源: https://stackoverflow.com

Failed to resolve: com.android.support:customtabs:[26.0.0,26.1.0] [duplicate]

故事扮演 提交于 2019-12-10 01:48:15
问题 This question already has answers here : Android studio default project fails: Error:Failed to resolve: com.android.support:support-v4:25.2.0 (3 answers) Failed to resolve: com.android.support:cardview-v7:26.0.0 android (24 answers) Closed 2 years ago . I have these two errors: Failed to resolve: com.android.support:custom tabs:[26.0.0,26.1.0] Failed to resolve: com.android.support:support-v4:[26.0.0,26.1.0] 回答1: Now Android support package disturbs over network(starts from 25.4), so your

v7 support 23.0.1 crash: AppCompatButton.setBackgroundDrawable

故事扮演 提交于 2019-12-09 22:58:43
问题 I am experiencing this crash, with support library 23.0.1 It happens when showing a Dialog Fragment. It verifies with both android.support.v4.app.DialogFragment and android.support.v7.app.AppCompatDialogFragment Anyone else is experiencing this? It always happens with release compilation (which has Proguard enabled), and only in some cases with debug compilation. I am reporting the crash stacks for both fragment classes. stack for android.support.v4.app.DialogFragment : android.view

java.lang.NoClassDefFoundError: android.support.v4.view.LayoutInflaterCompat

人盡茶涼 提交于 2019-12-09 18:10:19
问题 I am getting following error in Samsung note 2 in 4.4.2 , version. I also have tried with HTC One X+ 4.2.2. I think its pre-lollipop. Cause its working fine on Lollipop. any guess? This is my gradle file apply plugin: 'com.android.application' android { compileSdkVersion 22 buildToolsVersion '22.0.1' packagingOptions { exclude 'META-INF/DEPENDENCIES' exclude 'META-INF/NOTICE' exclude 'META-INF/LICENSE' } defaultConfig { multiDexEnabled true applicationId "com.example.app" minSdkVersion 14

Applying a theme to v7 Support Action Bar

三世轮回 提交于 2019-12-09 18:01:16
问题 I am using the support v7 library to implement ActionBar in my app..I have this in my styles.xml file <?xml version="1.0" encoding="utf-8"?> <resources xmlns:android="http://schemas.android.com/apk/res/android"> <style name="AppTheme" parent="@style/Theme.AppCompat.Light.DarkActionBar"> <item name="android:actionBarStyle">@style/ActionBarTheme</item> </style> <style name="ActionBarTheme" parent="android:Widget.ActionBar"> <item name="android:background">#FFFF0000</item> </style> </resources>

AppBar hides view when scrolling until collapsed

早过忘川 提交于 2019-12-09 16:50:23
问题 My AppBar hides one of my views right when it reaches the end of the scrolling, but I want the pinned view to stay above the AppBar even when it reaches the end of its scrolling. Here is what my view looks like before I start scrolling: And this is what it looks like when it is fully scrolled: You can see that the circular image on the bottom left of the AppBar is now hidden under the bar. Here is my fragment's XML code: <android.support.design.widget.CoordinatorLayout xmlns:android="http:/

ClassCastException: CustomFragment cannot be cast to android.app.Fragment / Using android.support.v4.app.Fragment

ε祈祈猫儿з 提交于 2019-12-09 16:25:50
问题 I am developing an application divided in one library and two applications : 1 for phones, the other for tablets. A lot of code and layout is defined in the library, and only a few parts are defined in the applications. I'm using fragments in an Activity , with a ViewPager for the phone version (layout and activity defined in the library, used with no change in the phone application). For the tablet version, I want to show my fragments (2) side by side, and not in a ViewPager , so I tried to

Android FileProvider class not found in release builds

不想你离开。 提交于 2019-12-09 16:11:56
问题 I'm using a FileProvider to get photos from the device. The implementation works just fine in debug builds (minifyEnabled false) but when I'm building the release build (minifyEnabled true) I get an error: java.lang.RuntimeException: Unable to get provider android.support.v4.content.FileProvider: java.lang.ClassNotFoundException: Didn't find class "android.support.v4.content.FileProvider" on path: DexPathList[[zip file "/data/app/com.package.name-2/base.apk"], nativeLibraryDirectories=[/data

Bug with anchored FloatingActionButton in support library 24.2.1

核能气质少年 提交于 2019-12-09 14:32:51
问题 I have been having this issue since 24.2.0, but now I'm using 24.2.1 and the bug is still here, it only works well <= 24.1.1. I have an anchored FloatingActionButton done like this: <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent"> <android.support.design.widget.CoordinatorLayout android:id="@+id