【发布时间】:2016-04-11 00:26:10
【问题描述】:
我有以下 xml:
<RelativeLayout
android:id="@+id/exerciseNameLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:alpha="1"
android:clickable="true">
<Button
android:id="@+id/exerciseNameButton"
android:layout_width="match_parent"
android:layout_height="@dimen/button_height"
android:background="@drawable/button_no_bottom_border"
android:text="@string/exercise_name"
android:textAllCaps="false"
android:textColor="@color/selected"
android:textSize="@dimen/button_font_size"
android:gravity="center_vertical"
android:paddingLeft="15dp"/>
<TextView
android:id="@+id/Label1"
android:layout_width="100dp"
android:layout_height="30dp"
android:layout_alignParentRight="true"
android:layout_marginRight="20dp"
android:layout_marginTop="5dp"
android:text="10 X 10"
android:paddingRight="10dp"
android:textColor="@color/unselected"/>
</RelativeLayout>
文本视图在 Android 5.1.1 中不显示,但在 android 版本 中可见
我不知道如何解决这个问题。 我还发现我什至在预览中都看不到它。虽然我可以从预览中选择它,但没有出现文本 10X10。
【问题讨论】:
-
您尝试更改 textColor 吗?
-
是的,我确实更改了文本颜色,但没有帮助
标签: android xml textview visibility android-5.1.1-lollipop