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/secondarybackground" >
  6
  7    <ScrollView
  8        android:layout_width="fill_parent"
  9        android:layout_height="wrap_content"
 10        android:layout_above="@+id/button_bar"
 11        android:layout_alignParentTop="true" >
 12
 13        <LinearLayout
 14            android:layout_width="match_parent"
 15            android:layout_height="wrap_content"
 16            android:orientation="vertical" >
 17
 18            <RelativeLayout
 19                android:id="@+id/editor"
 20                android:layout_width="fill_parent"
 21                android:layout_height="wrap_content"
 22                android:layout_margin="8dp"
 23                android:background="@drawable/infocard_border"
 24                android:orientation="vertical"
 25                android:padding="16dp">
 26                <ImageView android:id="@+id/avater"
 27                    android:layout_width="72dp"
 28                    android:layout_height="72dp"
 29                    android:layout_alignParentTop="true"
 30                    android:layout_marginRight="16dp"/>
 31                <LinearLayout
 32                    android:layout_width="fill_parent"
 33                    android:layout_height="wrap_content"
 34                    android:orientation="vertical"
 35                    android:layout_toRightOf="@+id/avater">
 36                <TextView
 37                    android:layout_width="wrap_content"
 38                    android:layout_height="wrap_content"
 39                    android:text="@string/account_settings_jabber_id"
 40                    android:textColor="@color/primarytext"
 41                    android:textSize="?attr/TextSizeBody" />
 42
 43                <AutoCompleteTextView
 44                    android:id="@+id/account_jid"
 45                    android:layout_width="match_parent"
 46                    android:layout_height="wrap_content"
 47                    android:hint="@string/account_settings_example_jabber_id"
 48                    android:inputType="textEmailAddress"
 49                    android:textColor="@color/primarytext"
 50                    android:textColorHint="@color/secondarytext"
 51                    android:textSize="?attr/TextSizeBody" />
 52
 53                <TextView
 54                    android:layout_width="wrap_content"
 55                    android:layout_height="wrap_content"
 56                    android:layout_marginTop="8dp"
 57                    android:text="@string/account_settings_password"
 58                    android:textColor="@color/primarytext"
 59                    android:textSize="?attr/TextSizeBody" />
 60
 61                <EditText
 62                    android:id="@+id/account_password"
 63                    android:layout_width="match_parent"
 64                    android:layout_height="wrap_content"
 65                    android:hint="@string/password"
 66                    android:inputType="textPassword"
 67                    android:textColor="@color/primarytext"
 68                    android:textColorHint="@color/secondarytext"
 69                    android:textSize="?attr/TextSizeBody" />
 70
 71                <CheckBox
 72                    android:id="@+id/account_register_new"
 73                    android:layout_width="wrap_content"
 74                    android:layout_height="wrap_content"
 75                    android:layout_marginTop="8dp"
 76                    android:text="@string/register_account"
 77                    android:textColor="@color/primarytext"
 78                    android:textSize="?attr/TextSizeBody" />
 79
 80                <TextView
 81                    android:id="@+id/account_confirm_password_desc"
 82                    android:layout_width="wrap_content"
 83                    android:layout_height="wrap_content"
 84                    android:text="@string/account_settings_confirm_password"
 85                    android:textColor="@color/primarytext"
 86                    android:textSize="?attr/TextSizeBody"
 87                    android:visibility="gone" />
 88
 89                <EditText
 90                    android:id="@+id/account_password_confirm"
 91                    android:layout_width="match_parent"
 92                    android:layout_height="wrap_content"
 93                    android:layout_marginTop="8dp"
 94                    android:hint="@string/confirm_password"
 95                    android:inputType="textPassword"
 96                    android:visibility="gone"
 97                    android:textColor="@color/primarytext"
 98                    android:textColorHint="@color/secondarytext"
 99                    android:textSize="?attr/TextSizeBody" />
100                </LinearLayout>
101            </RelativeLayout>
102
103           <LinearLayout
104                android:id="@+id/stats"
105                android:layout_width="fill_parent"
106                android:layout_height="fill_parent"
107                android:layout_margin="8dp"
108                android:background="@drawable/infocard_border"
109                android:orientation="vertical"
110                android:padding="16dp"
111                android:visibility="gone" >
112
113                <TableLayout
114                    android:layout_width="match_parent"
115                    android:layout_height="wrap_content"
116                    android:stretchColumns="1" >
117
118                    <TableRow
119                        android:layout_width="fill_parent"
120                        android:layout_height="wrap_content" >
121
122                        <TextView
123                            android:layout_width="wrap_content"
124                            android:layout_height="wrap_content"
125                            android:text="@string/server_info_session_established"
126                            android:textColor="@color/primarytext"
127                            android:textSize="?attr/TextSizeBody" />
128
129                        <TextView
130                            android:id="@+id/session_est"
131                            android:layout_width="wrap_content"
132                            android:layout_height="wrap_content"
133                            android:layout_gravity="right"
134                            android:textColor="@color/primarytext"
135                            android:textSize="?attr/TextSizeBody" />
136                    </TableRow>
137
138                    <TableRow
139                        android:layout_width="fill_parent"
140                        android:layout_height="wrap_content" >
141
142                        <TextView
143                            android:layout_width="wrap_content"
144                            android:layout_height="wrap_content"
145                            android:text="@string/server_info_pep"
146                            android:textColor="@color/primarytext"
147                            android:textSize="?attr/TextSizeBody" />
148
149                        <TextView
150                            android:id="@+id/server_info_pep"
151                            android:layout_width="wrap_content"
152                            android:layout_height="wrap_content"
153                            android:layout_gravity="right"
154                            android:textColor="@color/primarytext"
155                            android:textSize="?attr/TextSizeBody" />
156                    </TableRow>
157
158                    <TableRow
159                        android:layout_width="fill_parent"
160                        android:layout_height="wrap_content" >
161
162                        <TextView
163                            android:layout_width="wrap_content"
164                            android:layout_height="wrap_content"
165                            android:text="@string/server_info_stream_management"
166                            android:textColor="@color/primarytext"
167                            android:textSize="?attr/TextSizeBody" />
168
169                        <TextView
170                            android:id="@+id/server_info_sm"
171                            android:layout_width="wrap_content"
172                            android:layout_height="wrap_content"
173                            android:layout_gravity="right"
174                            android:textColor="@color/primarytext"
175                            android:textSize="?attr/TextSizeBody" />
176                    </TableRow>
177
178                    <TableRow
179                        android:layout_width="fill_parent"
180                        android:layout_height="wrap_content" >
181
182                        <TextView
183                            android:layout_width="wrap_content"
184                            android:layout_height="wrap_content"
185                            android:text="@string/server_info_carbon_messages"
186                            android:textColor="@color/primarytext"
187                            android:textSize="?attr/TextSizeBody" />
188
189                        <TextView
190                            android:id="@+id/server_info_carbons"
191                            android:layout_width="wrap_content"
192                            android:layout_height="wrap_content"
193                            android:layout_gravity="right"
194                            android:textColor="@color/primarytext"
195                            android:textSize="?attr/TextSizeBody" />
196                    </TableRow>
197                </TableLayout>
198
199
200
201                <RelativeLayout
202                    android:layout_width="wrap_content"
203                    android:layout_height="match_parent"
204                    android:id="@+id/otr_fingerprint_box"
205                    android:layout_marginTop="32dp">
206
207                    <LinearLayout
208                        android:layout_width="wrap_content"
209                        android:layout_height="wrap_content"
210                        android:layout_alignParentLeft="true"
211                        android:layout_toLeftOf="@+id/action_copy_to_clipboard"
212                        android:orientation="vertical">
213
214                        <TextView
215                            android:id="@+id/otr_fingerprint"
216                            android:layout_width="wrap_content"
217                            android:layout_height="wrap_content"
218                            android:textColor="@color/primarytext"
219                            android:textSize="?attr/TextSizeBody"
220                            android:typeface="monospace" />
221
222                        <TextView
223                            android:layout_width="wrap_content"
224                            android:layout_height="wrap_content"
225                            android:textColor="@color/secondarytext"
226                            android:textSize="?attr/TextSizeInfo"
227                            android:text="@string/otr_fingerprint"/>
228                    </LinearLayout>
229
230                    <ImageButton
231                        android:id="@+id/action_copy_to_clipboard"
232                        android:layout_width="wrap_content"
233                        android:layout_height="wrap_content"
234                        android:layout_alignParentRight="true"
235                        android:layout_centerVertical="true"
236                        android:background="?android:selectableItemBackground"
237                        android:padding="8dp"
238                        android:src="@drawable/ic_action_copy"
239                        android:visibility="visible" />
240                </RelativeLayout>
241
242               
243            </LinearLayout>
244        </LinearLayout>
245    </ScrollView>
246
247    <LinearLayout
248        android:id="@+id/button_bar"
249        android:layout_width="wrap_content"
250        android:layout_height="wrap_content"
251        android:layout_alignParentBottom="true"
252        android:layout_alignParentLeft="true"
253        android:layout_alignParentRight="true" >
254
255        <Button
256            android:id="@+id/cancel_button"
257            style="?android:attr/borderlessButtonStyle"
258            android:layout_width="0dp"
259            android:layout_height="wrap_content"
260            android:layout_weight="1"
261            android:text="@string/cancel"
262            android:textColor="@color/primarytext" />
263
264        <View
265            android:layout_width="1dp"
266            android:layout_height="fill_parent"
267            android:layout_marginBottom="7dp"
268            android:layout_marginTop="7dp"
269            android:background="@color/divider" />
270
271        <Button
272            android:id="@+id/save_button"
273            style="?android:attr/borderlessButtonStyle"
274            android:layout_width="0dp"
275            android:layout_height="wrap_content"
276            android:layout_weight="1"
277            android:enabled="false"
278            android:text="@string/save"
279            android:textColor="@color/secondarytext" />
280    </LinearLayout>
281
282</RelativeLayout>