我想这样做:Java的Android的框架布局
我这样做:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/activity_aplication_settings"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#e2e2e2"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="com.smok.maps.AplicationSettings">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true">
<TextView
android:id="@+id/textSync"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#000000"
android:text="@string/sync" />
<LinearLayout
android:id="@+id/line1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/textSync">
<TextView
android:id="@+id/actual"
android:layout_width="wrap_content"
android:textColor="#000000"
android:layout_height="wrap_content"
android:text="@string/actual" />
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/count" />
<TextView
android:id="@+id/actual2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#000000"
android:text="min" />
</LinearLayout>
<LinearLayout
android:id="@+id/lin2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/line1"
android:orientation="horizontal">
<CheckBox
android:id="@+id/checkBox1"
android:layout_width="50dp"
android:layout_height="50dp"
android:button="@xml/setting_checkbox"
android:focusable="false"
android:gravity="center" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:src="@drawable/point" />
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center"
android:textColor="#000000"
android:text="@string/show_choose_point" />
</LinearLayout>
<LinearLayout
android:id="@+id/lin3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/lin2"
android:orientation="horizontal">
<CheckBox
android:id="@+id/checkBox2"
android:layout_width="50dp"
android:layout_height="50dp"
android:button="@xml/setting_checkbox"
android:focusable="false"
android:gravity="center" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:src="@drawable/sync" />
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:textColor="#000000"
android:gravity="center"
android:text="@string/sync_request" />
</LinearLayout>
<LinearLayout
android:id="@+id/lin4"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/lin3"
android:orientation="horizontal">
<CheckBox
android:id="@+id/checkBox3"
android:layout_width="50dp"
android:layout_height="50dp"
android:button="@xml/setting_checkbox"
android:focusable="false"
android:gravity="center" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:src="@drawable/show_chooce" />
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:textColor="#000000"
android:gravity="center"
android:text="@string/show_choosen_points" />
</LinearLayout>
<LinearLayout
android:id="@+id/lin5"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/lin4"
android:orientation="horizontal">
<CheckBox
android:id="@+id/checkBox4"
android:layout_width="50dp"
android:layout_height="50dp"
android:button="@xml/setting_checkbox"
android:focusable="false"
android:gravity="center" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:src="@drawable/position2" />
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center"
android:textColor="#000000"
android:text="@string/current_location" />
</LinearLayout>
</RelativeLayout>
<LinearLayout
android:id="@+id/LinearLayout1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:orientation="horizontal">
<Button
android:id="@+id/back_bt"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:textColor="#ffffff"
android:background="@xml/roundedbutton"
android:text="@string/back" />
<View
android:layout_width="0dp"
android:layout_weight="0.1"
android:layout_height="match_parent">
</View>
<Button
android:id="@+id/confirm_bt"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:textColor="#ffffff"
android:background="@xml/roundedbutton"
android:text="@string/save" />
</LinearLayout>
</RelativeLayout>
我不知道我该怎么办边境。我想做一个边框,在中间我想要放置文字的位置。这与屏幕上的相同。这看起来像一个有文字的框架。现在我有了文字,我不知道如何创建一个框架。