2

嗨,我的布局中有按钮,因为按钮将图像设置为可绘制,它在 hdpi、xhdpi(即在 nexus 4、samsung S III 中)工作正常但在 Nexus 7 中没有。我知道如果找不到文件夹它将使用 tvdpi命名为 tvdpi 然后将使用 hdpi。我使用的按钮代码如下

<Button
        android:id="@+id/my_button"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="5dip"
        android:layout_weight="1"
        android:background="@android:drawable/editbox_background_normal"
        android:gravity="left"
        android:textColor="#ff0000"
        android:drawableRight="@drawable/image"
        android:textSize="14sp" />
</button>

我的问题是它完全在按钮内显示图像,但需要触摸按钮的右侧、顶部和底部。请指导我。提前致谢

4

0 回答 0