我从未见过这样的情况,我的布局在我的设备上(运行Android 4.4.2的Infinix Zero X506)只是模糊的,但在模拟器上显示得很好。我无法确定原因,我在这里或在Google上也没有看到类似的问题。我正在使用Android Studio 2.2 Preview 1。
以下是一个图片
以下是我的布局xml。
旋转选择器中的条目是从自定义适配器中提取的,如果这有帮助的话。
![Layout Screenshot](https://istack.dev59.com/5g8r5.webp)
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="@dimen/activity_horizontal_margin">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:text="@string/title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/textView"
android:textStyle="bold"/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textCapSentences"
android:hint="@string/enter_title"
android:ems="10"
android:maxLines="2"
android:id="@+id/edName" />
<TextView
android:text="@string/to_do_details"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/textView2"
android:textStyle="bold"
android:layout_marginTop="10dp"/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textMultiLine|textCapSentences"
android:ems="10"
android:hint="@string/enter_to_do_details"
android:id="@+id/edDetails" />
<TextView
android:text="@string/select_priority"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/textView3"
android:textStyle="bold"
android:layout_marginTop="10dp"/>
<Spinner
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/spPriority"
/>
<TextView
android:text="@string/set_time"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/textView6"
android:textStyle="bold"
android:layout_marginTop="10dp"/>
<Button
android:background="@color/colorAccent"
android:textStyle="bold"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:id="@+id/btDate"
/>
<TextView
android:text="@string/set_date"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/textView4"
android:textStyle="bold"
android:layout_marginTop="10dp"/>
<Button
android:background="@color/colorAccent"
android:textStyle="bold"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:id="@+id/btTime"
/>
<Button
android:layout_marginTop="@dimen/activity_vertical_margin"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/button"
android:text="@string/save"
android:gravity="center"
android:layout_gravity="center"/>
</LinearLayout>
</ScrollView>
旋转选择器中的条目是从自定义适配器中提取的,如果这有帮助的话。