Ich möchte, dies zu tun: Java Android-Frame-Layout
Ich tat dies:
<?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>
Ich habe keine Ahnung, wie ich Grenze tun können. Ich möchte eine Grenze machen und in der Mitte möchte ich Platz haben, um Text zu setzen. Das gleiche wie auf dem Bildschirm. Das sieht wie ein Rahmen aus, der einen Text hat. Jetzt habe ich onli Text und ich kann nicht wie ich einen Rahmen erstellen kann. diese