Improved layout of external player fragment, added status textview
This commit is contained in:
parent
ade896787f
commit
5df974a85e
|
@ -8,14 +8,9 @@
|
|||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.5dp"
|
||||
android:layout_height="1.5dp"
|
||||
android:background="#AAAAAA" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="#D2D2D2" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
@ -46,6 +41,7 @@
|
|||
android:layout_marginRight="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_toRightOf="@id/imgvCover"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:textStyle="bold" />
|
||||
|
||||
|
@ -54,9 +50,29 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/txtvTitle"
|
||||
android:layout_margin="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_toRightOf="@id/imgvCover"
|
||||
android:textSize="14dp" />
|
||||
android:maxLines="1"
|
||||
android:textSize="12dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txtvStatus"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_below="@id/txtvTitle"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_toRightOf="@id/txtvPosition"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/gray"
|
||||
android:textSize="12dp" />
|
||||
</RelativeLayout>
|
||||
|
||||
<ImageButton
|
||||
|
|
|
@ -32,6 +32,7 @@ public class ExternalPlayerFragment extends SherlockFragment {
|
|||
private ViewGroup layoutInfo;
|
||||
private TextView txtvTitle;
|
||||
private TextView txtvPosition;
|
||||
private TextView txtvStatus;
|
||||
private ImageButton butPlay;
|
||||
|
||||
private PlaybackController controller;
|
||||
|
@ -51,7 +52,8 @@ public class ExternalPlayerFragment extends SherlockFragment {
|
|||
txtvTitle = (TextView) root.findViewById(R.id.txtvTitle);
|
||||
txtvPosition = (TextView) root.findViewById(R.id.txtvPosition);
|
||||
butPlay = (ImageButton) root.findViewById(R.id.butPlay);
|
||||
|
||||
txtvStatus = (TextView) root.findViewById(R.id.txtvStatus);
|
||||
|
||||
layoutInfo.setOnClickListener(new OnClickListener() {
|
||||
|
||||
@Override
|
||||
|
@ -122,10 +124,12 @@ public class ExternalPlayerFragment extends SherlockFragment {
|
|||
|
||||
@Override
|
||||
public void postStatusMsg(int msg) {
|
||||
txtvStatus.setText(msg);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clearStatusMsg() {
|
||||
txtvStatus.setText("");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue