diff options
Diffstat (limited to 'app/src/main/res')
-rw-r--r-- | app/src/main/res/layout/activity_trending.xml | 42 | ||||
-rw-r--r-- | app/src/main/res/layout/item_trending_search.xml | 66 | ||||
-rw-r--r-- | app/src/main/res/values/strings.xml | 1 |
3 files changed, 109 insertions, 0 deletions
diff --git a/app/src/main/res/layout/activity_trending.xml b/app/src/main/res/layout/activity_trending.xml new file mode 100644 index 00000000..bdafaea5 --- /dev/null +++ b/app/src/main/res/layout/activity_trending.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="utf-8"?> +<androidx.coordinatorlayout.widget.CoordinatorLayout 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:id="@+id/coordinator_layout_trending_activity" + tools:context=".activities.TrendingActivity"> + + <com.google.android.material.appbar.AppBarLayout + android:id="@+id/appbar_layout_trending_activity" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:theme="@style/AppTheme.AppBarOverlay"> + + <com.google.android.material.appbar.CollapsingToolbarLayout + android:id="@+id/collapsing_toolbar_layout_trending_activity" + android:layout_width="match_parent" + android:layout_height="match_parent" + app:layout_scrollFlags="scroll|enterAlways" + app:titleEnabled="false" + app:toolbarId="@+id/toolbar_trending_activity"> + + <androidx.appcompat.widget.Toolbar + android:id="@+id/toolbar_trending_activity" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:minHeight="?attr/actionBarSize" + app:popupTheme="@style/AppTheme.PopupOverlay" + app:navigationIcon="?attr/homeAsUpIndicator" /> + + </com.google.android.material.appbar.CollapsingToolbarLayout> + + </com.google.android.material.appbar.AppBarLayout> + + <androidx.recyclerview.widget.RecyclerView + android:id="@+id/recycler_view_trending_activity" + android:layout_width="match_parent" + android:layout_height="match_parent" + app:layout_behavior="@string/appbar_scrolling_view_behavior" /> + +</androidx.coordinatorlayout.widget.CoordinatorLayout>
\ No newline at end of file diff --git a/app/src/main/res/layout/item_trending_search.xml b/app/src/main/res/layout/item_trending_search.xml new file mode 100644 index 00000000..c5bc3a66 --- /dev/null +++ b/app/src/main/res/layout/item_trending_search.xml @@ -0,0 +1,66 @@ +<?xml version="1.0" encoding="utf-8"?> +<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="8dp" + android:layout_marginBottom="8dp"> + + <RelativeLayout + android:id="@+id/image_wrapper_relative_layout_item_trending_search" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:visibility="gone"> + + <ml.docilealligator.infinityforreddit.customviews.AspectRatioGifImageView + android:id="@+id/image_view_item_trending_search" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:adjustViewBounds="true" + android:scaleType="fitStart" /> + + <ProgressBar + android:id="@+id/progress_bar_item_trending_search" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_centerInParent="true" /> + + <RelativeLayout + android:id="@+id/load_image_error_relative_layout_item_trending_search" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:layout_centerInParent="true" + android:visibility="gone"> + + <TextView + android:id="@+id/load_image_error_text_view_item_trending_search" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:drawableTop="@drawable/ic_error_outline_black_24dp" + android:layout_gravity="center" + android:gravity="center" + android:text="@string/error_loading_image_tap_to_retry" + android:textSize="?attr/font_default" + android:fontFamily="?attr/font_family" /> + + </RelativeLayout> + + </RelativeLayout> + + <ImageView + android:id="@+id/image_view_no_preview_gallery_item_trending_search" + android:layout_width="match_parent" + android:layout_height="150dp" + android:scaleType="center" + android:src="@drawable/ic_image_24dp" + android:visibility="gone" /> + + <TextView + android:id="@+id/title_text_view_item_trending_search" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_gravity="bottom" + android:maxLines="2" + android:textSize="?attr/title_font_18" + android:fontFamily="?attr/title_font_family" /> + +</com.google.android.material.card.MaterialCardView>
\ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 1fe79042..19a82058 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -41,6 +41,7 @@ <string name="multireddit_selection_activity_label">Select a Multireddit</string> <string name="rpan_activity_label">RPAN</string> <string name="post_gallery_activity_label">Gallery Post</string> + <string name="trending_activity_label">Trending</string> <string name="navigation_drawer_open">Open navigation drawer</string> <string name="navigation_drawer_close">Close navigation drawer</string> |