add selection for front page
This commit is contained in:
parent
5ebde97352
commit
65c8b6e66a
9 changed files with 387 additions and 19 deletions
42
app/src/main/res/layout/select_channel_fragment.xml
Normal file
42
app/src/main/res/layout/select_channel_fragment.xml
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/titleTextView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/select_a_channel"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_marginEnd="5dp"/>
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/items_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
tools:listitem="@layout/select_channel_item">
|
||||
</android.support.v7.widget.RecyclerView>
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/empty_state_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceListItem"
|
||||
android:text="@string/no_channel_subscribed_yet"
|
||||
android:layout_margin="10dp"/>
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progressBar"
|
||||
style="?android:attr/progressBarStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="5dp"/>
|
||||
</LinearLayout>
|
||||
38
app/src/main/res/layout/select_channel_item.xml
Normal file
38
app/src/main/res/layout/select_channel_item.xml
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
<?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:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:padding="5dp">
|
||||
|
||||
<de.hdodenhof.circleimageview.CircleImageView
|
||||
android:id="@+id/itemThumbnailView"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="42dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_marginRight="5dp"
|
||||
android:contentDescription="@string/list_thumbnail_view_description"
|
||||
android:src="@drawable/buddy"
|
||||
tools:ignore="RtlHardcoded"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/itemTitleView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginBottom="@dimen/video_item_search_image_right_margin"
|
||||
android:layout_toRightOf="@+id/itemThumbnailView"
|
||||
android:layout_toEndOf="@+id/itemThumbnailView"
|
||||
android:ellipsize="end"
|
||||
android:lines="1"
|
||||
android:textAppearance="?android:attr/textAppearanceListItem"
|
||||
tools:text="Channel Title, Lorem ipsum"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
|
@ -92,6 +92,7 @@
|
|||
<item>@string/black_theme_title</item>
|
||||
</string-array>
|
||||
|
||||
<!-- Content & History -->
|
||||
<string name="show_search_suggestions_key" translatable="false">show_search_suggestions</string>
|
||||
<string name="show_play_with_kodi_key" translatable="false">show_play_with_kodi</string>
|
||||
<string name="show_next_video_key" translatable="false">show_next_video</string>
|
||||
|
|
@ -101,6 +102,21 @@
|
|||
<string name="use_tor_key" translatable="false">use_tor</string>
|
||||
<string name="enable_search_history_key" translatable="false">enable_search_history</string>
|
||||
<string name="enable_watch_history_key" translatable="false">enable_watch_history</string>
|
||||
<string name="main_page_content_key" translatable="false">main_page_content</string>
|
||||
<string name="blank_page_key" translatable="false">blank_page</string>
|
||||
<string name="feed_page_key" translatable="false">feed_page</string>
|
||||
<string name="kiosk_page_key" translatable="false">kiosk_page</string>
|
||||
<string name="channel_page_key" translatable="false">channel_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/channel_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>
|
||||
<string name="main_page_selected_channel_url" translatable="false">main_page_selected_channel_url</string>
|
||||
<string name="main_page_selectd_kiosk_id" translatable="false">main_page_selectd_kiosk_id</string>
|
||||
|
||||
<!-- FileName Downloads -->
|
||||
<string name="settings_file_charset_key" translatable="false">file_rename</string>
|
||||
|
|
|
|||
|
|
@ -265,4 +265,15 @@
|
|||
<string name="history_empty">The history is empty</string>
|
||||
<string name="history_cleared">History cleared</string>
|
||||
<string name="item_deleted">Item deleted</string>
|
||||
|
||||
<!-- Content -->
|
||||
<string name="main_page_content">Content of main page</string>
|
||||
<string-array name="main_page_content_names">
|
||||
<item>Blank Page</item>
|
||||
<item>Trending Page</item>
|
||||
<item>Feed Page</item>
|
||||
<item>Channel Page</item>
|
||||
</string-array>
|
||||
<string name="select_a_channel">Select a channel</string>
|
||||
<string name="no_channel_subscribed_yet">No channel subscribed yet</string>
|
||||
</resources>
|
||||
|
|
|
|||
|
|
@ -21,5 +21,12 @@
|
|||
android:key="@string/show_search_suggestions_key"
|
||||
android:summary="@string/show_search_suggestions_summary"
|
||||
android:title="@string/show_search_suggestions_title"/>
|
||||
<ListPreference
|
||||
android:defaultValue="@string/kiosk_page_key"
|
||||
android:entries="@array/main_page_content_names"
|
||||
android:entryValues="@array/main_page_content_pages"
|
||||
android:key="@string/main_page_content_key"
|
||||
android:title="@string/main_page_content"
|
||||
android:summary="%s"/>
|
||||
|
||||
</PreferenceScreen>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue