单击平板电脑时复选框消失
checkbox disappearing when clicked on tablet
您好,我有一个使用布局清单的简单应用程序。奇怪的是,CheckBox
在我的 Galaxy phone (ANDROID V5.0.1) 上运行良好,但由于某些原因,当我在平板电脑上使用相同的应用程序时 (ANDROID V4.2.2 ) 单击时 CheckBox
消失,任何想法都会有所帮助谢谢!
XML:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="6dip"
android:background="#FFFFFF">
<CheckBox
android:id="@+id/checkBox1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:focusable="false"
android:focusableInTouchMode="false"
android:layout_alignParentTop="true"
android:layout_alignParentEnd="true"
android:layout_marginRight="20dp"
android:buttonTint="#0870f8" />
<TextView
android:id="@+id/code"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="TextView"
android:layout_centerVertical="true"
android:layout_toEndOf="@+id/imageView2"
android:layout_marginLeft="20dp" />
<ImageView
android:layout_width="25dp"
android:layout_height="25dp"
android:id="@+id/imageView2"
android:layout_centerVertical="true"
android:layout_alignParentStart="true"
android:layout_marginLeft="20dp" />
</RelativeLayout>
我只是猜测,因为我这里没有平板电脑,而且您没有提供有关 android 版本的任何信息。
我不认为你的复选框只是消失了,尝试将 RelativeLayout 的背景更改为任何颜色(如红色或蓝色)以检查它是否真的消失了。
希望这有帮助。
您好,我有一个使用布局清单的简单应用程序。奇怪的是,CheckBox
在我的 Galaxy phone (ANDROID V5.0.1) 上运行良好,但由于某些原因,当我在平板电脑上使用相同的应用程序时 (ANDROID V4.2.2 ) 单击时 CheckBox
消失,任何想法都会有所帮助谢谢!
XML:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="6dip"
android:background="#FFFFFF">
<CheckBox
android:id="@+id/checkBox1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:focusable="false"
android:focusableInTouchMode="false"
android:layout_alignParentTop="true"
android:layout_alignParentEnd="true"
android:layout_marginRight="20dp"
android:buttonTint="#0870f8" />
<TextView
android:id="@+id/code"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="TextView"
android:layout_centerVertical="true"
android:layout_toEndOf="@+id/imageView2"
android:layout_marginLeft="20dp" />
<ImageView
android:layout_width="25dp"
android:layout_height="25dp"
android:id="@+id/imageView2"
android:layout_centerVertical="true"
android:layout_alignParentStart="true"
android:layout_marginLeft="20dp" />
</RelativeLayout>
我只是猜测,因为我这里没有平板电脑,而且您没有提供有关 android 版本的任何信息。 我不认为你的复选框只是消失了,尝试将 RelativeLayout 的背景更改为任何颜色(如红色或蓝色)以检查它是否真的消失了。 希望这有帮助。