为什么我的Holo Light应用程序模糊和炸毁?
问题描述:
我刚刚学习编程Android应用程序并使用Netbeans。我的main.xml如下所示:为什么我的Holo Light应用程序模糊和炸毁?
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<EditText android:layout_weight="1"
android:id="@+id/edit_message"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
</LinearLayout>
问题是它看起来很模糊,UI元素真的很大。我在7英寸平板电脑上运行它,它看起来像这样:http://i.imgur.com/eflfJRQ.png
我可以解决这个问题吗?
答
我认为你正在使用手机尺寸布局7英寸的屏幕,导致位图缩放和模糊的布局。你有没有使用大小限定符来支持不同的屏幕大小?
res/layout/main_activity.xml # For handsets (smaller than 600dp available width)
res/layout-sw600dp/main_activity.xml # For 7” tablets (600dp wide and bigger)
res/layout-sw720dp/main_activity.xml # For 10” tablets (720dp wide and bigger)
+0
对不起,我试过,但它看起来仍然完全一样 – 2013-04-05 02:13:48
重量的EditText似乎腥...尝试删除它。 – 2013-04-04 10:51:05
你有'肖像'模式的同样的问题吗? – 2013-04-05 06:31:00