2017-07-22 5 views
0

this is my button私はのImageButtonを使用していると私は私のイメージとボタンのボーダー間のパディングやスペースを削除することはできませんパディングのImageButton

を削除します。どうすればこれを達成できますか?

は、これが私のレイアウト

<ImageButton 
android:id="@+id/imageButton" 
style="?attr/selectableItemBackgroundBorderless" 
android:layout_width="103dp" 
android:layout_height="110dp" 
android:layout_marginLeft="8dp" 
android:layout_weight="1" 
android:paddingBottom="-15dp" 
android:paddingTop="30dp" 
android:scaleType="fitCenter" 
app:srcCompat="@drawable/com_facebook_profile_picture_blank_square" /> 

どうもありがとうです!

+0

にパディング底に設定されていますか?こうすることで、_ImageView_に 'android:layout_alignParentBottom =" true "'を設定することができ、すべてがうまく動作するはずです。 – lalosoft

+0

少なくともこのImageButton Parentから完全なXML(つまり)を投稿できますか? –

+0

ありがとうございます!これは私の解決策でした: 'android:paddingBottom =" 0dp "' –

答えて

0

試してみてください!あなたのために働くかもしれません

android:scaleType="centercrop" 
1

ありがとうございました!これは私の解決策だった:

<ImageButton 
android:id="@+id/imageButton" 
style="?attr/selectableItemBackgroundBorderless" 
android:layout_width="103dp" 
android:layout_height="110dp" 
android:layout_marginLeft="8dp" 
android:paddingBottom="0dp" 
android:paddingTop="50dp" 
android:scaleType="fitCenter" 
app:srcCompat="@mipmap/ic_launcher" 
/> 

あなたが親として_RelativeLayout_で_ImageView_を使用していないのはなぜ私は0

関連する問題