Merge branch 'external_itemlist_update' into develop
This commit is contained in:
commit
7e4827e253
|
@ -33,63 +33,67 @@
|
||||||
android:layout_alignParentTop="true"
|
android:layout_alignParentTop="true"
|
||||||
android:layout_marginLeft="8dp"
|
android:layout_marginLeft="8dp"
|
||||||
android:layout_marginRight="4dp"
|
android:layout_marginRight="4dp"
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="2dp"
|
||||||
android:layout_toLeftOf="@id/butAction"
|
android:layout_toLeftOf="@id/butAction"
|
||||||
android:layout_toRightOf="@id/imgvFeedimage"
|
android:layout_toRightOf="@id/imgvFeedimage"
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
android:maxLines="1"
|
android:lines="2"
|
||||||
android:textColor="?android:attr/textColorPrimary"
|
android:textColor="?android:attr/textColorPrimary"
|
||||||
android:textSize="@dimen/text_size_small" />
|
android:textSize="@dimen/text_size_small" />
|
||||||
|
|
||||||
<TextView
|
<LinearLayout
|
||||||
android:id="@+id/txtvFeedname"
|
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_below="@id/txtvTitle"
|
android:layout_alignParentBottom="true"
|
||||||
android:layout_marginLeft="8dp"
|
|
||||||
android:layout_marginRight="8dp"
|
|
||||||
android:layout_toLeftOf="@id/butAction"
|
android:layout_toLeftOf="@id/butAction"
|
||||||
android:layout_toRightOf="@id/imgvFeedimage"
|
android:layout_toRightOf="@id/imgvFeedimage"
|
||||||
android:ellipsize="end"
|
android:orientation="vertical" >
|
||||||
android:maxLines="1"
|
|
||||||
android:textColor="?android:attr/textColorSecondary"
|
|
||||||
android:textSize="@dimen/text_size_micro" />
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/txtvLenSize"
|
android:id="@+id/txtvFeedname"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_below="@id/txtvFeedname"
|
android:layout_marginLeft="8dp"
|
||||||
android:layout_marginBottom="8dp"
|
android:layout_marginRight="8dp"
|
||||||
android:layout_marginLeft="8dp"
|
android:ellipsize="end"
|
||||||
android:layout_marginRight="8dp"
|
android:maxLines="1"
|
||||||
android:layout_marginTop="4dp"
|
android:textColor="?android:attr/textColorSecondary"
|
||||||
android:layout_toRightOf="@id/imgvFeedimage"
|
android:textSize="@dimen/text_size_micro" />
|
||||||
android:ellipsize="end"
|
|
||||||
android:maxLines="1"
|
|
||||||
android:textColor="?android:attr/textColorTertiary"
|
|
||||||
android:textSize="@dimen/text_size_micro" />
|
|
||||||
|
|
||||||
<ImageView
|
<RelativeLayout
|
||||||
android:id="@+id/imgvDownloadStatus"
|
android:id="@+id/bottom_bar"
|
||||||
android:layout_width="@dimen/enc_icons_size"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="@dimen/enc_icons_size"
|
android:layout_height="wrap_content" >
|
||||||
android:layout_below="@id/txtvFeedname"
|
|
||||||
android:layout_marginBottom="8dp"
|
|
||||||
android:layout_marginLeft="8dp"
|
|
||||||
android:layout_marginRight="8dp"
|
|
||||||
android:layout_marginTop="4dp"
|
|
||||||
android:layout_toLeftOf="@id/butAction" />
|
|
||||||
|
|
||||||
<ProgressBar
|
<TextView
|
||||||
android:id="@+id/pbar_episode_progress"
|
android:id="@+id/txtvLenSize"
|
||||||
style="?android:attr/progressBarStyleHorizontal"
|
android:layout_width="wrap_content"
|
||||||
android:layout_width="0dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_alignParentLeft="true"
|
||||||
android:layout_below="@id/txtvFeedname"
|
android:layout_marginLeft="8dp"
|
||||||
android:layout_marginTop="4dp"
|
android:layout_marginRight="8dp"
|
||||||
android:layout_toLeftOf="@id/imgvDownloadStatus"
|
android:ellipsize="end"
|
||||||
android:layout_toRightOf="@id/txtvLenSize" />
|
android:maxLines="1"
|
||||||
|
android:textColor="?android:attr/textColorTertiary"
|
||||||
|
android:textSize="@dimen/text_size_micro" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/imgvDownloadStatus"
|
||||||
|
android:layout_width="@dimen/enc_icons_size"
|
||||||
|
android:layout_height="@dimen/enc_icons_size"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:layout_marginLeft="8dp"
|
||||||
|
android:layout_marginRight="8dp" />
|
||||||
|
|
||||||
|
<ProgressBar
|
||||||
|
android:id="@+id/pbar_episode_progress"
|
||||||
|
style="?android:attr/progressBarStyleHorizontal"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_toLeftOf="@id/imgvDownloadStatus"
|
||||||
|
android:layout_toRightOf="@id/txtvLenSize" />
|
||||||
|
</RelativeLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/statusPlaying"
|
android:id="@+id/statusPlaying"
|
||||||
|
|
|
@ -1,38 +1,55 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="?attr/borderless_button" >
|
android:background="?attr/borderless_button"
|
||||||
|
android:orientation="vertical" >
|
||||||
|
|
||||||
<TextView
|
<RelativeLayout
|
||||||
android:id="@+id/txtvHeaderTitle"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="match_parent" >
|
||||||
android:layout_alignParentLeft="true"
|
|
||||||
android:layout_centerVertical="true"
|
|
||||||
android:layout_marginBottom="24dp"
|
|
||||||
android:layout_marginLeft="@dimen/thumbnail_length_itemlist"
|
|
||||||
android:layout_marginRight="16dp"
|
|
||||||
android:layout_marginTop="24dp"
|
|
||||||
android:paddingLeft="8dp"
|
|
||||||
android:textColor="@color/dark_blue"
|
|
||||||
android:textSize="@dimen/text_size_large"
|
|
||||||
android:textStyle="bold" />
|
|
||||||
|
|
||||||
<ImageButton
|
<TextView
|
||||||
android:id="@+id/butAction"
|
android:id="@+id/txtvHeaderTitle"
|
||||||
android:layout_width="48dp"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignParentBottom="true"
|
android:layout_alignParentLeft="true"
|
||||||
android:layout_alignParentRight="true"
|
android:layout_centerVertical="true"
|
||||||
android:background="?attr/borderless_button"
|
android:layout_marginBottom="32dp"
|
||||||
android:clickable="false"
|
android:layout_marginLeft="28dp"
|
||||||
android:focusable="false"
|
android:layout_marginRight="16dp"
|
||||||
android:focusableInTouchMode="false"
|
android:layout_marginTop="32dp"
|
||||||
android:paddingLeft="24dp"
|
android:paddingLeft="8dp"
|
||||||
android:paddingRight="8dp"
|
android:textAllCaps="true"
|
||||||
android:paddingTop="16dp"
|
android:textColor="@color/dark_blue"
|
||||||
android:scaleType="fitEnd"
|
android:textSize="@dimen/text_size_large"
|
||||||
android:src="?attr/spinner_button" />
|
android:typeface="sans" />
|
||||||
|
|
||||||
</RelativeLayout>
|
<ImageButton
|
||||||
|
android:id="@+id/butAction"
|
||||||
|
android:layout_width="48dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_alignParentBottom="true"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:background="?attr/borderless_button"
|
||||||
|
android:clickable="false"
|
||||||
|
android:focusable="false"
|
||||||
|
android:focusableInTouchMode="false"
|
||||||
|
android:paddingLeft="24dp"
|
||||||
|
android:paddingRight="8dp"
|
||||||
|
android:paddingTop="16dp"
|
||||||
|
android:scaleType="fitEnd"
|
||||||
|
android:src="?attr/spinner_button" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/txtvNumItems"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:layout_toLeftOf="@id/butAction"
|
||||||
|
android:textColor="@color/dark_blue"
|
||||||
|
android:textSize="@dimen/text_size_large"
|
||||||
|
android:textStyle="normal" />
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
|
@ -14,7 +14,7 @@
|
||||||
android:layout_marginTop="4dp"
|
android:layout_marginTop="4dp"
|
||||||
android:layout_toLeftOf="@+id/butAction"
|
android:layout_toLeftOf="@+id/butAction"
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
android:maxLines="2"
|
android:lines="2"
|
||||||
android:textColor="?android:attr/textColorPrimary"
|
android:textColor="?android:attr/textColorPrimary"
|
||||||
android:textSize="@dimen/text_size_medium" />
|
android:textSize="@dimen/text_size_medium" />
|
||||||
|
|
||||||
|
|
|
@ -11,5 +11,5 @@
|
||||||
<dimen name="text_size_medium">18sp</dimen>
|
<dimen name="text_size_medium">18sp</dimen>
|
||||||
<dimen name="text_size_large">22sp</dimen>
|
<dimen name="text_size_large">22sp</dimen>
|
||||||
<dimen name="status_indicator_width">36dp</dimen>
|
<dimen name="status_indicator_width">36dp</dimen>
|
||||||
<dimen name="thumbnail_length_itemlist">70dp</dimen>
|
<dimen name="thumbnail_length_itemlist">80dp</dimen>
|
||||||
</resources>
|
</resources>
|
|
@ -232,19 +232,25 @@ public class ExternalEpisodesListAdapter extends BaseExpandableListAdapter {
|
||||||
.findViewById(R.id.txtvHeaderTitle);
|
.findViewById(R.id.txtvHeaderTitle);
|
||||||
ImageButton actionButton = (ImageButton) convertView
|
ImageButton actionButton = (ImageButton) convertView
|
||||||
.findViewById(R.id.butAction);
|
.findViewById(R.id.butAction);
|
||||||
|
TextView numItems = (TextView) convertView.findViewById(R.id.txtvNumItems);
|
||||||
|
|
||||||
String headerString = null;
|
String headerString = null;
|
||||||
|
int childrenCount = 0;
|
||||||
|
|
||||||
if (groupPosition == 0) {
|
if (groupPosition == 0) {
|
||||||
headerString = context.getString(R.string.queue_label);
|
headerString = context.getString(R.string.queue_label);
|
||||||
if (manager.getQueueSize(true) > 0) {
|
childrenCount = getChildrenCount(GROUP_POS_QUEUE);
|
||||||
headerString += " (" + getChildrenCount(GROUP_POS_QUEUE) + ")";
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
headerString = context.getString(R.string.waiting_list_label);
|
headerString = context.getString(R.string.waiting_list_label);
|
||||||
if (manager.getUnreadItemsSize(true) > 0) {
|
childrenCount = getChildrenCount(GROUP_POS_UNREAD);
|
||||||
headerString += " (" + getChildrenCount(GROUP_POS_UNREAD) + ")";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
headerTitle.setText(headerString);
|
headerTitle.setText(headerString);
|
||||||
|
if (childrenCount <= 0) {
|
||||||
|
numItems.setVisibility(View.INVISIBLE);
|
||||||
|
} else {
|
||||||
|
numItems.setVisibility(View.VISIBLE);
|
||||||
|
numItems.setText(Integer.toString(childrenCount));
|
||||||
|
}
|
||||||
actionButton.setFocusable(false);
|
actionButton.setFocusable(false);
|
||||||
actionButton.setOnClickListener(new OnClickListener() {
|
actionButton.setOnClickListener(new OnClickListener() {
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue