diff options
author | daniel oeh <daniel.oeh@gmail.com> | 2013-02-02 23:36:00 +0100 |
---|---|---|
committer | daniel oeh <daniel.oeh@gmail.com> | 2013-02-02 23:36:00 +0100 |
commit | f104b1bb19cc377db0d6e5069183324eef8aa154 (patch) | |
tree | 7e538cedee63995a2438fde783f3b2aab07a2906 | |
parent | 2d2e8ef627594a21c4a3da188f6624044a143f23 (diff) | |
download | AntennaPod-f104b1bb19cc377db0d6e5069183324eef8aa154.zip |
Minor layout improvements
-rw-r--r-- | AndroidManifest.xml | 2 | ||||
-rw-r--r-- | res/drawable/overlay_drawable.xml | 19 | ||||
-rw-r--r-- | res/layout/cover_fragment.xml | 48 | ||||
-rw-r--r-- | res/layout/mediaplayer_activity.xml | 3 | ||||
-rw-r--r-- | src/de/danoeh/antennapod/activity/MediaplayerActivity.java | 3 | ||||
-rw-r--r-- | src/de/danoeh/antennapod/activity/VideoplayerActivity.java | 12 | ||||
-rw-r--r-- | src/de/danoeh/antennapod/fragment/CoverFragment.java | 7 |
7 files changed, 23 insertions, 71 deletions
diff --git a/AndroidManifest.xml b/AndroidManifest.xml index c392ae272..abf8675d8 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -74,7 +74,7 @@ android:name=".activity.AudioplayerActivity" android:configChanges="keyboardHidden|orientation" android:launchMode="singleTask" - android:screenOrientation="portrait" /> + android:screenOrientation="portrait" android:label=" "/> <service android:name=".service.download.DownloadService" diff --git a/res/drawable/overlay_drawable.xml b/res/drawable/overlay_drawable.xml index c16656114..185ffefc1 100644 --- a/res/drawable/overlay_drawable.xml +++ b/res/drawable/overlay_drawable.xml @@ -3,30 +3,15 @@ <item> <shape android:shape="rectangle" > - <solid android:color="#20EAEAEA" /> + <solid android:color="#F0BABABA" /> </shape> </item> <item android:top="1dp"> <shape android:shape="rectangle" > - <solid android:color="#20E5E5E5" /> - </shape> - </item> - <item android:top="2dp"> - <shape android:shape="rectangle" > - <solid android:color="#20DDDDDD" /> - </shape> - </item> - <item android:top="3dp"> - <shape android:shape="rectangle" > - <solid android:color="#10BABABA" /> - </shape> - </item> - <item android:top="4dp"> - <shape android:shape="rectangle" > <solid android:color="#D2D2D2" /> </shape> </item> - <item android:top="5dp"> + <item android:top="2dp"> <shape android:shape="rectangle" > <solid android:color="@color/overlay_light" /> </shape> diff --git a/res/layout/cover_fragment.xml b/res/layout/cover_fragment.xml index 42e3560bb..f897d318c 100644 --- a/res/layout/cover_fragment.xml +++ b/res/layout/cover_fragment.xml @@ -5,49 +5,13 @@ android:layout_height="match_parent" android:orientation="vertical" > - <TextView - android:id="@+id/txtvTitle" + <ImageView + android:id="@+id/imgvCover" android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_alignParentLeft="true" - android:layout_alignParentTop="true" + android:layout_height="match_parent" + android:layout_gravity="center" android:layout_marginTop="8dp" - android:gravity="center_horizontal" - android:textSize="@dimen/text_size_medium" - android:textStyle="bold" /> - - <TextView - android:id="@+id/txtvFeed" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_alignParentLeft="true" - android:layout_below="@+id/txtvTitle" - android:gravity="center_horizontal" /> - - <LinearLayout - android:id="@+id/cover_layout" - android:layout_width="0dp" - android:layout_height="0dp" - android:layout_alignParentBottom="true" - android:layout_alignParentLeft="true" - android:layout_alignParentRight="true" - android:layout_below="@id/txtvFeed" - android:gravity="center" - android:orientation="vertical" > - - <ImageView - android:id="@+id/imgvCover" - android:layout_marginLeft="50dp" - android:layout_marginRight="50dp" - android:layout_marginTop="8dp" - android:layout_marginBottom="4dp" - android:layout_width="match_parent" - android:layout_height="0dp" - android:layout_gravity="center" - android:layout_weight="1" - android:adjustViewBounds="true" - android:scaleType="centerInside" /> - - </LinearLayout> + android:adjustViewBounds="true" + android:scaleType="centerInside" /> </RelativeLayout>
\ No newline at end of file diff --git a/res/layout/mediaplayer_activity.xml b/res/layout/mediaplayer_activity.xml index 221b5dff7..4ed699e85 100644 --- a/res/layout/mediaplayer_activity.xml +++ b/res/layout/mediaplayer_activity.xml @@ -61,6 +61,7 @@ </RelativeLayout> <View + android:id="@+id/navBarDivider" android:layout_width="match_parent" android:layout_height="1dp" android:layout_below="@id/navBar" @@ -151,7 +152,7 @@ android:layout_width="match_parent" android:layout_height="0px" android:layout_above="@id/playtime_layout" - android:layout_below="@id/navBar" > + android:layout_below="@id/navBarDivider" > </FrameLayout> </RelativeLayout>
\ No newline at end of file diff --git a/src/de/danoeh/antennapod/activity/MediaplayerActivity.java b/src/de/danoeh/antennapod/activity/MediaplayerActivity.java index a9b7df205..952cddf8b 100644 --- a/src/de/danoeh/antennapod/activity/MediaplayerActivity.java +++ b/src/de/danoeh/antennapod/activity/MediaplayerActivity.java @@ -365,9 +365,6 @@ public abstract class MediaplayerActivity extends SherlockFragmentActivity Log.d(TAG, "Loading media info"); FeedMedia media = controller.getMedia(); if (media != null) { - getSupportActionBar().setSubtitle(media.getItem().getTitle()); - getSupportActionBar() - .setTitle(media.getItem().getFeed().getTitle()); txtvPosition.setText(Converter.getDurationStringLong((media .getPosition()))); diff --git a/src/de/danoeh/antennapod/activity/VideoplayerActivity.java b/src/de/danoeh/antennapod/activity/VideoplayerActivity.java index b9e207c52..f6ea4f69e 100644 --- a/src/de/danoeh/antennapod/activity/VideoplayerActivity.java +++ b/src/de/danoeh/antennapod/activity/VideoplayerActivity.java @@ -20,6 +20,7 @@ import com.actionbarsherlock.view.Window; import de.danoeh.antennapod.AppConfig; import de.danoeh.antennapod.PodcastApp; import de.danoeh.antennapod.R; +import de.danoeh.antennapod.feed.FeedMedia; import de.danoeh.antennapod.service.PlaybackService; import de.danoeh.antennapod.service.PlayerStatus; @@ -54,6 +55,17 @@ public class VideoplayerActivity extends MediaplayerActivity implements } @Override + protected void loadMediaInfo() { + super.loadMediaInfo(); + FeedMedia media = controller.getMedia(); + if (media != null) { + getSupportActionBar().setSubtitle(media.getItem().getTitle()); + getSupportActionBar() + .setTitle(media.getItem().getFeed().getTitle()); + } + } + + @Override protected void setupGUI() { super.setupGUI(); videoOverlay = (LinearLayout) findViewById(R.id.overlay); diff --git a/src/de/danoeh/antennapod/fragment/CoverFragment.java b/src/de/danoeh/antennapod/fragment/CoverFragment.java index e324a2928..0c3398edf 100644 --- a/src/de/danoeh/antennapod/fragment/CoverFragment.java +++ b/src/de/danoeh/antennapod/fragment/CoverFragment.java @@ -29,8 +29,6 @@ public class CoverFragment extends SherlockFragment implements private FeedMedia media; - private TextView txtvTitle; - private TextView txtvFeed; private ImageView imgvCover; private boolean viewCreated = false; @@ -72,8 +70,6 @@ public class CoverFragment extends SherlockFragment implements public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View root = inflater.inflate(R.layout.cover_fragment, container, false); - txtvTitle = (TextView) root.findViewById(R.id.txtvTitle); - txtvFeed = (TextView) root.findViewById(R.id.txtvFeed); imgvCover = (ImageView) root.findViewById(R.id.imgvCover); viewCreated = true; return root; @@ -89,9 +85,6 @@ public class CoverFragment extends SherlockFragment implements media.getItem().getFeed().getImage(), imgvCover); } }); - - txtvTitle.setText(media.getItem().getTitle()); - txtvFeed.setText(media.getItem().getFeed().getTitle()); } else { Log.w(TAG, "loadMediaInfo was called while media was null"); } |