2016-05-06 1 views
0

を境界線を描画:が、これは四角形を描画するために私のコードであるフルスクリーンで

<?xml version="1.0" encoding="UTF-8"?> 
<shape xmlns:android="http://schemas.android.com/apk/res/android" 
    android:id="@+id/listview_background_shape" > 

    <stroke 
     android:width="5dp" 
     android:color="#000000" /> 

    <padding 
     android:bottom="0dp" 
     android:left="0dp" 
     android:right="0dp" 
     android:top="0dp" /> 

    <corners android:radius="0dp" /> 

    <solid android:color="#ffffffff" /> 

</shape> 

それは次のように表示されます:

enter image description here

が、それは私がwanntものです:

enter image description here

誰でも私を助けることができますか?あなたのレイアウトファイルから

+3

お使いのベースの活動のパディングがあるかもしれない、この – Stallion

+0

は、単に親から –

+0

おかげで多くのパディングを削除、それを仕事、あなたの助けのためのthx、高速回答のおかげで:* –

答えて

0

削除パディング

<?xml version="1.0" encoding="utf-8"?> 
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:layout_width="match_parent" 
    android:background="@drawable/style" 
    android:layout_height="match_parent"> 

</RelativeLayout> 

背景

<?xml version="1.0" encoding="UTF-8"?> 
<shape xmlns:android="http://schemas.android.com/apk/res/android" 
    android:id="@+id/listview_background_shape" > 

    <stroke 
     android:width="15dp" 
     android:color="#999999" /> 

    <padding 
     android:bottom="0dp" 
     android:left="0dp" 
     android:right="0dp" 
     android:top="0dp" /> 

    <corners android:radius="0dp" /> 

    <solid android:color="#ffffffff" /> 

</shape> 
関連する問題