Added basic channel subscription and feed pages (#620)

Added basic channel subscription and feed pages

- Room Persistence for sqlite support.
- RxJava2 for reactive async support.
- Stetho for database inspection support.
- Enabled Multidex for debug build.
This commit is contained in:
Tonelico 2017-08-07 06:02:30 -07:00 committed by Mauricio Colli
parent cb5b0ff764
commit 10c4f7b465
33 changed files with 1775 additions and 32 deletions

View file

@ -49,7 +49,7 @@
android:layout_below="@id/channel_banner_image"
android:layout_marginLeft="8dp"
android:layout_marginTop="6dp"
android:layout_toLeftOf="@+id/channel_rss_button"
android:layout_toLeftOf="@+id/channel_subscribe_button"
android:layout_toRightOf="@+id/channel_avatar_layout"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textSize="@dimen/video_item_detail_title_text_size"
@ -70,15 +70,14 @@
tools:visibility="visible"/>
<Button
android:id="@+id/channel_rss_button"
android:id="@+id/channel_subscribe_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_below="@+id/channel_banner_image"
android:layout_gravity="center_vertical|right"
android:layout_marginRight="2dp"
android:drawableLeft="@drawable/ic_rss_feed_white_24dp"
android:text="@string/rss_button_title"
android:text="@string/subscribe_button_title"
android:textSize="@dimen/channel_rss_title_size"
android:theme="@style/RedButton"
android:visibility="gone"

View file

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:gravity="center">
<TextView
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="¯\\_(ツ)_/¯"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:text="Nothing Here But Crickets"
android:layout_gravity="center"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>

View file

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:tools="http://schemas.android.com/tools">
<include layout="@layout/main_bg" />
<include
android:id="@+id/error_panel"
layout="@layout/error_retry"
tools:visibility="visible"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="50dp"
android:visibility="gone" />
</RelativeLayout>

View file

@ -32,4 +32,14 @@
android:visibility="gone"
tools:visibility="visible" />
<include
android:id="@+id/empty_panel"
layout="@layout/empty_view_panel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_marginTop="50dp"
android:visibility="gone"
tools:visibility="visible"/>
</RelativeLayout>

View file

@ -1,8 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="match_parent"
android:layout_width="match_parent">
android:layout_width="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto">
<include layout="@layout/main_bg" />
<android.support.design.widget.TabLayout
android:id="@+id/main_tab_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
app:tabGravity="fill"/>
<android.support.v4.view.ViewPager
android:id="@+id/pager"
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:layout_above="@id/main_tab_layout"/>
</RelativeLayout>

View file

@ -0,0 +1,49 @@
<?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:focusable="true"
android:focusableInTouchMode="true">
<android.support.v7.widget.RecyclerView
android:id="@+id/result_list_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scrollbars="vertical"
app:layoutManager="LinearLayoutManager"
tools:listitem="@layout/channel_item"/>
<ProgressBar
android:id="@+id/loading_progress_bar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:indeterminate="true"
android:visibility="gone"
tools:visibility="visible"/>
<!--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_panel"
layout="@layout/empty_view_panel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_marginTop="50dp"
android:visibility="gone"
tools:visibility="visible"/>
</RelativeLayout>

View file

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/itemRoot"
android:layout_width="match_parent"
android:layout_height="@dimen/video_item_search_height"
android:background="?attr/selectableItemBackground"
android:clickable="false"
android:padding="@dimen/video_item_search_padding">
<TextView
android:id="@+id/load_more_text"
android:text="Load More"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textSize="@dimen/header_footer_text_size"
android:visibility="gone"/>
<ProgressBar
android:id="@+id/paginate_progress_bar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:visibility="gone"/>
</RelativeLayout>

View file

@ -0,0 +1,33 @@
<?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:id="@+id/channel_header_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="12dp">
<TextView
android:id="@+id/whatsNew"
android:layout_width="match_parent"
android:layout_height="50dp"
android:paddingLeft="12dp"
android:paddingRight="12dp"
android:drawableLeft="?attr/rss"
android:drawablePadding="5dp"
android:text="@string/fragment_whats_new"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textSize="@dimen/header_footer_text_size"
android:gravity="left|center"
android:clickable="true"
tools:ignore="RtlHardcoded"/>
<View
android:layout_width="match_parent"
android:layout_height="1px"
android:layout_marginLeft="8dp"
android:layout_marginRight="8dp"
android:layout_below="@id/whatsNew"
android:background="?attr/colorAccent" />
</RelativeLayout>