Android-单选按钮不显示其文本
我的应用程序有一个单选按钮组作为RelativeLayout的一部分。我的问题是单选按钮没有显示文本。我得到的只是按钮本身 以下是XML:Android-单选按钮不显示其文本,android,xml,text,radio-button,Android,Xml,Text,Radio Button,我的应用程序有一个单选按钮组作为RelativeLayout的一部分。我的问题是单选按钮没有显示文本。我得到的只是按钮本身 以下是XML: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/setupTabLayout" android:scaleTyp
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/setupTabLayout"
android:scaleType="fitXY"
android:background="#ffffff"
android:layout_height="fill_parent"
android:layout_width="fill_parent"
android:baselineAligned="true"
android:orientation="vertical">
<TextView android:id="@+id/textView1"
android:text="Total Points"
android:textColor="#000000"
android:textSize = "30sp"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:paddingBottom="5px"
android:layout_gravity="top"
android:layout_alignParentLeft="true"
></TextView>
<EditText android:id="@+id/editTextTotal"
android:text=""
android:digits="-0123456789."
android:windowSoftInputMode="stateVisible"
android:focusable="true"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignTop="@+id/textView1"
android:layout_alignBottom="@+id/textView1"
android:layout_toRightOf="@+id/textView1"
></EditText>
<RadioGroup android:id="@+id/radioGroup1"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_alignParentLeft="true"
android:layout_above="@+id/textView2"
>
<RadioButton android:id="@+id/radioButton1"
android:checked="true"
android:text="Points"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
></RadioButton>
<RadioButton android:id="@+id/radioButton2"
android:text="Points"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_toRightOf="@+id/radioButton1"
></RadioButton>
</RadioGroup>
<TextView android:id="@+id/textView2"
android:text="Points Per = "
android:textColor="#000000"
android:textSize = "30sp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingBottom="5px"
android:layout_above="@+id/numberPadLayoutContainer"
android:layout_alignParentLeft="true"
></TextView>
<EditText android:id="@+id/editTextPoints"
android:text=""
android:digits="-0123456789."
android:windowSoftInputMode="stateVisible"
android:focusable="true"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignTop="@+id/textView2"
android:layout_alignBottom="@+id/textView2"
android:layout_toRightOf="@+id/textView2"
></EditText>
<include layout="@layout/numerickeyboard" />
</RelativeLayout>
你知道为什么没有显示文本吗?你的
布局
背景是白色的,单选按钮上的文本也是白色的。它们会显示出来,但你看不到它们
您可以尝试设置android:textColor=“#000”
使te文本变黑。Ahhh。。。这是一个无聊的时刻。有趣的是,当所有其他文本控件的默认颜色看起来都是浅灰色时,默认颜色是白色。谢谢。:-)