android-appcompat

AppCompat v7 Toolbar “Error inflating class <unknown>”

你离开我真会死。 提交于 2019-12-24 08:15:18
问题 I need to use new Toolbar feature introduced in AppCompat V7:21 after reading SO thread here and android blog post here. I exacctly copied Toolbar snippet from the blogpost to my layout: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <android.support.v7.widget.Toolbar <-

Unity Android with AppCompat Rejecting re-init on previously-failed class java.lang.Class

廉价感情. 提交于 2019-12-24 05:27:29
问题 Hi I am building a Unity app which uses Android library as one of the plugin. This Android library uses AppCompat. Reading from the Unity blog, I realized that Unity does not include the appcompat library during the building due to several reasons (mainly the APK size) but it still allow the library to be added manually. (blog here: http://blogs.unity3d.com/2015/07/16/android-themes-in-unity/) Thus I've added the library inside Assets/Plugins/Android/ which then my Unity app is able to build

appcompat_v7 errors

时光毁灭记忆、已成空白 提交于 2019-12-24 02:32:41
问题 I've found out that Material support library (an updated appcompat-v7) is coming on October 17. Today I've tried to create an android project, but I've got about 100 errors connected to the Material design. Something like that: error: Error retrieving parent for item: No resource found that matches the given name '@android:TextAppearance.Material.SearchResult.Subtitle'. styles_base.xml /appcompat_v7/res/values-v21 line 168 Android AAPT Problem Please, help me, how to resolve this problem? 回答1

How to get Lollipop “hamburger” as drawer icon in standard Fragment app (without use AppCompat)?

橙三吉。 提交于 2019-12-23 20:00:26
问题 When i use AppCompat lib (v21) i got ActionBar with new style of "hamburger" icon. Is possible to get the same behaviour, but not using AppCompat. I'd like to have standard Holo.Light theme with new "hamburger" (drawer) icon in ActionBar. 回答1: You can get the assets you want from the official github account of Google Here the link for the xxhdpi density ic_menu_white xxhdpi And set it to your Action bar with the method setIcon() 来源: https://stackoverflow.com/questions/28664124/how-to-get

Failed to resolve attribute at index 13 at android.content.res.TypedArray.getDrawable()

旧城冷巷雨未停 提交于 2019-12-23 16:27:31
问题 My android app runs on a sdk 23 emulator just perfectly, but when I tried to run it on a tablet with sdk version 21, I got this exception: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.detactapp.detactapp/com.example.detactapp.detactapp.Home}: java.lang.RuntimeException: Failed to resolve attribute at index 13 at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2298) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java

Android Toolbar color change

◇◆丶佛笑我妖孽 提交于 2019-12-23 15:44:52
问题 I have an app which uses android.support.v7.widget.Toolbar . Every section of the app is a Fragment accessed through a support.v4.widget.DrawerLayout I need to change the Toolbar color depending on which section is shown (client particular needs). I defined some colors in the colors.xml so I can make something like: changeToolbarColor(R.color.section_one); /**/ private void changeToolbarColor(int color_res_id){ Integer colorTo = getResources().getColor(color_res_id); toolbar

Changing app theme without recreating activity

↘锁芯ラ 提交于 2019-12-23 15:21:58
问题 I have a custom theme with Theme.AppCompat.DayNight.NoActionBar as the parent with resources for both day and night modes. In the documentation, there is a method provided to change the theme and unless the current activity is recreated, the theme will only change the next time that activity is launched. Twitter and Pocket on the other hand change the themes without recreating the activity the user is on. How can i achieve this? 回答1: Twitter and Pocket on the other hand change the themes

while using support library i am getting an error that Attribute “ ” has already been defined in android

时光毁灭记忆、已成空白 提交于 2019-12-23 09:36:54
问题 I am using android version 4.2.2(API 17) and i am getting a lot of errors in the console.The errors are in the format of [[[Attribute " " has already been defined in android]]] inside the quotes a lot of values present.For example title,height,isLightTheme,windowActionBar color,spinBars,drawableSize,gapBetweenBars,topBottomBarArrowSize etc..... The console is shown below..... [2014-12-18 10:22:16 - sample] /mnt/D/workspaceinnerimage1/appcompat_v7/res/values/attrs.xml:28: error: Attribute

Button BackgroundTint not working with AppCompat v23

时光毁灭记忆、已成空白 提交于 2019-12-23 09:34:11
问题 I'm trying to use AppCompat v23 so that I have full Button coloring using BackgroundTint. I have added compile 'com.android.support:appcompat-v7:23.0.+' to my app's build.gradle file. I have my app theme set with android:theme="@style/AppTheme" in AndroidManifest.xml In styles.xml I have: <resources> <!-- Base application theme. --> <style name="AppTheme" parent="Theme.AppCompat.Light"> <!-- Customize your theme here. --> </style> </resources> I'm not trying to override anything, I'm just

Xamarin Border Radius AppCompat

我只是一个虾纸丫 提交于 2019-12-23 07:59:07
问题 It seems that the BorderRadius attribute is not working when including AppCompat in the project. I tried to create a custom render like this discussed here, but it didn't work: namespace Xamarin.Forms { public class CustomButton : Button { public CustomButton():base() { } protected override void OnParentSet() { base.OnParentSet(); } } } In the Android project: [assembly: ExportRenderer(typeof(CustomButton), typeof(CustomButtonRenderer))] namespace CalculateurMadelin.Droid.Renderers { public