草庐IT

hugo-theme-stack

全部标签

android - "Failed to find style with id 0x7f070001 in current theme"使用 CardView android L (api 21) 时

我刚刚下载并开始学习androidLmaterialdesignapi。每当我在我的Activity中使用CardView时,它都会给我这个错误Failedtofindstylewithid0x7f070001incurrenttheme。这是我的xml布局:这是我的list文件:这是它显示的确切消息:Missingstyles.Isthecorrectthemechosenforthislayout?UsetheThemecomboboxabovethelayouttochooseadifferentlayout,orfixthethemestylereferences.Failed

android - 无法解决@style/Theme.Sherlock

我正在尝试使用ActionbarSherlock4,针对sdk15和minsdk8。按照使用网站上提供的说明和此处发布的精彩视频进行操作后:http://www.youtube.com/watch?v=avcp6eD_X2k我仍然遇到问题。当我尝试将android:theme="@style/Theme.Sherlock"添加到list文件时,我收到错误:Noresourcefoundthatmatchesthegivenname(at'theme'withvalue'@style/Theme.Sherlock').我已将actionbarSherlock库项目包含到我的项目中,并且导

android - 错误 : Theme. 半透明和 FLAG_ACTIVITY_REORDER_TO_FRONT

我有一个半透明主题的Activity:android:theme="@android:style/Theme.Translucent.NoTitleBar"这个问题也可以通过这个主题重现:true@android:color/transparent@null此Activity在启动时加载并保存在内存中(当我启动此Activity时,我将FLAG_ACTIVITY_REORDER_TO_FRONT标志添加为额外的)。问题:当我(从菜单)开始这个Activity时,Activity没有出现,什么也没有发生。但是:如果我删除半透明主题:一切正常,Activity将回到前面。是onNewInt

android - 带有 Theme.Sherlock.Light 的 AlertDialog 上深色背景上的深色文本

我正在为我的应用程序使用Theme.Sherlock.Light主题,并且正在创建一个带有底层AlertDialog的DialogFragment。它在Android3.x和4.x上运行良好,但在Android2.x上,我在深色背景上看到深色文本,难以阅读。我做错了什么,我是否需要通过创建自定义样式来强制使用浅色背景?提前致谢。 最佳答案 我找到了解决方案here:builder.setInverseBackgroundForced(true)另外,正如我所见here,JakeWarton建议用同样的方法修复它,但由于AlertDi

android - 使用 Volley 进行异步发布时抛出 OutOfMemoryError "pthread_create (1040KB stack) failed: Try again"

我正在使用Volley将存储在本地数据库中的一些数据发布到服务器。问题是当我有大量条目(例如500)时,我会收到此错误:java.lang.OutOfMemoryError:pthread_create(1040KBstack)failed:Tryagainatjava.lang.Thread.nativeCreate(NativeMethod)atcom.android.volley.RequestQueue.start(RequestQueue.java:141)atcom.android.volley.toolbox.Volley.newRequestQueue(Volley.j

android - 如何将 ActionBarActivity 与 Theme.Material 一起使用

我创建了一个针对L预览的新项目。sdk生成的启动Activity扩展了ActionBarActivity,但是,当我尝试运行准系统生成的Activity时,它会引发以下异常:Causedby:java.lang.IllegalStateException:YouneedtouseaTheme.AppCompattheme(ordescendant)withthisactivity.atandroid.support.v7.app.ActionBarActivityDelegate.onCreate(ActionBarActivityDelegate.java:110)atandroid

Android:Theme.Holo.Light.NoActionBar vs Theme.Light.NoTitleBar

在res/values-v11/styles.xml中,我不能使用Theme.Holo.Light.NoActionBar因为它是在API级别13中添加的。可以我使用Theme.Light.NoTitleBar代替,没有视觉差异?据我所知,它们都应该有白色背景、状态和导航栏,没有别的。 最佳答案 Theme.Light.NoTitleBar略有不同。解决此问题并保持与Honeycomb兼容的最简单方法是创建您自己的样式来扩展Theme.Holo.Light,但删除操作栏。只需创建具有以下定义的样式:falsetrue

android - 找不到与给定名称匹配的资源 'android:Theme.Material.Light.DarkActionBar'

我尝试将我的HelloWorld应用程序全息主题更改为Material.Light.DarkActionBar主题(正如What'snewAndroidDevelopmenttoolssession所说)。但我得到了以下错误。我尝试将目标SDK版本更改为21。但我们在SDK管理器中没有21SDK。他们说,在那次session上,为v-21设置样式xml。values/styles.xmlvalues-v21/styles.xml!--Baseapplicationtheme.-->build.gradleapplyplugin:'com.android.application'andr

android - 为警报对话框设置 Android Theme.Light

我正在尝试为我的警报对话框设置androidTheme.Light主题,但到目前为止没有成功。在阅读了一些教程后,我发现使用AlertDialog.Builder我们无法直接在构造函数中设置主题(至少在API级别7中)。我发现的替代解决方案是使用ContextThemeWrapper,每个人都保证会解决我的问题。所以我编写了这样的代码:AlertDialog.Builderbuilder=newAlertDialog.Builder(newContextThemeWrapper(context,R.style.popup_theme));我在values文件夹中描述了我的主题:#fff

android - 无法解析 style.xml 中的符号 'Theme.AppCompat.Light.DarkActionBar'

Theme.AppCompat.Light.DarkActionBar未在styles.xml中编译。我在应用模块中添加了compile'com.android.support:appcompat-v7:25.1.0'build.gradle。我在谷歌搜索过解决方案。其中很多是关于更改Project的build.gradle中的类路径。仍然显示相同的错误。build.gradledependencies{compile'com.android.support:appcompat-v7:25.1.0'compile'com.android.support:design:25.1.0'co