android-appcompat

Error on importing an Eclipse project into Android Studio

ε祈祈猫儿з 提交于 2020-01-01 03:35:11
问题 I'm trying to import a project done in Eclipse to Android Studio. While importing, I'm getting the following error: "There are unrecoverable errors which must be corrected first" Library reference ../../../../workspace/android-support-v7-appcompat could not be found I tried copying appcompat folder to the root directory of project, still same error. How can I resolve it? Please refer the screenshot for more details 回答1: Finally, I found a way..I opened the project.properties file in a text

AppCompat v22.1.0 not theming all xml widgets correctly for fragments

放肆的年华 提交于 2019-12-31 17:38:17
问题 When using xml based layouts using AppCompat 22.1.0 not all supported widgets are tinted or material themed for my Fragments using Android 4.4. I see this behavior with the following widgets (others not tested): RadioButton (No tint color) CheckBox (No tint color) Spinner (Device default theme is applied) EditText (Device default theme is applied) RatingBar (Device default theme is applied) Button (Device default theme is applied) It used to work in AppCompat v22.0.0. Screenshot (left 4.4,

Already Defined Error when building with gradle

社会主义新天地 提交于 2019-12-31 07:41:40
问题 I imported an old project from ANT to Gradle. I included all libraries and tride build but i have problem: E:\gradle\DriverClient\app\build\intermediates\exploded-aar\com.google.android.gms\play-services-wallet\7.8.0\res\values\wallet_colors.xml Error:(2) Attribute "titleTextStyle" has already been defined Error:(2) Attribute "subtitleTextStyle" has already been defined Error:(2) Attribute "divider" has already been defined Error:(2) Attribute "background" has already been defined Error:(2)

How to change the navigation icon color

和自甴很熟 提交于 2019-12-31 05:40:12
问题 I have a navigationView in my app and after add two lines in app style : <item name="windowActionBar">false</item> <item name="windowNoTitle">true</item> The Navigation icon color changed to black and for this problem i added this line in style : <item name="android:textColorSecondary">@android:color/white</item> Now navigation icon is white again but now i have a new problem . With above code , the title of navigation items is change color too. I didn't find a solution to this Interference

Android “You need to use a Theme.AppCompat theme (or descendant) with the design library”

三世轮回 提交于 2019-12-30 17:44:54
问题 Ok , im getting this error (title) . Many post suggested me (even Android studio) to change the theme , to App.Appcompat , i have done it . Manifest file : <uses-permission android:name="android.permission.INTERNET" /> <application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:supportsRtl="true" android:theme="@style/Theme.AppCompat"> <activity android:name=".activity.MainActivity" android:label="@string/app_name" android:theme="@style

Android “You need to use a Theme.AppCompat theme (or descendant) with the design library”

你。 提交于 2019-12-30 17:44:05
问题 Ok , im getting this error (title) . Many post suggested me (even Android studio) to change the theme , to App.Appcompat , i have done it . Manifest file : <uses-permission android:name="android.permission.INTERNET" /> <application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:supportsRtl="true" android:theme="@style/Theme.AppCompat"> <activity android:name=".activity.MainActivity" android:label="@string/app_name" android:theme="@style

Android AppCompat requires API level 11

元气小坏坏 提交于 2019-12-30 08:13:10
问题 I have an app that uses the AppCompat support libary for ActionBars . Now I tried to create a new themes.xml file with some style for that purpose. <!-- Application theme. --> <style name="AppTheme" parent="@style/Theme.AppCompat.Light.DarkActionBar"> <item name="android:actionBarStyle">@style/MyActionBar</item> <item name="actionBarStyle">@style/MyActionBar</item> </style> So just the same way it is done here: http://developer.android.com/guide/topics/ui/actionbar.html#StyleExample However,

Generate APKLIB of compatibility-v7-appcompat

无人久伴 提交于 2019-12-30 06:43:10
问题 I want to start using the new ActionBar of the appcompat-v7 support library, and I'm using maven . I tried to create an apklib. These are the steps I followed: Create a ZIP file of the project android-sdks/extras/android/support/v7/appcompat Rename the ZIP file with an APKLIB extension. Install the APKLIB file into my local repository: C:....m2\repository\android\support\compatibility-v7-appcompat\18>mvn install:install-file -Dfile=appcombat.apklib -DgroupId=android.support -DartifactId

HomeAsUp Button has no effect in Android 4.2.2 with Appcompat 21.0.0

孤街醉人 提交于 2019-12-30 05:22:11
问题 I'm using Toolbar from Appcompat 21 instead of standard actionbar, everything goes smoothly except that the HomeAsUp Button in an extra activity has no effect. When I open the PrefsActivity (code snippets below), the HomeAsUp button shows normally (a small left arrow), When I click the button, from the code, I want it "finish", but it just remains no change. When I add the onCreateOptionsMenu function to BaseActivity and inflate the global.xml which only has one menu entry Settings , the

NullPointerException with AppCompat BottomSheets

吃可爱长大的小学妹 提交于 2019-12-29 08:27:54
问题 LinearLayout bottomSheetViewgroup = (LinearLayout) findViewById(R.id.bottomSheet); bottomSheetBehavior = BottomSheetBehavior.from(bottomSheetViewgroup); bottomSheetBehavior.setState(BottomSheetBehavior.STATE_EXPANDED); //this line I have this code within my activity's onCreate() method and I'm getting the below NPE exception when the last line is executed: Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object java.lang.ref.WeakReference.get()' on a null