Minor layout improvements
This commit is contained in:
parent
2d2e8ef627
commit
f104b1bb19
|
@ -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"
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
|
@ -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>
|
|
@ -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())));
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
@ -53,6 +54,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();
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue