activity_edit_account.xml

  1<?xml version="1.0" encoding="utf-8"?>
  2<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3    android:layout_width="match_parent"
  4    android:layout_height="match_parent"
  5    android:background="@color/primarybackground" >
  6
  7    <LinearLayout
  8        android:id="@+id/editor"
  9        android:layout_width="fill_parent"
 10        android:layout_height="wrap_content"
 11        android:orientation="vertical"
 12        android:padding="8dp" >
 13
 14        <TextView
 15            android:layout_width="wrap_content"
 16            android:layout_height="wrap_content"
 17            android:text="@string/account_settings_jabber_id"
 18            android:textColor="@color/primarytext"
 19            android:textSize="14sp" />
 20
 21        <AutoCompleteTextView
 22            android:id="@+id/account_jid"
 23            android:layout_width="match_parent"
 24            android:layout_height="wrap_content"
 25            android:hint="@string/account_settings_example_jabber_id"
 26            android:inputType="textEmailAddress" />
 27
 28        <TextView
 29            android:layout_width="wrap_content"
 30            android:layout_height="wrap_content"
 31            android:layout_marginTop="8dp"
 32            android:text="@string/account_settings_password"
 33            android:textColor="@color/primarytext"
 34            android:textSize="14sp" />
 35
 36        <EditText
 37            android:id="@+id/account_password"
 38            android:layout_width="match_parent"
 39            android:layout_height="wrap_content"
 40            android:hint="@string/password"
 41            android:inputType="textPassword" />
 42
 43        <CheckBox
 44            android:id="@+id/account_register_new"
 45            android:layout_width="wrap_content"
 46            android:layout_height="wrap_content"
 47            android:layout_marginTop="8dp"
 48            android:text="@string/register_account"
 49            android:textColor="@color/primarytext"
 50            android:textSize="14sp" />
 51
 52        <TextView
 53            android:id="@+id/account_confirm_password_desc"
 54            android:layout_width="wrap_content"
 55            android:layout_height="wrap_content"
 56            android:text="@string/account_settings_confirm_password"
 57            android:textColor="@color/primarytext"
 58            android:textSize="14sp"
 59            android:visibility="gone" />
 60
 61        <EditText
 62            android:id="@+id/account_password_confirm"
 63            android:layout_width="match_parent"
 64            android:layout_height="wrap_content"
 65            android:layout_marginTop="8dp"
 66            android:hint="@string/confirm_password"
 67            android:inputType="textPassword"
 68            android:visibility="gone" />
 69    </LinearLayout>
 70
 71    <LinearLayout
 72        android:id="@+id/stats"
 73        android:layout_width="fill_parent"
 74        android:layout_height="fill_parent"
 75        android:layout_above="@+id/button_bar"
 76        android:layout_alignParentLeft="true"
 77        android:layout_below="@+id/editor"
 78        android:layout_marginTop="8dp"
 79        android:orientation="vertical"
 80        android:padding="16dp"
 81        android:visibility="gone">
 82
 83        <TextView
 84            android:layout_width="fill_parent"
 85            android:layout_height="wrap_content"
 86            android:textSize="18sp"
 87            android:textStyle="bold"
 88            android:textColor="@color/secondarytext"
 89            android:text="@string/additional_information"
 90            android:gravity="center_horizontal"/>
 91
 92        <TableLayout
 93            android:layout_width="match_parent"
 94            android:layout_height="wrap_content"
 95            android:stretchColumns="1"
 96            android:layout_marginTop="8dp">
 97
 98            <TableRow
 99                android:layout_width="fill_parent"
100                android:layout_height="wrap_content" >
101
102                <TextView
103                    android:layout_width="wrap_content"
104                    android:layout_height="wrap_content"
105                    android:text="@string/server_info_session_established" />
106
107                <TextView
108                    android:id="@+id/session_est"
109                    android:layout_width="wrap_content"
110                    android:layout_height="wrap_content"
111                    android:layout_gravity="right" />
112            </TableRow>
113
114            <TableRow
115                android:layout_width="fill_parent"
116                android:layout_height="wrap_content" >
117
118                <TextView
119                    android:layout_width="wrap_content"
120                    android:layout_height="wrap_content"
121                    android:text="@string/server_info_compatibilty" />
122
123                <TextView
124                    android:id="@+id/server_compat"
125                    android:layout_width="wrap_content"
126                    android:layout_height="wrap_content"
127                    android:layout_gravity="right" />
128            </TableRow>
129        </TableLayout>
130    </LinearLayout>
131
132    <LinearLayout
133        android:id="@+id/button_bar"
134        android:layout_width="wrap_content"
135        android:layout_height="wrap_content"
136        android:layout_alignParentBottom="true"
137        android:layout_alignParentLeft="true"
138        android:layout_alignParentRight="true">
139
140        <Button
141            android:id="@+id/cancel_button"
142            style="?android:attr/borderlessButtonStyle"
143            android:layout_width="0dp"
144            android:layout_height="wrap_content"
145            android:layout_weight="1"
146            android:text="@string/cancel"
147            android:textColor="@color/primarytext" />
148
149        <View
150            android:layout_width="1dp"
151            android:layout_height="fill_parent"
152            android:layout_marginBottom="7dp"
153            android:layout_marginTop="7dp"
154            android:background="@color/divider" />
155
156        <Button
157            android:id="@+id/save_button"
158            style="?android:attr/borderlessButtonStyle"
159            android:layout_width="0dp"
160            android:layout_height="wrap_content"
161            android:layout_weight="1"
162            android:enabled="false"
163            android:text="@string/save"
164            android:textColor="@color/secondarytext" />
165    </LinearLayout>
166
167</RelativeLayout>