【发布时间】:2015-11-19 09:05:27
【问题描述】:
我有 3 个操作按钮。一个 Scanbutton 和(如果触发某些条件)另外两个“minifab”。 Scanbutton 应该在bottom|end 位置,另外两个应该出现在它的顶部。
我使用 Android Studio 给我的自动生成的 CustomView。现在我想知道如何改变我的晶圆厂的位置。我不能使用填充选项。这是因为 CustomView 吗?
这是我的 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"
tools:context=".SlideMenu">
<android.support.design.widget.AppBarLayout
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:theme="@style/AppTheme.AppBarOverlay">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:popupTheme="@style/AppTheme.PopupOverlay" />
</android.support.design.widget.AppBarLayout>
<include layout="@layout/content_main" />
<android.support.design.widget.FloatingActionButton
android:id="@+id/exportbutton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_margin="@dimen/fab_margin"
android:src="@android:drawable/ic_menu_share"
android:cropToPadding="false" />
<android.support.design.widget.FloatingActionButton
android:id="@+id/savebutton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_margin="@dimen/fab_margin"
android:src="@android:drawable/ic_menu_save"
android:cropToPadding="false" />
<android.support.design.widget.FloatingActionButton
android:id="@+id/scanbutton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_margin="@dimen/fab_margin"
android:src="@android:drawable/ic_menu_add"
android:visibility="visible" />
</android.support.design.widget.CoordinatorLayout>
【问题讨论】:
标签: android xml floating-action-button