commit 9f24899d02b026493c1202894c40165681a8d5fc
parent 4ff29fa8394e8efe10094950f09550111aabed80
Author: Jan Dankert <devnull@localhost>
Date: Sat, 13 Oct 2012 01:36:32 +0200
Layout-Fix: Zahlreiche Detailverbesserungen am Layout, ProgressDialog und AlertDialog erscheinen im Standard-Theme.
Diffstat:
10 files changed, 63 insertions(+), 35 deletions(-)
diff --git a/res/layout/listing.xml b/res/layout/listing.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent" android:layout_height="wrap_content"
+ android:layout_width="fill_parent" android:layout_height="fill_parent"
android:orientation="vertical" style="@style/site">
<ListView android:id="@id/android:list" android:textSize="25sp"
diff --git a/res/layout/newsdetail.xml b/res/layout/newsdetail.xml
@@ -1,27 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="fill_parent"
- android:layout_height="wrap_content" android:background="#E3E3E3">
- <LinearLayout android:orientation="vertical"
- android:layout_width="fill_parent" android:layout_height="wrap_content">
+ android:layout_height="fill_parent" android:paddingLeft="4dp"
+ android:paddingRight="4dp" style="@style/site">
+ <LinearLayout android:orientation="vertical"
+ android:layout_width="fill_parent" android:layout_height="fill_parent"
+ style="?textbox">
<TextView android:layout_width="wrap_content"
android:layout_height="wrap_content" android:id="@+id/item_date"
- style="@style/normalText"></TextView>
-
- <!--
- <TextView android:text="@+id/TextView03"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content" android:id="@+id/item_title"
- style="@style/titleText"></TextView>
- -->
+ style="?normalText"></TextView>
- <TextView android:text="@+id/TextView01"
- android:layout_width="wrap_content" android:layout_height="wrap_content"
- android:id="@+id/item_description" style="@style/normalText"></TextView>
-
- <Button android:text="@string/www" android:layout_width="wrap_content"
- android:layout_height="wrap_content" android:id="@+id/item_button"></Button>
+ <TextView android:layout_width="wrap_content"
+ android:layout_height="wrap_content" android:id="@+id/item_description"
+ style="?normalText"></TextView>
</LinearLayout>
</ScrollView>
diff --git a/res/layout/post.xml b/res/layout/post.xml
@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent" android:layout_height="fill_parent" android:paddingLeft="4dp" android:paddingRight="4dp">
+ android:layout_width="fill_parent" android:layout_height="fill_parent"
+ android:paddingLeft="4dp" android:paddingRight="4dp" style="@style/site">
<LinearLayout android:orientation="vertical"
- android:layout_width="fill_parent" android:layout_height="wrap_content"
- android:paddingLeft="5sp" android:background="#E3E3E3">
+ android:layout_width="fill_parent" android:layout_height="fill_parent"
+ style="?textbox">
<TextView android:layout_width="wrap_content" android:text="@string/subject"
@@ -13,18 +14,19 @@
<EditText android:id="@+id/subject" android:layout_width="fill_parent"
android:layout_height="wrap_content" />
- <TextView android:layout_width="wrap_content" android:text="@string/recipient"
+ <TextView android:id="@+id/recipient_label" android:layout_width="wrap_content" android:text="@string/recipient"
android:layout_height="wrap_content" style="@style/normalText"></TextView>
<EditText android:id="@+id/recipient" android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<TextView android:text="@string/text" android:layout_width="wrap_content"
- android:layout_height="wrap_content" style="@style/titleText"></TextView>
+ android:layout_height="wrap_content" style="?titleText"></TextView>
<EditText android:layout_width="fill_parent"
android:layout_height="fill_parent" android:id="@+id/content"></EditText>
<Button android:text="@string/send" android:layout_width="fill_parent"
- android:layout_height="wrap_content" android:id="@+id/send" style="@style/normalText"></Button>
+ android:layout_height="wrap_content" android:layout_margin="10sp"
+ android:padding="5sp" android:id="@+id/send" style="?normalText"></Button>
</LinearLayout>
diff --git a/res/values/ibc.xml b/res/values/ibc.xml
@@ -23,10 +23,14 @@
<item name="titleText">@style/ibctitleText</item>
<item name="titleBox">@style/ibctitleBox</item>
- <item name="android:background">@color/ibcbg</item>
- <item name="android:buttonStyle">@style/button</item>
- <item name="android:windowBackground">@drawable/ibc_logo</item>
+ <item name="android:alertDialogStyle">@style/Dialog</item>
+ <item name="android:popupWindowStyle">@style/Dialog</item>
+
+ <item name="android:windowTitleBackgroundStyle">@style/WindowTitleBackground</item>
+ <item name="android:windowTitleStyle">@style/WindowTitle</item>
+ <item name="android:windowBackground">@color/ibcbg</item>
+ <item name="android:buttonStyle">@style/button</item>
</style>
<!--
@@ -40,6 +44,22 @@
<item name="titleText">@style/titleText</item>
</style>
+ <style name="WindowTitleBackground">
+ <item name="android:background">@color/ibcgrey2</item>
+ </style>
+ <style name="WindowTitle">
+ <item name="android:textColor">@color/ibctext</item>
+ <item name="android:textStyle">bold</item>
+ </style>
+
+ <!-- Fuer AlertDialog etc. -->
+ <style name="Dialog" parent="@android:style/Widget.ProgressBar">
+ <item name="android:textColor">@color/ibctext</item>
+ <item name="android:background">@color/ibcgrey</item>
+ <item name="android:popupBackground">@color/ibcgrey</item>
+ <item name="android:windowBackground">@color/ibcgrey</item>
+ </style>
+
<style name="button" parent="@android:style/Widget.Button">
<!--
<item name="android:layout_width">wrap_content</item> <item
diff --git a/res/values/strings.xml b/res/values/strings.xml
@@ -43,7 +43,7 @@
<string name="waitingfor_news">Neue Nachrichten werden geladen</string>
<string name="waitingfor_forum">Foren werden geladen</string>
<string name="waitingfor_topic">Thema wird geladen</string>
- <string name="waitingfor_search">Suche läuft</string>
+ <string name="waitingfor_search">Suche wird ausgeführt</string>
<string name="waitingforcontent">Inhalt wird geladen</string>
<string name="waitingforprojects">Projekte werden geladen</string>
<string name="waitingfor_login">Anmeldung am Server</string>
diff --git a/src/de/mtbnews/android/CreateTopicActivity.java b/src/de/mtbnews/android/CreateTopicActivity.java
@@ -35,6 +35,9 @@ public class CreateTopicActivity extends Activity
final TextView recipient = (TextView) findViewById(R.id.recipient);
recipient.setText("");
recipient.setVisibility(View.INVISIBLE);
+
+ final TextView label = (TextView) findViewById(R.id.recipient_label);
+ label.setVisibility(View.INVISIBLE);
final TextView subject = (TextView) findViewById(R.id.subject);
subject.setText("");
diff --git a/src/de/mtbnews/android/MessageActivity.java b/src/de/mtbnews/android/MessageActivity.java
@@ -23,15 +23,13 @@ public class MessageActivity extends Activity
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
-
+
setTheme(((IBCApplication) getApplication()).themeResId);
setContentView(R.layout.newsdetail);
boxId = getIntent().getStringExtra("box_id");
messageId = getIntent().getStringExtra("message_id");
- findViewById(R.id.item_button).setVisibility(View.INVISIBLE);
-
new ServerAsyncTask(this, R.string.waitingforcontent)
{
private TapatalkClient client;
@@ -49,6 +47,8 @@ public class MessageActivity extends Activity
{
// MessageActivity.this.setTitle(feed.getTitle());
+ MessageActivity.this.setTitle(message.getTitle());
+
TextView datum = (TextView) findViewById(R.id.item_date);
datum.setText(DateFormat.getTimeFormat(MessageActivity.this)
.format(message.getDate()));
@@ -104,6 +104,10 @@ public class MessageActivity extends Activity
startActivity(intent);
return true;
+ case R.id.menu_new_message:
+ Intent intent2 = new Intent(this, ReplyMailActivity.class);
+ startActivity(intent2);
+ return true;
}
return false;
}
diff --git a/src/de/mtbnews/android/ReplyMailActivity.java b/src/de/mtbnews/android/ReplyMailActivity.java
@@ -24,12 +24,11 @@ public class ReplyMailActivity extends Activity
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
-
+
client = ((IBCApplication) getApplication()).getTapatalkClient();
-
+
setTheme(((IBCApplication) getApplication()).themeResId);
setContentView(R.layout.post);
-
final TextView recipient = (TextView) findViewById(R.id.recipient);
final TextView subject = (TextView) findViewById(R.id.subject);
@@ -38,6 +37,7 @@ public class ReplyMailActivity extends Activity
if (getIntent().hasExtra("box_id"))
{
+ setTitle(R.string.reply);
boxId = getIntent().getStringExtra("box_id");
messageId = getIntent().getStringExtra("message_id");
@@ -69,6 +69,10 @@ public class ReplyMailActivity extends Activity
}
}.execute();
}
+ else
+ {
+ setTitle(R.string.new_message);
+ }
final Button button = (Button) findViewById(R.id.send);
button.setOnClickListener(new OnClickListener()
diff --git a/src/de/mtbnews/android/ReplyPostActivity.java b/src/de/mtbnews/android/ReplyPostActivity.java
@@ -40,6 +40,8 @@ public class ReplyPostActivity extends Activity
final TextView recipient = (TextView) findViewById(R.id.recipient);
recipient.setVisibility(View.INVISIBLE);
+ final TextView label = (TextView) findViewById(R.id.recipient_label);
+ label.setVisibility(View.INVISIBLE);
final TextView subject = (TextView) findViewById(R.id.subject);
subject
diff --git a/src/de/mtbnews/android/util/ServerAsyncTask.java b/src/de/mtbnews/android/util/ServerAsyncTask.java
@@ -57,7 +57,8 @@ public abstract class ServerAsyncTask extends AsyncTask<Void, Void, Void>
this.progressDialog = new ProgressDialog(context);
// progressDialog.setTitle(R.string.loading);
- progressDialog.setMessage(context.getResources().getString(message));
+ progressDialog.setMessage(context.getResources().getString(message)
+ + " ...");
}
@Override