summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordaniel oeh <daniel.oeh@gmail.com>2014-05-17 13:49:03 +0200
committerdaniel oeh <daniel.oeh@gmail.com>2014-05-17 13:49:03 +0200
commit0d1803413c19ec78a0f0a79e3d6e8d07cf1b8a2a (patch)
treef6c3d0cf0e63ad9bba0e68c3db0a6462dff85393
parent640b36912abe3b27cb8188e7d6c3b4acafe27d6a (diff)
downloadAntennaPod-0d1803413c19ec78a0f0a79e3d6e8d07cf1b8a2a.zip
Improved space usage of title area in episode dialog
-rw-r--r--res/layout/feeditem_dialog.xml19
-rw-r--r--res/values-v16/styles.xml8
-rw-r--r--res/values/styles.xml7
-rw-r--r--src/de/danoeh/antennapod/dialog/FeedItemDialog.java7
4 files changed, 38 insertions, 3 deletions
diff --git a/res/layout/feeditem_dialog.xml b/res/layout/feeditem_dialog.xml
index 4241ef9c8..7d05603e8 100644
--- a/res/layout/feeditem_dialog.xml
+++ b/res/layout/feeditem_dialog.xml
@@ -5,10 +5,25 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
+ <TextView
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_margin="16dp"
+ android:id="@+id/txtvTitle"
+ android:layout_alignParentTop="true"
+ style="@style/AntennaPod.Dialog.Title"/>
+
+ <View
+ android:id="@+id/title_divider"
+ android:layout_width="match_parent"
+ android:layout_height="2dp"
+ android:layout_below="@id/txtvTitle"
+ android:background="@color/bright_blue"/>
+
<LinearLayout
android:id="@+id/header"
android:orientation="horizontal"
- android:layout_alignParentTop="true"
+ android:layout_below="@id/title_divider"
android:layout_width="match_parent"
android:layout_height="wrap_content">
@@ -41,7 +56,7 @@
<View
android:id="@+id/divider"
android:layout_width="match_parent"
- android:layout_height="3dp"
+ android:layout_height="2dp"
android:layout_below="@id/header"
android:background="@color/bright_blue"/>
diff --git a/res/values-v16/styles.xml b/res/values-v16/styles.xml
index 947e43f38..e7c56b5f5 100644
--- a/res/values-v16/styles.xml
+++ b/res/values-v16/styles.xml
@@ -6,4 +6,12 @@
<item name="android:textColor">?android:attr/textColorPrimary</item>
<item name="android:fontFamily">sans-serif-light</item>
</style>
+
+ <style name="AntennaPod.Dialog.Title" parent="@android:style/TextAppearance.Medium">
+ <item name="android:textSize">@dimen/text_size_medium</item>
+ <item name="android:textColor">@color/bright_blue</item>
+ <item name="android:maxLines">2</item>
+ <item name="android:ellipsize">end</item>
+ <item name="android:fontFamily">sans-serif-light</item>
+ </style>
</resources> \ No newline at end of file
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 7144affb3..94edd7413 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -132,4 +132,11 @@
<item name="android:lines">2</item>
<item name="android:ellipsize">end</item>
</style>
+
+ <style name="AntennaPod.Dialog.Title" parent="@android:style/TextAppearance.Medium">
+ <item name="android:textSize">@dimen/text_size_medium</item>
+ <item name="android:textColor">?android:attr/textColorPrimary</item>
+ <item name="android:maxLines">2</item>
+ <item name="android:ellipsize">end</item>
+ </style>
</resources>
diff --git a/src/de/danoeh/antennapod/dialog/FeedItemDialog.java b/src/de/danoeh/antennapod/dialog/FeedItemDialog.java
index fdd0cd09b..8db4c9d19 100644
--- a/src/de/danoeh/antennapod/dialog/FeedItemDialog.java
+++ b/src/de/danoeh/antennapod/dialog/FeedItemDialog.java
@@ -14,10 +14,12 @@ import android.util.Log;
import android.util.TypedValue;
import android.view.MenuItem;
import android.view.View;
+import android.view.Window;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.ImageButton;
+import android.widget.TextView;
import android.widget.Toast;
import de.danoeh.antennapod.BuildConfig;
import de.danoeh.antennapod.R;
@@ -48,6 +50,7 @@ public class FeedItemDialog extends Dialog {
private QueueAccess queue;
private View header;
+ private TextView txtvTitle;
private WebView webvDescription;
private ImageButton butAction1;
private ImageButton butAction2;
@@ -95,8 +98,10 @@ public class FeedItemDialog extends Dialog {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
+ requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.feeditem_dialog);
+ txtvTitle = (TextView) findViewById(R.id.txtvTitle);
header = findViewById(R.id.header);
webvDescription = (WebView) findViewById(R.id.webview);
butAction1 = (ImageButton) findViewById(R.id.butAction1);
@@ -105,7 +110,7 @@ public class FeedItemDialog extends Dialog {
popupMenu = new PopupMenu(getContext(), butMore);
webvDescription.setWebViewClient(new WebViewClient());
- setTitle(item.getTitle());
+ txtvTitle.setText(item.getTitle());
if (UserPreferences.getTheme() == R.style.Theme_AntennaPod_Dark) {
if (Build.VERSION.SDK_INT >= 11