-Added basic UI for local playlists.
-Added UI for watch history and most played fragments. -Added stream state table for storing playback timestamp and future usage. -Enabled playlist deletion.
This commit is contained in:
parent
689a138e17
commit
91c7dbef59
28 changed files with 1446 additions and 58 deletions
81
app/src/main/res/layout/bookmark_header.xml
Normal file
81
app/src/main/res/layout/bookmark_header.xml
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:background="?attr/selectableItemBackground">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/watchHistory"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:focusable="true">
|
||||
<ImageView
|
||||
android:id="@+id/watchHistoryIcon"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="28dp"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="12dp"
|
||||
android:layout_marginRight="12dp"
|
||||
android:src="?attr/history"
|
||||
tools:ignore="ContentDescription,RtlHardcoded"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/watchHistoryText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_toRightOf="@+id/watchHistoryIcon"
|
||||
android:gravity="left|center"
|
||||
android:text="@string/title_watch_history"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||
android:textSize="15sp"
|
||||
android:textStyle="bold"
|
||||
tools:ignore="RtlHardcoded"/>
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/mostWatched"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/watchHistory"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:focusable="true">
|
||||
<ImageView
|
||||
android:id="@+id/mostWatchedIcon"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="28dp"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="12dp"
|
||||
android:layout_marginRight="12dp"
|
||||
android:src="?attr/filter"
|
||||
tools:ignore="ContentDescription,RtlHardcoded"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/mostWatchedText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_toRightOf="@+id/mostWatchedIcon"
|
||||
android:gravity="left|center"
|
||||
android:text="@string/title_most_played"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||
android:textSize="15sp"
|
||||
android:textStyle="bold"
|
||||
tools:ignore="RtlHardcoded"/>
|
||||
</RelativeLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_below="@+id/mostWatched"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:background="?attr/separator_color"/>
|
||||
|
||||
</RelativeLayout>
|
||||
44
app/src/main/res/layout/fragment_bookmarks.xml
Normal file
44
app/src/main/res/layout/fragment_bookmarks.xml
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/items_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scrollbars="vertical"
|
||||
app:layoutManager="LinearLayoutManager"
|
||||
tools:listitem="@layout/list_playlist_mini_item"/>
|
||||
|
||||
<!--ERROR PANEL-->
|
||||
<include
|
||||
android:id="@+id/error_panel"
|
||||
layout="@layout/error_retry"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="50dp"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"/>
|
||||
|
||||
<include
|
||||
android:id="@+id/empty_state_view"
|
||||
layout="@layout/list_empty_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_marginTop="50dp"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"/>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="4dp"
|
||||
android:background="?attr/toolbar_shadow_drawable"
|
||||
android:layout_alignParentTop="true"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
<include
|
||||
android:id="@+id/empty_state_view"
|
||||
layout="@layout/subscription_feed_empty_view"
|
||||
layout="@layout/list_empty_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
|
||||
<include
|
||||
android:id="@+id/empty_state_view"
|
||||
layout="@layout/subscription_feed_empty_view"
|
||||
layout="@layout/list_empty_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
android:layout_alignParentTop="true"
|
||||
android:layout_marginRight="@dimen/video_item_search_image_right_margin"
|
||||
android:contentDescription="@string/list_thumbnail_view_description"
|
||||
android:scaleType="fitEnd"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/dummy_thumbnail_playlist"
|
||||
tools:ignore="RtlHardcoded"/>
|
||||
|
||||
|
|
|
|||
48
app/src/main/res/layout/local_playlist_header.xml
Normal file
48
app/src/main/res/layout/local_playlist_header.xml
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<RelativeLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/contrast_background_color">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/playlist_title_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:layout_marginTop="6dp"
|
||||
android:ellipsize="marquee"
|
||||
android:fadingEdge="horizontal"
|
||||
android:marqueeRepeatLimit="marquee_forever"
|
||||
android:scrollHorizontally="true"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||
android:textSize="@dimen/playlist_detail_title_text_size"
|
||||
tools:text="Mix musics #23 title Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc tristique vitae sem vitae blanditLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsum" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/playlist_stream_count"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/playlist_title_view"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginRight="6dp"
|
||||
android:ellipsize="end"
|
||||
android:gravity="right|center_vertical"
|
||||
android:maxLines="1"
|
||||
android:textSize="@dimen/playlist_detail_subtext_size"
|
||||
tools:ignore="RtlHardcoded"
|
||||
tools:text="234 videos"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/playlist_stream_count">
|
||||
|
||||
<include layout="@layout/playlist_control"/>
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
|
|
@ -119,12 +119,14 @@
|
|||
<string name="subscription_page_key" translatable="false">subscription_page_key</string>
|
||||
<string name="kiosk_page_key" translatable="false">kiosk_page</string>
|
||||
<string name="channel_page_key" translatable="false">channel_page</string>
|
||||
<string name="bookmark_page_key" translatable="false">bookmark_page</string>
|
||||
<string-array name="main_page_content_pages" translatable="false">
|
||||
<item>@string/blank_page_key</item>
|
||||
<item>@string/kiosk_page_key</item>
|
||||
<item>@string/feed_page_key</item>
|
||||
<item>@string/subscription_page_key</item>
|
||||
<item>@string/channel_page_key</item>
|
||||
<item>@string/bookmark_page_key</item>
|
||||
</string-array>
|
||||
<string name="main_page_selected_service" translatable="false">main_page_selected_service</string>
|
||||
<string name="main_page_selected_channel_name" translatable="false">main_page_selected_channel_name</string>
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@
|
|||
|
||||
<string name="tab_main">Main</string>
|
||||
<string name="tab_subscriptions">Subscriptions</string>
|
||||
<string name="tab_bookmarks">Bookmarks</string>
|
||||
|
||||
<string name="fragment_whats_new">What\'s New</string>
|
||||
|
||||
|
|
@ -304,6 +305,8 @@
|
|||
<string name="history_cleared">History cleared</string>
|
||||
<string name="item_deleted">Item deleted</string>
|
||||
<string name="delete_item_search_history">Do you want to delete this item from search history?</string>
|
||||
<string name="title_watch_history">Watch History</string>
|
||||
<string name="title_most_played">Most Played</string>
|
||||
|
||||
<!-- Content -->
|
||||
<string name="main_page_content">Content of main page</string>
|
||||
|
|
@ -370,5 +373,6 @@
|
|||
|
||||
<!-- Local Playlist -->
|
||||
<string name="create_playlist">Create New Playlist</string>
|
||||
<string name="delete_playlist">Delete Playlist</string>
|
||||
<string name="playlist_name_input">Name</string>
|
||||
</resources>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue