[英]How to remove internal Image padding (Top, Left and Bottom) of an Android Checkbox
[英]How to remove top padding from Bottom sheet in android?
我想我已经得到了答案。 只需要从android:fitsSystemWindows="true"
删除android:fitsSystemWindows="true"
,即LinearLayout。 以防万一我把xml
代码放在下面。
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
android:id="@+id/coordinatorLayout"
tools:context=".MainActivity">
<include layout="@layout/content_main" />
<LinearLayout android:layout_width="match_parent"
android:layout_height="wrap_content"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="horizontal"
app:behavior_hideable="true"
app:behavior_peekHeight="0dp"
android:id="@+id/bottom_sheet"
android:background="@android:color/holo_orange_light"
app:layout_behavior="@string/bottom_sheet_behavior"
xmlns:android="http://schemas.android.com/apk/res/android">
<ImageView
android:layout_weight="1"
android:layout_margin="@dimen/five"
android:padding="@dimen/ten"
android:src="@drawable/ic_photo_camera"
android:layout_width="@dimen/fifty"
android:layout_height="@dimen/fifty" />
<ImageView
android:layout_weight="1"
android:layout_margin="@dimen/five"
android:padding="@dimen/ten"
android:src="@drawable/ic_image_gallery"
android:layout_width="@dimen/fifty"
android:layout_height="@dimen/fifty" />
<ImageView
android:layout_weight="1"
android:layout_margin="@dimen/five"
android:padding="@dimen/ten"
android:src="@drawable/ic_video_camera"
android:layout_width="@dimen/fifty"
android:layout_height="@dimen/fifty" />
<ImageView
android:layout_weight="1"
android:layout_margin="@dimen/five"
android:padding="@dimen/ten"
android:src="@drawable/ic_video_camera"
android:layout_width="@dimen/fifty"
android:layout_height="@dimen/fifty" />
</LinearLayout>
</android.support.design.widget.CoordinatorLayout>
仅供我使用,我使用了不同的 drawable,您需要将其改回原来的。
我希望它有帮助!
您可以为底部工作表制作自定义视图并在其中放置空格和边距
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.