我嘗試使文本視圖覆蓋上述文本視圖我try'ed文本對齊,但沒有成功,我可以通過添加大量的填充來完成此操作,但我不想使用填充,因爲我遇到了各種屏幕尺寸的android中的其他問題。我會發布我想要做的事情的圖片,併發布XML代碼。在這裏看到一些幫助thanks.Image(我正在嘗試使文本android /設計覆蓋上面的區域,說busbusy開發截至目前的黑色文本視圖只是推上述文本視圖的黑色欄是我希望它只是覆蓋,但留在這同一位置)http://imgur.com/ebgNTNk使文本視圖覆蓋另一個文本視圖
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TextView
android:id="@+id/org_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:layout_marginLeft="4dp"
android:layout_marginRight="4dp"
android:gravity="center_horizontal"
android:paddingTop="42dp"
android:paddingBottom="42dp"
android:background="@drawable/dashboard_business_image"
android:textColor="@color/busy_black"
android:textStyle="bold"
android:textAppearance="?android:attr/textAppearanceMedium">
</TextView>
<TextView
android:id="@+id/project_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="4dp"
android:layout_below="@id/org_name"
android:layout_marginRight="4dp"
android:gravity="center_horizontal"
android:layout_gravity="bottom"
android:paddingTop="2dp"
android:paddingBottom="2dp"
android:background="@color/busy_translucent_black"
android:textColor="@color/busy_white"
android:textStyle="normal"
android:textAppearance="?android:attr/textAppearanceSmall"
android:visibility="gone">
</TextView>
</RelativeLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:orientation="vertical">
<include layout="@layout/dashboard_clock_in_button" />
<include layout="@layout/dashboard_clock_out_button" />
<include layout="@layout/dashboard_paused_button" />
<ListView
android:id="@+id/action_list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="4dp"
android:layout_marginRight="4dp"
android:divider="@color/busy_divider_color"
android:dividerHeight="0dp">
</ListView>
</LinearLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginLeft="4dp"
android:layout_marginRight="4dp"
android:layout_weight="0"
android:gravity="center_horizontal"
android:paddingTop="32dp"
android:paddingBottom="32dp"
android:background="@color/busy_white"
android:textColor="@color/busy_black"
android:textStyle="bold"
android:textAppearance="?android:attr/textAppearanceMedium" />
</LinearLayout>
謝謝!!!!!!這工作完美!對不起,我沒有足夠的積分投票你的答案,但我會讓它成爲我接受的答案!非常感謝你!!!! – jared90