android-support-library

How can I test activity based on ActionBarActivity (from android.support.v7.app) using AndroidUnitTestCase<T> class?

为君一笑 提交于 2019-12-11 19:36:15
问题 Sorry for my English. I use Android Studio. To learn how to create tests in Android Studio I used this SO post All tests are in the same Android App Module where the source. The support libraries for v4 and v7 are connected ( v7 is connected by default). The module's build.gradle contains: dependencies { compile 'com.android.support:appcompat-v7:+' compile "com.android.support:support-v4:19.0.+" } and support-v4-19.0.0.jar is shown as external library (in the project tree). All was right

Bug in lib support V7 with startSupportActionMode

∥☆過路亽.° 提交于 2019-12-11 19:25:53
问题 In a ActionBarActivity (lib support V7), when i call startSupportActionMode() from my nexus 4 (4.3), in callback, i have a double call to onPrepareActionMode() because the onDestroyActionMode is also called. In other terms, the bug is: 1 > startSupportActionMode(callback); 2 > callback.onPrepareActionMode() is triggered 3 > callback.onDestroyActionMode() is triggered (not by me, not normal) 4 > callback.onPrepareActionMode() is triggered The good result must be: 1 > startSupportActionMode

Can I have toolbar for each fragment separately. How to handle navigation drawer

自古美人都是妖i 提交于 2019-12-11 17:37:31
问题 In my app some pages have custom view in toolbar. Some fragment have transparent toolbar and some have coordinate layout scroll. So I have decided to have toolbar separate for each fragment I want to know is it a good practice or not. If someone has already done this please share code or example. 回答1: You can use custom toolbars in your fragments. and you have to implement them separately for each fragment. First of all declare your toolbar in your fragment layout : <RelativeLayout xmlns

Why are there two Fragment classes in Android? [duplicate]

孤街醉人 提交于 2019-12-11 17:17:59
问题 This question already has answers here : Difference between android.app.Fragment and android.support.v4.app.Fragment (6 answers) Closed last year . In a recent question, the OP received an unexpected error message due to importing Fragment from the android.app package. The solution to fix the error was to import android.support.v4.app.Fragment instead. Why are there two different Fragment classes that appear to have the same functionality? 回答1: According to the documentation, fragments were

Release build is corrupted when updating support gradle plugins as 28.0.0-alpha1

爱⌒轻易说出口 提交于 2019-12-11 17:11:22
问题 My release build was corrupted when I using android support version as 28.0.0-alpha . But release build working fine with support version 27.1.1 . Additional Info : version name and code is missed on release build with support version 28.0.0-alpha so How to resolve it? 回答1: FYI alpha is a version of a piece of software that is made available for testing. 28.0.0-alpha1 is a pre-release version to support the Android P developer preview. Its API surface is subject to change, and it does not

Migrate to AndroidX for Wear Support Libraries after Android Pie?

▼魔方 西西 提交于 2019-12-11 15:20:02
问题 Starting in Fall of 2019 the Google Play Console requires your wearable application targets at least Android 9 (API level 28). August 1, 2019: Required for new apps November 1, 2019: Required for app updates After changing my build.gradle to target 29 it gives me a warning recommending I use AndroidX libraries when targeting Android Q or newer. What should I change the com.android.support dependencies to? implementation 'com.android.support:wear:28.0.0' implementation 'com.android.support

Android - Failed to resolve: cardview-v7

自闭症网瘾萝莉.ら 提交于 2019-12-11 15:18:28
问题 My gradle is like bellow: buildscript { repositories { maven { url 'https://plugins.gradle.org/m2/' } } dependencies { classpath 'gradle.plugin.com.onesignal:onesignal-gradle-plugin:0.11.2' } } apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin' repositories { maven { url 'https://maven.google.com' } } apply plugin: 'com.android.application' apply plugin: 'io.fabric' //apply plugin: 'com.google.firebase.firebase-crash' repositories { jcenter() } android { compileSdkVersion 27

Manifest merger failed : Attribute application@appComponentFactory cant solve this

…衆ロ難τιáo~ 提交于 2019-12-11 14:24:51
问题 i am new in android and have an app that when build my project have this Error :: ERROR: Manifest merger failed : Attribute application@appComponentFactory value=(androidx.core.app.CoreComponentFactory) from [androidx.core:core:1.0.0] AndroidManifest.xml:22:18-86 is also present at [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91 value=(android.support.v4.app.CoreComponentFactory). Suggestion: add 'tools:replace="android:appComponentFactory"' to element at

all com.android.support libraries must use the exact same version specification when adding google plya-services

亡梦爱人 提交于 2019-12-11 14:19:40
问题 When adding google play-services library so I can add in a map I got this error: all com.android.support libraries must use the exact same version specification My dependencies are as follows: dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation 'com.android.support:appcompat-v7:27.1.1' implementation 'com.android.support:design:27.1.1' implementation 'com.android.support:cardview-v7:27.1.1' implementation 'com.android.support.constraint:constraint-layout:1.0

android-support-v7-appcompat has same attrs as actionbarsherlock library

空扰寡人 提交于 2019-12-11 13:57:12
问题 I'm trying to get chromecast integration in my app but I'm having build issues when I add the android-support-v7-appcompat to my project. Basically it has an attrs.xml file that has the same values as the actionbarsherlock attrs.xml file. Is there anyway around this? This seems kind of ridiculous that different libraries can possibly conflict resource values. 回答1: I just encounter the same problem and had a hard time for several hours figuring this out. this is how I solved it. You usually