2013-03-29 37 views
0

我做了矩形繪製並放在drawable-xhdpi文件夾中。但在我的設備中,它看起來很模糊。 我的設備屏幕尺寸爲1280x720,密度爲344 dpi。我把這個xml文件放在所有文件夾中,但看起來仍然很模糊。請幫幫我。 把圖像放在xhdpi中,但看起來模糊

<item> 
    <shape android:shape="rectangle" > 
     <solid android:color="#00000000" /> 

     <stroke 
      android:width="0.5dip" 
      android:color="#ADADAD" /> 
    </shape> 
</item> 

這是繪製,我把在繪製-xhdpi文件夾。

+0

請勿將其放置在drawable-xhdpi文件夾中。只需在名爲drawable的/ res下創建一個文件夾並將其放置在那裏。 – SKK

+0

無法正常工作。首先我試過這個。 – Dhiren

+0

@Dhiren你可以看看我的回答者。 – Harshid

回答

0

您必須創建rectangleimage.xml並以此方式使用。

<shape xmlns:android="http://schemas.android.com/apk/res/android" 
    android:shape="rectangle"> 
<corners 
    android:bottomLeftRadius="15dp" 
    android:bottomRightRadius="15dp" 
    android:topLeftRadius="15dp" 
    android:topRightRadius="15dp" /> 
    <solid android:color="@color/blue"/> 

</shape> 

你必須把這個xmlRES /繪製

,如果你發現任何問題,然後讓我知道。

+0

我不想要圓角矩形。 – Dhiren

+0

然後刪除標記 – Harshid

+0

不起作用。它填充整個矩形。 – Dhiren