Как я могу создать это Layout
в android studio
? Я пытаюсь написать некоторые коды, но я не могу это сделать. Спасибо за помощь. Должен ли я использовать LinearLayout
или RelativeLayout
или TableLayout
для этого же просмотра для все устройства.Как создать этот экран в Android?
http://i.imgur.com/EBd3CAo.png
<?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"
android:weightSum="1"
android:background="#404040">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_height="59dp"
android:orientation="horizontal"
android:weightSum="1">
<EditText
android:layout_width="198dp"
android:id="@+id/editText"
android:layout_above="@+id/tv1"
android:layout_marginBottom="31dp"
android:text="12345678901"
android:autoText="false"
android:elegantTextHeight="false"
android:maxLength="11"
android:singleLine="true"
android:background="#000000"
android:textColor="#a0a0a0"
android:inputType="number"
android:textSize="40dp"
android:textAlignment="center"
android:textStyle="bold"
android:layout_height="50dp"
android:layout_weight="0.45" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="tv1"
android:id="@+id/tv1"
android:layout_weight="0.36"
android:textColor="#55ff1c"
android:paddingLeft="10dp" />
</LinearLayout>
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="bla bla bla bla bla"
android:id="@+id/cbx1"
android:checked="false"
android:singleLine="true"
android:textSize="18dp" />
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ListView
android:layout_width="180dp"
android:layout_height="wrap_content"
android:id="@+id/listView" />
<LinearLayout
android:orientation="vertical"
android:layout_width="180dp"
android:layout_height="wrap_content">
<RadioGroup
android:layout_width="wrap_content"
android:layout_height="wrap_content"></RadioGroup>
</LinearLayout>
</LinearLayout>
</LinearLayout>
Относительного расположением, было бы лучше. –
как я могу это использовать? Я новичок на android. – lotomax
Вы можете найти его, как использовать 'RelativeLayout'. –