繁体   English   中英

Android Wear卡中的文本大小和颜色是什么

[英]What text size and color in Android Wear card

我需要创建一张自定义卡。 因此,其文字应与Android Wear卡中的默认文字相同。 我使用下一个布局创建自定义卡片

<android.support.wearable.view.CardFrame xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content">

    <FrameLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <TextView
            android:id="@+id/text"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:layout_margin="5dp"
            android:text="@string/card_text_not_on_golf_course"/>

    </FrameLayout>
</android.support.wearable.view.CardFrame>

Android穿戴卡的默认文字: 在此处输入图片说明

在我的应用程序中,我收到以下文本:

在此处输入图片说明

非常感谢你!

大多数标准卡都可以在Design DownloadUI Toolkit中找到。 从中判断Title为#a2a2a2, Description #434343。 字体是Roboto Light或其压缩版本。 我猜字体大小是20 sp,但也可能是16 sp。

我目前无法验证,但我猜有些@android:style/TextAppearance已映射到这些默认样式。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM