我在这个问题上被困了几个小时。
当我运行代码时,我看到了scrollView中的复选框,但我看不到它们的描述文字。
例如,我需要类似的东西
在我的应用中,我只能看到复选框,仅此而已。
我的xml文件
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#000000" >
<ScrollView
android:id="@+id/myScrollLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<LinearLayout
android:id="@+id/linearStoScroll"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:isScrollContainer="true"
android:orientation="vertical" >
<CheckBox
android:id="@+id/Sunday"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/Sunday" />
<CheckBox
android:id="@+id/Monday"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/Monday" />
<CheckBox
android:id="@+id/Tuesday"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/Tuesday" />
<CheckBox
android:id="@+id/Wednesday"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/Wednesday" />
<CheckBox
android:id="@+id/Thursday"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/Thursday" />
<CheckBox
android:id="@+id/Friday"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/Friday" />
<CheckBox
android:id="@+id/Saturday"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/Saturday" />
</LinearLayout>
</ScrollView>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignBottom="@id/myScrollLayout">
<Button
android:id="@+id/ok_button_date"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:onClick=""
android:text="OK" />
<Button
android:id="@+id/cancel_button_date"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:onClick=""
android:text="Cancel" />
</LinearLayout>
</RelativeLayout>
谢谢 / mkounal
答案 0 :(得分:3)
默认情况下,android中的文字颜色为黑色。并且您已将布局 Backcolor 添加为黑色。那怎么可见。?
请
将复选框的文字颜色更改为白色android:textColor = "#FFFFFF"