2013-04-04 73 views
1

我剛剛學習編程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

我可以解決這個問題嗎?

+0

重量的EditText似乎腥...嘗試刪除它。 – 2013-04-04 10:51:05

+0

你有'肖像'模式的同樣的問題嗎? – 2013-04-05 06:31:00

回答

0

我認爲你正在使用手機尺寸佈局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) 

在此請看:Supporting Multiple Screens

+0

對不起,我試過,但它看起來仍然完全一樣 – 2013-04-05 02:13:48

相關問題