/soc/2012/michael/android: 244a17fc1a84: Added Account edit dial...
Michael Zangl
michael at soc.pidgin.im
Sat Jul 7 03:34:13 EDT 2012
Changeset: 244a17fc1a8449b88a953d0b42c932260ed35287
Author: Michael Zangl <michael at soc.pidgin.im>
Date: 2012-06-17 12:07 +0200
Branch: soc.2012.android
URL: http://hg.pidgin.im/soc/2012/michael/android/rev/244a17fc1a84
Description:
Added Account edit dialog layout.
diffstat:
android/workspace/im.pidgin.libpurple.testclient/res/layout/accountedit.xml | 124 ++++++++++
android/workspace/im.pidgin.libpurple.testclient/res/layout/accountlist.xml | 22 +-
android/workspace/im.pidgin.libpurple.testclient/res/values/strings.xml | 10 +
android/workspace/im.pidgin.libpurple.testclient/res/values/styles.xml | 6 +
4 files changed, 151 insertions(+), 11 deletions(-)
diffs (210 lines):
diff --git a/android/workspace/im.pidgin.libpurple.testclient/res/layout/accountedit.xml b/android/workspace/im.pidgin.libpurple.testclient/res/layout/accountedit.xml
new file mode 100644
--- /dev/null
+++ b/android/workspace/im.pidgin.libpurple.testclient/res/layout/accountedit.xml
@@ -0,0 +1,124 @@
+<?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" >
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_gravity="right" >
+
+ <TextView
+ android:id="@+id/accountlist_headline"
+ style="@style/headline"
+ android:layout_width="0dip"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_vertical"
+ android:layout_weight="1"
+ android:text="@string/accountedit_title" />
+
+ <Button
+ android:id="@+id/accountlist_newButton"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_vertical"
+ android:layout_margin="@dimen/padding_button"
+ android:text="@string/accountedit_ok" />
+ </LinearLayout>
+
+ <TableLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content" >
+
+ <TableRow
+ android:id="@+id/tableRow1"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content" >
+
+ <TextView
+ android:id="@+id/textView1"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/accountedit_protocol" />
+
+ <Spinner
+ android:id="@+id/accountedit_protocol"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content" />
+
+ </TableRow>
+
+ <TableRow
+ android:id="@+id/tableRow2"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content" >
+
+ <TextView
+ android:id="@+id/textView2"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/accountedit_username" />
+
+ <EditText
+ android:id="@+id/accountedit_username"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:ems="10"
+ android:hint="@string/accountedit_username_hint">
+
+ <requestFocus />
+ </EditText>
+
+ </TableRow>
+
+ <TableRow
+ android:id="@+id/tableRow3"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content" >
+
+ <TextView
+ android:id="@+id/textView3"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/accountedit_alias" />
+
+ <EditText
+ android:id="@+id/accountedit_alias"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:ems="10"
+ android:hint="@string/accountedit_alias_hint" />
+
+ </TableRow>
+
+ <TableRow
+ android:id="@+id/tableRow4"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content" >
+
+ <TextView
+ android:id="@+id/textView4"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/accountedit_password" />
+
+ <EditText
+ android:id="@+id/accountedit_password"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:ems="10"
+ android:inputType="textPassword" />
+
+ </TableRow>
+
+ <TableRow
+ android:id="@+id/tableRow5"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content" >
+
+ </TableRow>
+
+ </TableLayout>
+
+</LinearLayout>
\ No newline at end of file
diff --git a/android/workspace/im.pidgin.libpurple.testclient/res/layout/accountlist.xml b/android/workspace/im.pidgin.libpurple.testclient/res/layout/accountlist.xml
--- a/android/workspace/im.pidgin.libpurple.testclient/res/layout/accountlist.xml
+++ b/android/workspace/im.pidgin.libpurple.testclient/res/layout/accountlist.xml
@@ -11,12 +11,12 @@
<TextView
android:id="@+id/accountlist_headline"
+ style="@style/headline"
android:layout_width="0dip"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_weight="1"
- android:text="@string/accountlist_title"
- android:textAppearance="?android:attr/textAppearanceLarge" />
+ android:text="@string/accountlist_title" />
<Button
android:id="@+id/accountlist_newButton"
@@ -25,7 +25,6 @@
android:layout_gravity="center_vertical"
android:layout_margin="@dimen/padding_button"
android:text="@string/accountlist_new" />
-
</LinearLayout>
<ListView
@@ -34,12 +33,13 @@
android:layout_height="0dip"
android:layout_weight="5" >
</ListView>
-
- <Button
- android:id="@+id/accountlist_buddyListButton"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center_horizontal"
- android:layout_margin="@dimen/padding_button"
- android:text="@string/accountlist_showBuddylist" />
+
+ <Button
+ android:id="@+id/accountlist_buddyListButton"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_horizontal"
+ android:layout_margin="@dimen/padding_button"
+ android:text="@string/accountlist_showBuddylist" />
+
</LinearLayout>
\ No newline at end of file
diff --git a/android/workspace/im.pidgin.libpurple.testclient/res/values/strings.xml b/android/workspace/im.pidgin.libpurple.testclient/res/values/strings.xml
--- a/android/workspace/im.pidgin.libpurple.testclient/res/values/strings.xml
+++ b/android/workspace/im.pidgin.libpurple.testclient/res/values/strings.xml
@@ -9,5 +9,15 @@
<string name="about_menu_title">Aboutâ¦</string>
<string name="accountlist_title">Accounts</string>
<string name="accountlist_showBuddylist">Go to Buddylist</string>
+ <string name="accountedit_title">Edit %s</string>
+ <string name="accountedit_title_new">New Account</string>
+ <string name="accountedit_ok">Save</string>
+ <string name="accountedit_ok_new">Create</string>
+ <string name="accountedit_protocol">Protocol</string>
+ <string name="accountedit_username">Username</string>
+ <string name="accountedit_password">Password</string>
+ <string name="accountedit_alias">Alias</string>
+ <string name="accountedit_username_hint">Username on Server</string>
+ <string name="accountedit_alias_hint">(Optional)</string>
</resources>
\ No newline at end of file
diff --git a/android/workspace/im.pidgin.libpurple.testclient/res/values/styles.xml b/android/workspace/im.pidgin.libpurple.testclient/res/values/styles.xml
new file mode 100644
--- /dev/null
+++ b/android/workspace/im.pidgin.libpurple.testclient/res/values/styles.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources xmlns:android="http://schemas.android.com/apk/res/android">
+ <style name="headline" parent="android:Widget.TextView">
+ <item name="android:textSize">25sp</item>
+ </style>
+</resources>
More information about the Commits
mailing list