**我有按钮,我想在所有按钮之间放置空间,所以如果我在平板电脑上运行应用程序按钮之间的空间将等于鸿沟,我使用linearlayout,我知道有layout_weight的选择,但我不想舒展图标**如何在linearlayout按钮之间制作空间
<LinearLayout
android:orientation="horizontal"
android:gravity="bottom|right"
android:background="#00ffffff"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentBottom="true"
android:id="@+id/linearLayout">
<ImageButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/call"
android:background="@drawable/layoutcornerbend"
android:layout_gravity="bottom"
android:src="@drawable/e"
/>
<ImageButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/layoutcornerbend"
android:id="@+id/navigation"
android:layout_gravity="bottom"
android:src="@drawable/navi"/>
<ImageButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/layoutcornerbend"
android:id="@+id/stream"
android:layout_gravity="bottom"
android:src="@drawable/appstream"/>
</LinearLayout>
得到了这个解决方案。增加<查看 的android:layout_width = “10dp” 机器人: layout_height =“0dp” /> – snehasish
为什么不在发布问题之前尝试这个问题 –
@VivekMishra有时候只是写这个问题可以帮助你想想答案 – mikeyq6