草庐IT

cnblogs-theme-silence

全部标签

java - 检索项目 :No resource found that matches the given name 'Theme.AppCompat.Light' . 的父项时出错 MY R.java 丢失

谷歌现在有AndroidLollipop,我打开了我的sdk管理器并决定更新几个包......这让我从2天开始感到烦恼。Can'tfindtheme我也试过这个:Failedtorenamedirectory不成功。我试图从谷歌下载一个新的sdk并从头开始安装,但没有成功。这是错误。D:\~\res\values\styles.xml:7:error:Errorretrievingparentforitem:Noresourcefoundthatmatchesthegivenname'Theme.AppCompat.Light'.D:\~\res\values-v11\styles.x

android - 样式操作栏使用 Theme.AppCompat

我正在接受android培训,为操作栏设置样式。由于android:theme=@style/MyActionBar,我遇到了错误。我想知道如何设置操作栏的样式。IllegalStateException:YouneedtouseaTheme.AppCompatthemewiththisactivity我认为错误来自:@style/MyActionBar所以我修改为@style/MyActionBar我有以下错误:error:Errorretrievingparentforitem:Noresourcefoundthatmatchesthegivenname'@android:styl

android - 无法在 AppCompatActivity 中使用 android :Theme. Material

首先我创建了两个样式,一个是value,一个是value-21。在values/styles.xml中是在values-v21/styles.xml中是我的gradle文件(app.gradle)由于ActionBarActivity已弃用,所以我使用AppCompatActivity。当我设置这两个样式值并在MainActivity中扩展AppCompatActivity时,出现异常:java.lang.IllegalStateException:YouneedtouseaTheme.AppCompattheme(ordescendant)withthisactivity.我做了两个

android - `theme`中的 `context.getColor`有什么用?

背景从API23开始,不建议使用获取颜色getColor(仅为其提供资源ID)的小方法:相反,我们被告知也要使用包含Theme参数的方法:ThismethodwasdeprecatedinAPIlevel23.UsegetColor(int,Theme)instead.https://developer.android.com/reference/android/content/res/Resources.html#getColor(int,android.content.res.Resources.Theme)问题Thedocs不用多说theme:https://developer.

Android:如何更改 Theme.Holo.Light.Dialog.MinWidth 中的 DatePickerDialog 颜色?

我使用的是Api14,我发现从我的DataPickerDialog中隐藏日历View的唯一方法是在创建它时使用Theme.Holo.Light.Dialog.MinWidth。但现在我无法更改文本和标题的颜色。ImageofDatePickerDialog如何更改蓝色和确定/取消按钮?styles.xml代码@color/backtext@color/border@color/border@color/backtextDatePickerDialog创建代码:privatevoidInitDatePicker(){CalendarnewCalendar=Calendar.getInst

android - 为 DatePicker 自定义样式 Theme.Holo.Light.Dialog.MinWidth

我正在使用datePicker输入日期。@android:dimen/dialog_min_width_major@android:dimen/dialog_min_width_minor在Activity.java中publicvoidshowDatePickerDialog(Viewv){DialogFragmentnewFragment=newLogin.DatePickerFragment();newFragment.show(getSupportFragmentManager(),"datePicker");}publicstaticclassDatePickerFragme

Android 搜索对话框和建议 ListView : Change theme and colours

我已经实现了一个简单的搜索对话框,它根据此处的指南(通过自定义提供程序)在我的应用程序中执行数据的自定义搜索:http://developer.android.com/guide/topics/search/search-dialog.html问题是搜索栏的颜色和大小(超过操作栏的高度等)在我的应用程序设计中不起作用。我知道如何在我的styles.xml文件中创建主题,但我不知道如何定位Android搜索对话框和建议ListView。有谁知道我该怎么做? 最佳答案 在这个问题上花费了13个小时后,由于某种原因证明这是不可能的。具有视

android - 我的风格有什么问题?无法解析符号 Theme.AppCompat.Light.NoActionBar

目前,我的styles.xml文件显示不正确。Theme.AppCompat.Light.NoActionBar无法解析。我已经重启了androidstudio但它仍然无法正常工作。我尝试了使缓存无效/重新启动,但它不起作用。它不会让我的应用程序崩溃,但它为什么会发生。看下图:这是我的build.gradle文件importorg.apache.tools.ant.taskdefs.condition.Osapplyplugin:'com.android.application'applyplugin:'com.google.gms.google-services'android{co

android - 是什么导致android异常 "You need to use a Theme.AppCompat theme (or descendant) with this activity."

我正在尝试在Android中试用新的MaterialTheme。我目前被这个异常困住了03-0609:35:50.177:D/AndroidRuntime(30607):ShuttingdownVM03-0609:35:50.178:E/AndroidRuntime(30607):FATALEXCEPTION:main03-0609:35:50.178:E/AndroidRuntime(30607):Process:com.example.vivz,PID:3060703-0609:35:50.178:E/AndroidRuntime(30607):java.lang.RuntimeE

android - list 合并失败 : Attribute application@theme

我正在尝试使用thisProgressWheellibrery,但在运行项目后我遇到了这个错误。Error:Executionfailedfortask':app:processDebugManifest'.Manifestmergerfailed:Attributeapplication@themevalue=(@style/AppTheme)fromAndroidManifest.xml:11:9-40isalsopresentat[com.github.Todd-Davies:ProgressWheel:1.2]AndroidManifest.xml:13:9-56value=(