update linear layout

re-arrange elements and allow the video title to display over multiple lines
This commit is contained in:
jludden 2018-09-30 07:42:02 +08:00
parent bcc97d1aa7
commit 4bcb2a5c9d
1 changed files with 31 additions and 38 deletions

View File

@ -20,58 +20,51 @@
android:padding="15dp" android:padding="15dp"
android:contentDescription="TODO" /> android:contentDescription="TODO" />
<LinearLayout <TextView
android:id="@+id/item_name_and_size" android:id="@+id/item_name"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_toLeftOf="@+id/item_more"
android:layout_toRightOf="@id/item_icon" android:layout_toRightOf="@id/item_icon"
android:layout_toLeftOf="@+id/item_status" android:ellipsize="end"
android:layout_centerVertical="true" android:padding="6dp"
android:orientation="vertical"> android:text="XXX.xx"
android:textColor="@color/white"
<TextView android:textSize="16sp"
android:id="@+id/item_name" android:textStyle="bold" />
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="6dp"
android:singleLine="true"
android:ellipsize="end"
android:text="XXX.xx"
android:textSize="16sp"
android:textStyle="bold"
android:textColor="@color/white"/>
<TextView
android:id="@+id/item_size"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="6dp"
android:singleLine="true"
android:text="100.00MB"
android:textSize="12sp"
android:textColor="@color/white"/>
</LinearLayout>
<TextView
android:id="@+id/item_size"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/item_icon"
android:layout_below="@+id/item_name"
android:padding="6dp"
android:singleLine="true"
android:text="100.00MB"
android:textSize="12sp"
android:textColor="@color/white"/>
<TextView <TextView
android:id="@+id/item_status" android:id="@+id/item_status"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_toLeftOf="@+id/item_more" android:layout_below="@+id/item_name"
android:layout_centerVertical="true"
android:layout_marginLeft="6dp" android:layout_marginLeft="6dp"
android:layout_marginRight="6dp" android:layout_marginRight="5dp"
android:layout_toLeftOf="@+id/item_more"
android:layout_toRightOf="@id/item_size"
android:padding="6dp"
android:singleLine="true" android:singleLine="true"
android:text="0%" android:text="0%"
android:textSize="20sp" android:textColor="@color/white"
android:textColor="@color/white"/> android:textSize="12sp" />
<ImageView <ImageView
style="?attr/buttonBarButtonStyle" style="?attr/buttonBarButtonStyle"
android:id="@+id/item_more" android:id="@+id/item_more"
android:layout_width="36dp" android:layout_width="49dp"
android:layout_height="36dp" android:layout_height="49dp"
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:layout_marginRight="4dp" android:layout_marginRight="4dp"