`

Android Text控件之属性:android:textAppearance

 
阅读更多

android之系统自带的文字外观设置及实际显示效果图

android:textAppearance

xml布局里面设置文字的外观:

如“android:textAppearance=“?android:attr/textAppearanceLargeInverse”这里引用的是系统自带的一个外观,

?表示系统是否有这种外观,否则使用默认的外观。

可设置的值如下:

textAppearanceButton/

textAppearanceInverse/

textAppearanceLarge/

textAppearanceLargeInverse/


textAppearanceMedium/

textAppearanceSmallInverse/

textAppearanceMediumInverse/
textAppearanceSmall/

或是在JAVA代码中:

textAppearance代码的设置

<wbr></wbr>

nameText.setTextAppearance(getApplicationContext(), R.style.BlueText);

<wbr></wbr>

<!-- Blue Color -->
   <style name="BlueText">
        <item name="android:textColor">#4871A8</item>
        <item name="android:textStyle">bold</item>
    </style>


分享到:
评论

相关推荐

    深入理解Android中的xmlns:tools属性

    因此为了在ide中预览效果,你必须在xml中为TextView控件设置android:text属性 &lt;TextView android:id=@+id/text_main android:layout_width=match_parent android:layout_height=wrap_content android:...

    Android开发EditText属性.txt

     android:typeface设置文本字体,必须是以下常量值之一:normal 0, sans 1, serif 2, monospace(等宽字体) 3]  android:height设置文本区域的高度,支持度量单位:px(像素)/dp/sp/in/mm(毫米)  android:...

    Android textAppearanceDemo

    Android TextView 属性 textAppearance的各种文字显示效果Demo

    AndroidIndicators-实现了标题指示器和tab的ViewPager指示器.zip

     xmlns:android="http://schemas.android.com/apk/res/android"  android:layout_width="match_parent"  android:layout_height="match_parent"  android:orientation="vertical" &gt;    android:...

    DragNDropList-带拖动排序功能的ListView.zip

     xmlns:android="http://schemas.android.com/apk/res/android"  android:layout_width="match_parent"  android:layout_height="match_parent"  android:orientation="vertical"&gt;    android:id="@id/...

    Android_RingButton:Android RingButton 示例应用

    可以通过属性 textAppearance 更改自定义文本的样式 环中心有透明区域(内径圆) 按钮颜色可以通过自己的属性 ringBackgroundColor 改变 按钮(整个区域,包括透明)响应按下(颜色反转 - 文本采用背景颜色,背景...

    安卓java读取网页源码-NotePad:记事本

    android:id="@+id/text1_time" android:layout_width="match_parent" android:layout_height="wrap_content" android:textAppearance="?android:attr/textAppearanceSmall" android:textColor="#ffffff" android:...

    ThemeNStyle:Android上的样式和主题设置(不疯狂)

    StyleNTheme 设置样式有两种方法:对于单个视图,通过将样式属性添加到布局的XML的View元素中。 或者,对于整个Activity或...style name =“ GreenText” parent =“ @ android:style / TextAppearance”&gt;#00FF

    Android:安卓应用

    style name="MiEstilo" parent="@android:style/TextAppearance.Medium"&gt; match_parent wrap_content #00FF00 monospace &lt;/style&gt; 用: 当您有 TextView 或其他: &lt;TextView xss=removed&gt;&lt;style name=...

    修改Android App样式风格的方法

    android中可以自定义主题和风格。风格,也就是style,我们可以将一些统一的属性拿出来,比方说,长,宽,字体大小,字体颜色等等...style name=”MyText” parent=”@android:style/TextAppearance”&gt; &lt;item nam

    appcompat-v7

    style Widget_AppCompat_ActionBar_TabText style Widget_AppCompat_ActionBar_TabView style Widget_AppCompat_ActionButton style Widget_AppCompat_ActionButton_CloseMode style Widget_AppCompat_ActionButton_...

    追踪Android

    该项目是的Android实现,这是一个材料研究,展示了使用Android的Material Theming和Material Components的可能性。 屏幕截图 物质主题 Reply使用Material Theming来自定义应用程序的,和。 颜色 回复使用简单,微妙...

    CenterTitleToolbar:标题居中的Toolbar

    CenterTitleToolbar支持设置title的color,textAppearance 用法 CenterTitleToolbar直接继承自Toolbar,所以跟Toolbar的用法完全一样 &lt;com.benio.toolbar.CenterTitleToolbar android:id="@+id/toolbar" ...

    解决Android V7后自定义Toolbar、ActionBar左侧有空白问题

    style name=Base.Widget.AppCompat.Toolbar parent=android:Widget&gt; &lt;item name=titleTextAppearance&gt;@style/TextAppearance.Widget.AppCompat.Toolbar.Title &lt;item name=subtitleTextAppearance&gt;@style/...

    谷歌师兄的leetcode刷题笔记-Sweet-Bank:SweetBank是Kotlin中的一个Android应用程序,我开发它来尝试移动开

    谷歌师兄的leetcode刷题笔记 甜蜜银行 :candy: Sweet Bank 是Kotlin中的一个 Android 应用程序,我开发它是为了...黑暗的主题,使用Theme.MaterialComponents.DayNight.NoActionBar和排版系统,采用TextAppearance.Md

    PasswordFloatingLabelLayout

    具有自定义行为的 FloatingLabelLayout 从 FloatingLabelLayout 分叉,该库根据可定制的标准... app : floatLabelTextAppearance = " @style/TextAppearance.YourApp.FloatLabel " app : showStateIcon = " true

    testdemo:asdsasdasd

    接口演示此示例是一些 GDK API 用法的图库: Card 和 CardScrollView 手势检测器使用 textAppearance 进行主题化LiveCard 中的 OpenGL入门查看我们的文档以了解如何开始使用在 Glass 上运行示例您可以使用您的 IDE ...

    gdk-apidemo-sample-master:gdk init 的示例 API

    接口演示此示例是一些 GDK API 用法的图库: Card 和 CardScrollView 手势检测器使用 textAppearance 进行主题化LiveCard 中的 OpenGL入门查看我们的文档以了解如何开始使用在 Glass 上运行示例您可以使用您的 IDE ...

    gdk-apidemo-sample:演示 GDK 中各种功能的示例项目

    使用 textAppearance 进行主题化 LiveCard 中的 OpenGL 入门 查看我们的文档以了解如何开始使用 在 Glass 上运行示例 您可以使用您的 IDE 来编译和安装示例或在命令行上使用 : $ adb install -r ApiDemo.apk 要...

Global site tag (gtag.js) - Google Analytics