簡體   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