草庐IT

font-style

全部标签

android - 文件 style.xml 中不支持的 Node 'item'

Executionfailedfortask':app:mergeDebugResources'.Unsupportednode'item'infile我有这种错误和我找到的答案here无法回答我的问题。这是我的styles.xml@color/PrimaryColor@color/PrimaryDarkColor@android:color/transparentsans-serif-light@android:color/white50sp#8000522sans-serif-condensed20sp 最佳答案 错误在这一行每

java - android ListView 中的 Font Awesome 不起作用

所以我创建了这个自定义数组适配器:Viewrow=convertView;ViewHolderholder;iconFont=Typeface.createFromAsset(activity.getAssets(),"fontawesome-webfont.ttf");if(row==null){LayoutInflaterlayoutInflater=(LayoutInflater)activity.getSystemService(Context.LAYOUT_INFLATER_SERVICE);row=layoutInflater.inflate(R.layout.event_

android - 无法在带有大文本 : "Font size too large to fit in cache" 的 Android TextView 中显示 Unicode 字符(表情符号)

我试图在TextView中显示单个Unicode字符(表情符号),文本大小较大:mEmojiTextView=(TextView)findViewById(R.id.emoji_text_view);mEmojiTextView.setTextSize(200);mEmojiTextView.setText("\uD83D\uDE01");字符没有出现在屏幕上,我在logcat中得到这个错误:E/OpenGLRenderer﹕Fontsizetoolargetofitincache.width,height=545,513有效的最大尺寸是mEmojiTextView.setTextSi

android - Html.fromHtml 函数的 "font"标记中有哪些字体可用?

Html.fromHtml几乎没有任何关于它支持哪些标签的文档。据说在很多网站上它确实支持“font”标签(比如here),但是在这个标签中设置“face”属性时我找不到可用的字体。我可以假定哪些字体始终可用?其中哪些仅来自特定的Android版本?某处有他们的名单吗?编辑:似乎答案应该在“/system/etc/fonts.xml”文件中。这是它在Android6.0.1上的内容:Roboto-Thin.ttfRoboto-ThinItalic.ttfRoboto-Light.ttfRoboto-LightItalic.ttfRoboto-Regular.ttfRoboto-Ital

android - 错误 :Execution failed for task ':app:processDebugResources' when using font folder inside res

我已将SDK更新到AndroidO开发者预览版,并开始使用单个TextView进行简单演示。当我在res文件夹中包含font时,它开始显示Error:Executionfailedfortask':app:processDebugResources'.>com.android.ide.common.process.ProcessException:Failedtoexecuteaapt这是我的build.gradleandroid{compileSdkVersion25buildToolsVersion"25.0.2"defaultConfig{...minSdkVersion15ta

android - 在工具栏上 app :popupTheme ="@style/AppTheme.PopupOverlay" do? 是什么

我正在修改我的一个旧应用程序,我注意到我的工具栏有app:popupTheme="@style/AppTheme.PopupOverlay"但我不完全确定它会影响什么?我已经更改了使用该名称定义的样式的颜色,但在屏幕上没有看到任何变化。谢谢。 最佳答案 PopupOverlay主题应用于溢出菜单弹出窗口。https://developer.android.com/reference/android/widget/PopupMenu.html 关于android-在工具栏上app:popu

android - Gradle 构建 : resource android:style/TextAppearance. 未找到 Material

我刚刚安装了AndroidStudio并导入了一个旧的EclipseADT项目(API级别18)。但是,当尝试在AndroidStudio中构建此项目时,出现以下错误:resourceandroid:style/TextAppearance.Materialnotfound.resourceandroid:style/TextAppearance.Material.Body1notfound.resourceandroid:style/TextAppearance.Material.Body2notfound.resourceandroid:style/TextAppearance.M

android - android中textAppearance的默认值是:theme ="@style/AppTheme" textAppearanceSmall?

新建android项目时,默认的Theme是android:Theme.Light,发现TextView控件的字体偏小,是不是说android:theme="@style/AppTheme"中textAppearance的默认值是textAppearanceSmall?谢谢! 最佳答案 您可以在默认的styles.xml文件中找到用于所有Android小部件的样式。例如,您可以在此处查看此文件:https://github.com/android/platform_frameworks_base/blob/master/core/r

android - 如何在 android 中的 style.xml 文件中设置 CardView 属性

我在style.xml文件中为我的CardView设置了样式但它给我app:cardCornerRadius、app:cardElevation、app:cardPreventCornerOverlap和app:contentPadding属性的编译时间错误。在Android中为CardView设置样式的正确方法是什么?下面是我的一些代码:@dimen/cardMarginVertical@dimen/cardMarginVertical@dimen/cardMarginHorizontal@dimen/cardMarginHorizontal2dp2dpfalse0dpmatch_p

android - AppCompat Material Style 部件色调错误

我正在使用appcompat_v7库。在文档中说:[...]AppCompat在早期版本的Android上为一部分UI小部件提供了类似的行为:AppCompat工具栏提供的一切(操作模式等)编辑文本微调器复选框单选按钮切换(使用新的android.support.v7.widget.SwitchCompat)CheckedTextView您不需要做任何特别的事情来使这些工作正常,只需像往常一样在您的布局中使用这些控件,AppCompat将完成剩下的工作(有一些注意事项;请参阅下面的常见问题解答)。这是我的代码:值/styles.xml@color/material_blue_grey_