【发布时间】:2016-07-16 20:19:53
【问题描述】:
【问题讨论】:
-
很不清楚你在问什么。而且您应该先尝试自己编写代码...
-
@Vucko 你能在我编辑后再次看到我的问题吗
-
父布局被称为FrameLayout或RelativeLayout
标签: android xml android-layout android-studio imagebutton
【问题讨论】:
标签: android xml android-layout android-studio imagebutton
例如,您可以创建一个 FrameLayout,其中将包含(除其他外)位于屏幕截图底部的布局和底部边距等于该布局高度一半的按钮。比如:
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<!-- Many other sub-layouts -->
<FrameLayout
android:id="@+id/bottom_layout"
android:layout_width="match_parent"
android:layout_height="56dp"
android:gravity="bottom">
<!-- bottom bar icons. you can use not Frame but every layout. -->
</FrameLayout>
<!-- you can use any widget. Not necessary Button -->
<Button
android:id="@+id/photo_button"
android:layout_width="56dp"
android:layout_height="56dp"
android:gravity="bottom"
android:layout_marginBottom="28dp"/>
</FrameLayout>
【讨论】: