layouts, fixes

This commit is contained in:
ThomasV 2012-04-04 22:35:35 +02:00
parent e00c656ee6
commit 95f6818ab1
1 changed files with 26 additions and 28 deletions

View File

@ -144,16 +144,20 @@ def main_layout():
"""%(title, get_history_layout(15)) """%(title, get_history_layout(15))
payto_layout="""<?xml version="1.0" encoding="utf-8"?> def make_layout(s):
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" return """<?xml version="1.0" encoding="utf-8"?>
android:id="@+id/background" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:id="@+id/background"
android:layout_width="match_parent" android:orientation="vertical"
android:layout_height="match_parent" android:layout_width="match_parent"
android:background="#ff000022"> android:layout_height="match_parent"
android:background="#ff000022">
%s %s
%s
</LinearLayout>"""%(title,s)
payto_layout = make_layout("""
<TextView android:id="@+id/recipientTextView" <TextView android:id="@+id/recipientTextView"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -213,24 +217,9 @@ payto_layout="""<?xml version="1.0" encoding="utf-8"?>
android:layout_height="wrap_content" android:text="Send"></Button> android:layout_height="wrap_content" android:text="Send"></Button>
<Button android:id="@+id/buttonCancelSend" android:layout_width="wrap_content" <Button android:id="@+id/buttonCancelSend" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:text="Cancel"></Button> android:layout_height="wrap_content" android:text="Cancel"></Button>
</LinearLayout> </LinearLayout>""")
</LinearLayout>
"""%title
def make_layout(s):
return """<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/background"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#ff000000">
%s
%s
</LinearLayout>"""%(title,s)
receive_layout = make_layout(""" receive_layout = make_layout("""
<TextView android:id="@+id/receiveTextView" <TextView android:id="@+id/receiveTextView"
android:layout_width="match_parent" android:layout_width="match_parent"
@ -247,6 +236,14 @@ contacts_layout = make_layout("""
android:text="Contacts" android:text="Contacts"
android:textAppearance="?android:attr/textAppearanceLarge" android:textAppearance="?android:attr/textAppearanceLarge"
android:gravity="left"> android:gravity="left">
</TextView>
<TextView android:id="@+id/labelTextView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Label:"
android:textAppearance="?android:attr/textAppearanceLarge"
android:gravity="left">
</TextView>""") </TextView>""")
settings_layout = make_layout(""" settings_layout = make_layout("""
@ -683,10 +680,11 @@ def settings_loop():
plist[host] = z plist[host] = z
host = server_dialog(plist) host = server_dialog(plist)
p = plist[host] if host:
port = p['t'] p = plist[host]
srv = host + ':' + port + ':t' port = p['t']
droid.fullSetProperty("server","text",srv) srv = host + ':' + port + ':t'
droid.fullSetProperty("server","text",srv)
elif id=="buttonSave": elif id=="buttonSave":
droid.fullQuery() droid.fullQuery()