【发布时间】:2014-06-18 16:09:57
【问题描述】:
我在LinearLayout中有一个FrameLayout,我想把它放在右边。试过android:layout_alignParentRight="true",但似乎没有用。任何想法为什么?请参阅下面的代码:
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="@dimen/gap_normal"
android:orientation="horizontal"
android:background="@color/grey"
android:layout_alignParentRight="true">
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="right"
android:layout_alignParentRight="true">
<ProgressBar
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:id="@+id/pb"
android:visibility="invisible"/>
<CheckableImageButton
android:id="@+id/conference_checkableimagebutton_lockstate"
android:layout_width="60dp"
android:layout_height="match_parent"
android:scaleType="fitCenter"
android:adjustViewBounds="true"
android:background="@android:color/white"
android:src="@drawable/conference_checkableimagebutton_lockstate_src"
android:cropToPadding="false"/>
</FrameLayout>
<com.devspark.robototextview.widget.RobotoTextView
android:id="@+id/conference_text_lockstate"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/gap_normal"
android:layout_marginBottom="@dimen/gap_normal"
android:gravity="left"
android:textSize="@dimen/textsize_normal"
android:paddingRight="@dimen/gap_large"
android:text="Unlocked. When all participants have joined, lock the conference by tapping the padlock."
app:typeface="roboto_condensed_regular" />
</LinearLayout>
【问题讨论】:
标签: android xml mobile android-framelayout