【发布时间】:2013-11-29 07:47:09
【问题描述】:
首先请原谅我对这个主题的命名很糟糕。
我有以下布局设置:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".PersonDetails" >
<FrameLayout
android:id="@+id/bannerLayout"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<ImageView
android:id="@+id/coverImage"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:scaleType="fitStart"
android:src="@drawable/default_cover">
</ImageView>
<ImageView
android:id="@+id/thumbImage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="left|bottom"
android:scaleType="fitStart"
android:src="@drawable/fingerprint_ic" />
</FrameLayout>
<TextView
android:id="@+id/textName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Large Text"
android:textColor="#55FF55"
android:textAppearance="?android:attr/textAppearanceLarge" />
</RelativeLayout>
我想要实现的是有一个横幅(很像跨越屏幕顶部的 facebook 封面)。并在横幅的左角放一张缩略图。
横幅的高度应仅占屏幕高度的 1/4 左右。因为我需要其余的空间来放置其他组件。
在横幅的正下方,我想要一个 TextView(在左侧)和一个按钮在右侧。
到目前为止,我只能将缩略图放在横幅顶部,但我不知道如何将其放在左下角(我可以使用 marginTop 设置它,但我认为这不是正确的方法这样做)。
有谁知道如何做到这一点?谢谢。
编辑#1:
这是用户界面
【问题讨论】:
-
提供一些ui图。
标签: android android-layout android-relativelayout android-framelayout