草庐IT

crypt-style

全部标签

android - 在 TextView/EditText 上使用 "android:textAppearance"失败,但 "style"有效

这是一个XML中的示例TextView,它将正确地将样式TextContactContactName应用于TextView。现在,我要在这个元素上设置其他一些与文本无关的东西。因此,我尝试移动TextContactContactName并通过“android:textAppearance”应用它不幸的是,没有应用文本格式。这是样式(存储在res/values/styles-text.xml中)的样子:24sp#333333#ffffff011我使用textAppearance标签有错吗?我在Android2.2-HTCDesire上进行了测试。 最佳答案

android - 在 TextView/EditText 上使用 "android:textAppearance"失败,但 "style"有效

这是一个XML中的示例TextView,它将正确地将样式TextContactContactName应用于TextView。现在,我要在这个元素上设置其他一些与文本无关的东西。因此,我尝试移动TextContactContactName并通过“android:textAppearance”应用它不幸的是,没有应用文本格式。这是样式(存储在res/values/styles-text.xml中)的样子:24sp#333333#ffffff011我使用textAppearance标签有错吗?我在Android2.2-HTCDesire上进行了测试。 最佳答案

android - Textview : using the dialog title style: @android:style/TextAppearance. DialogWindowTitle

我目前正在尝试构建自己的DialogFragment主题。我的一个要求是在标题右侧使用一个图标。第一个想法只需使用:this.getDialog().getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE,R.layout.dialog_title);但是很遗憾,这行代码没有结果。第二个想法用这个textview提供我自己的布局-this.setContentView()-:这行得通,因为我可以阅读文本,但它仍然以默认的黑色字体书写。我期待TextAppearance.DialogWindowTitle给我的文本一个标题外观(Holo

android - Textview : using the dialog title style: @android:style/TextAppearance. DialogWindowTitle

我目前正在尝试构建自己的DialogFragment主题。我的一个要求是在标题右侧使用一个图标。第一个想法只需使用:this.getDialog().getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE,R.layout.dialog_title);但是很遗憾,这行代码没有结果。第二个想法用这个textview提供我自己的布局-this.setContentView()-:这行得通,因为我可以阅读文本,但它仍然以默认的黑色字体书写。我期待TextAppearance.DialogWindowTitle给我的文本一个标题外观(Holo

Android Material 设计 : Failed to find style 'toolbarStyle' in current theme

我正在尝试使用具有自定义样式的android21中的工具栏小部件,但我无法摆脱此错误:在当前主题中找不到样式“toolbarStyle”。这是我的布局xml文件:这里是患者主题:@color/patient_primary@color/patient_primary_dark@color/patient_accent我还尝试在主题的项目中添加toolbarStyle,但我不知道可能的值。我错过了什么吗? 最佳答案 虽然我的xml是正确的,但我遇到了同样的问题事件。解决方案是:在主题选择复选框中设置AppCompat主题,见图。

Android Material 设计 : Failed to find style 'toolbarStyle' in current theme

我正在尝试使用具有自定义样式的android21中的工具栏小部件,但我无法摆脱此错误:在当前主题中找不到样式“toolbarStyle”。这是我的布局xml文件:这里是患者主题:@color/patient_primary@color/patient_primary_dark@color/patient_accent我还尝试在主题的项目中添加toolbarStyle,但我不知道可能的值。我错过了什么吗? 最佳答案 虽然我的xml是正确的,但我遇到了同样的问题事件。解决方案是:在主题选择复选框中设置AppCompat主题,见图。

android - 错误 : style attribute '@android:attr/windowExitAnimation' not found

我最近升级到了gradle-3.0.0-alpha8,之后有些样式在编译时没有解析。开发环境:IDE:Androidstudio3.0Bate3Gradle构建工具:'com.android.tools.build:gradle:3.0.0-beta3'Gradle:gradle-4.1-all.zip错误信息:Error:(94,5)styleattribute'@android:attr/windowExitAnimation'notfoundError:(94,5)styleattribute'@android:attr/windowEnterAnimation'notfound

android - 错误 : style attribute '@android:attr/windowExitAnimation' not found

我最近升级到了gradle-3.0.0-alpha8,之后有些样式在编译时没有解析。开发环境:IDE:Androidstudio3.0Bate3Gradle构建工具:'com.android.tools.build:gradle:3.0.0-beta3'Gradle:gradle-4.1-all.zip错误信息:Error:(94,5)styleattribute'@android:attr/windowExitAnimation'notfoundError:(94,5)styleattribute'@android:attr/windowEnterAnimation'notfound

Android 布局错误 : "Resource id <res_id> is not of type STYLE (instead attr)"

我看到一个我以前从未见过的错误,它阻止了我的一些布局文件在Eclipse中呈现。它们在运行时渲染良好。图形布局编辑器(和我的错误日志)中显示的错误是:“资源id0x1010081不是STYLE类型(而是attr)”我在我的R文件中搜索了资源id0x1010081,但我找不到它,所以我猜测也许我与内置的Androidattr有冲突。我还验证了我下面的所有样式属性都指向实际样式而不是attr。任何帮助表示赞赏。这是我的完整布局代码:这是我的styles.xml:bold@dimen/text_xxlarge@string/arrow_rightbold@color/white@drawab

Android 布局错误 : "Resource id <res_id> is not of type STYLE (instead attr)"

我看到一个我以前从未见过的错误,它阻止了我的一些布局文件在Eclipse中呈现。它们在运行时渲染良好。图形布局编辑器(和我的错误日志)中显示的错误是:“资源id0x1010081不是STYLE类型(而是attr)”我在我的R文件中搜索了资源id0x1010081,但我找不到它,所以我猜测也许我与内置的Androidattr有冲突。我还验证了我下面的所有样式属性都指向实际样式而不是attr。任何帮助表示赞赏。这是我的完整布局代码:这是我的styles.xml:bold@dimen/text_xxlarge@string/arrow_rightbold@color/white@drawab