diff options
author | Alex Ning <chineseperson5@gmail.com> | 2019-08-10 10:29:04 +0000 |
---|---|---|
committer | Alex Ning <chineseperson5@gmail.com> | 2019-08-10 10:29:04 +0000 |
commit | 413a18f6d39bf274369d7a1ee3279e20d3a608a7 (patch) | |
tree | b4b12366690744fd18a0caa4fe8b27e938716532 /app/src/main/res | |
parent | 4c21eea852e08d0c65b3eb917b04404722d28f5d (diff) | |
download | infinity-for-reddit-413a18f6d39bf274369d7a1ee3279e20d3a608a7.tar infinity-for-reddit-413a18f6d39bf274369d7a1ee3279e20d3a608a7.tar.gz infinity-for-reddit-413a18f6d39bf274369d7a1ee3279e20d3a608a7.tar.bz2 infinity-for-reddit-413a18f6d39bf274369d7a1ee3279e20d3a608a7.tar.lz infinity-for-reddit-413a18f6d39bf274369d7a1ee3279e20d3a608a7.tar.xz infinity-for-reddit-413a18f6d39bf274369d7a1ee3279e20d3a608a7.tar.zst infinity-for-reddit-413a18f6d39bf274369d7a1ee3279e20d3a608a7.zip |
Make navigation bar and status bar transparent to display posts, comments, subreddits and users under them. Minor UI tweaks for bottom sheet fragments.
Diffstat (limited to '')
-rw-r--r-- | app/src/main/res/layout/activity_search_result.xml | 52 | ||||
-rw-r--r-- | app/src/main/res/layout/activity_subscribed_thing_listing.xml | 20 | ||||
-rw-r--r-- | app/src/main/res/layout/app_bar_main.xml | 2 | ||||
-rw-r--r-- | app/src/main/res/layout/fragment_comments_listing.xml | 3 | ||||
-rw-r--r-- | app/src/main/res/layout/fragment_followed_users_listing.xml | 3 | ||||
-rw-r--r-- | app/src/main/res/layout/fragment_post.xml | 3 | ||||
-rw-r--r-- | app/src/main/res/layout/fragment_subreddit_listing.xml | 3 | ||||
-rw-r--r-- | app/src/main/res/layout/fragment_subscribed_subreddits_listing.xml | 3 | ||||
-rw-r--r-- | app/src/main/res/layout/fragment_user_listing.xml | 3 | ||||
-rw-r--r-- | app/src/main/res/values-night/colors.xml | 2 | ||||
-rw-r--r-- | app/src/main/res/values-sw600dp/attr.xml | 4 | ||||
-rw-r--r-- | app/src/main/res/values/attr.xml | 4 | ||||
-rw-r--r-- | app/src/main/res/values/colors.xml | 2 | ||||
-rw-r--r-- | app/src/main/res/values/styles.xml | 2 |
14 files changed, 71 insertions, 35 deletions
diff --git a/app/src/main/res/layout/activity_search_result.xml b/app/src/main/res/layout/activity_search_result.xml index 797b08d3..8620b0ec 100644 --- a/app/src/main/res/layout/activity_search_result.xml +++ b/app/src/main/res/layout/activity_search_result.xml @@ -11,38 +11,48 @@ android:layout_height="wrap_content" android:theme="@style/AppTheme.AppBarOverlay"> - <FrameLayout + <com.google.android.material.appbar.CollapsingToolbarLayout android:layout_width="match_parent" - android:layout_height="wrap_content"> + android:layout_height="match_parent" + app:layout_scrollFlags="scroll|enterAlways" + app:titleEnabled="false" + app:toolbarId="@+id/toolbar_search_result_activity"> - <androidx.appcompat.widget.Toolbar - android:id="@+id/toolbar_search_result_activity" + <FrameLayout android:layout_width="match_parent" - android:layout_height="?attr/actionBarSize" - android:background="?attr/colorPrimary" - app:popupTheme="@style/AppTheme.PopupOverlay" /> + android:layout_height="wrap_content"> - <com.ferfalk.simplesearchview.SimpleSearchView - android:id="@+id/search_view_search_result_activity" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:textColor="@android:color/white" - app:voiceSearch="true" - app:searchBackground="@color/colorPrimary" - app:cursorColor="@android:color/white" - app:hintColor="#E0E0E0" - app:iconsTint="@android:color/white" - app:backIconTint="@android:color/white" - app:iconsAlpha="1" - app:backIconAlpha="1" /> + <androidx.appcompat.widget.Toolbar + android:id="@+id/toolbar_search_result_activity" + android:layout_width="match_parent" + android:layout_height="?attr/actionBarSize" + android:background="?attr/colorPrimary" + app:popupTheme="@style/AppTheme.PopupOverlay" /> + + <com.ferfalk.simplesearchview.SimpleSearchView + android:id="@+id/search_view_search_result_activity" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:textColor="@android:color/white" + app:voiceSearch="true" + app:searchBackground="@color/colorPrimary" + app:cursorColor="@android:color/white" + app:hintColor="#E0E0E0" + app:iconsTint="@android:color/white" + app:backIconTint="@android:color/white" + app:iconsAlpha="1" + app:backIconAlpha="1" /> + + </FrameLayout> - </FrameLayout> + </com.google.android.material.appbar.CollapsingToolbarLayout> <com.google.android.material.tabs.TabLayout android:id="@+id/tab_layout_search_result_activity" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@color/colorPrimary" + app:layout_scrollFlags="scroll|enterAlways" app:tabGravity="fill" app:tabMode="fixed" app:tabIndicatorColor="@android:color/white" diff --git a/app/src/main/res/layout/activity_subscribed_thing_listing.xml b/app/src/main/res/layout/activity_subscribed_thing_listing.xml index c448e631..45092748 100644 --- a/app/src/main/res/layout/activity_subscribed_thing_listing.xml +++ b/app/src/main/res/layout/activity_subscribed_thing_listing.xml @@ -12,18 +12,28 @@ android:layout_height="wrap_content" android:theme="@style/AppTheme.AppBarOverlay"> - <androidx.appcompat.widget.Toolbar - android:id="@+id/toolbar_subscribed_thing_listing_activity" + <com.google.android.material.appbar.CollapsingToolbarLayout android:layout_width="match_parent" - android:layout_height="?attr/actionBarSize" - android:background="?attr/colorPrimary" - app:popupTheme="@style/AppTheme.PopupOverlay" /> + android:layout_height="match_parent" + app:layout_scrollFlags="scroll|enterAlways" + app:titleEnabled="false" + app:toolbarId="@+id/toolbar_subscribed_thing_listing_activity"> + + <androidx.appcompat.widget.Toolbar + android:id="@+id/toolbar_subscribed_thing_listing_activity" + android:layout_width="match_parent" + android:layout_height="?attr/actionBarSize" + android:background="?attr/colorPrimary" + app:popupTheme="@style/AppTheme.PopupOverlay" /> + + </com.google.android.material.appbar.CollapsingToolbarLayout> <com.google.android.material.tabs.TabLayout android:id="@+id/tab_layout_subscribed_thing_listing_activity" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@color/colorPrimary" + app:layout_scrollFlags="scroll|enterAlways" app:tabGravity="fill" app:tabMode="fixed" app:tabIndicatorColor="@android:color/white" diff --git a/app/src/main/res/layout/app_bar_main.xml b/app/src/main/res/layout/app_bar_main.xml index 46a388a9..27a54b4c 100644 --- a/app/src/main/res/layout/app_bar_main.xml +++ b/app/src/main/res/layout/app_bar_main.xml @@ -4,9 +4,11 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" + android:id="@+id/coordinator_layout_main_activity" tools:application="ml.docilealligator.infinityforreddit.MainActivity"> <com.google.android.material.appbar.AppBarLayout + android:id="@+id/appbar_layout_main_activity" android:layout_width="match_parent" android:layout_height="wrap_content" android:theme="@style/AppTheme.AppBarOverlay"> diff --git a/app/src/main/res/layout/fragment_comments_listing.xml b/app/src/main/res/layout/fragment_comments_listing.xml index e0741118..7dfb31e4 100644 --- a/app/src/main/res/layout/fragment_comments_listing.xml +++ b/app/src/main/res/layout/fragment_comments_listing.xml @@ -21,7 +21,8 @@ <androidx.recyclerview.widget.RecyclerView android:id="@+id/recycler_view_comments_listing_fragment" android:layout_width="match_parent" - android:layout_height="match_parent" /> + android:layout_height="match_parent" + android:clipToPadding="false" /> <LinearLayout android:id="@+id/fetch_comments_info_linear_layout_comments_listing_fragment" diff --git a/app/src/main/res/layout/fragment_followed_users_listing.xml b/app/src/main/res/layout/fragment_followed_users_listing.xml index c7e33729..e5b64728 100644 --- a/app/src/main/res/layout/fragment_followed_users_listing.xml +++ b/app/src/main/res/layout/fragment_followed_users_listing.xml @@ -8,7 +8,8 @@ <androidx.recyclerview.widget.RecyclerView android:id="@+id/recycler_view_followed_users_listing_fragment" android:layout_width="match_parent" - android:layout_height="match_parent" /> + android:layout_height="match_parent" + android:clipToPadding="false" /> <LinearLayout android:id="@+id/no_subscriptions_linear_layout_followed_users_listing_fragment" diff --git a/app/src/main/res/layout/fragment_post.xml b/app/src/main/res/layout/fragment_post.xml index 27add5a2..dcacaf49 100644 --- a/app/src/main/res/layout/fragment_post.xml +++ b/app/src/main/res/layout/fragment_post.xml @@ -20,7 +20,8 @@ <androidx.recyclerview.widget.RecyclerView android:id="@+id/recycler_view_post_fragment" android:layout_width="match_parent" - android:layout_height="match_parent" /> + android:layout_height="match_parent" + android:clipToPadding="false" /> <LinearLayout android:id="@+id/fetch_post_info_linear_layout_post_fragment" diff --git a/app/src/main/res/layout/fragment_subreddit_listing.xml b/app/src/main/res/layout/fragment_subreddit_listing.xml index 1b789601..d460b569 100644 --- a/app/src/main/res/layout/fragment_subreddit_listing.xml +++ b/app/src/main/res/layout/fragment_subreddit_listing.xml @@ -21,7 +21,8 @@ <androidx.recyclerview.widget.RecyclerView android:id="@+id/recycler_view_subreddit_listing_fragment" android:layout_width="match_parent" - android:layout_height="match_parent" /> + android:layout_height="match_parent" + android:clipToPadding="false" /> <LinearLayout android:id="@+id/fetch_subreddit_listing_info_linear_layout_subreddit_listing_fragment" diff --git a/app/src/main/res/layout/fragment_subscribed_subreddits_listing.xml b/app/src/main/res/layout/fragment_subscribed_subreddits_listing.xml index 2263dd7c..25294baf 100644 --- a/app/src/main/res/layout/fragment_subscribed_subreddits_listing.xml +++ b/app/src/main/res/layout/fragment_subscribed_subreddits_listing.xml @@ -8,7 +8,8 @@ <androidx.recyclerview.widget.RecyclerView android:id="@+id/recycler_view_subscribed_subreddits_listing_fragment" android:layout_width="match_parent" - android:layout_height="match_parent" /> + android:layout_height="match_parent" + android:clipToPadding="false" /> <LinearLayout android:id="@+id/no_subscriptions_linear_layout_subreddits_listing_fragment" diff --git a/app/src/main/res/layout/fragment_user_listing.xml b/app/src/main/res/layout/fragment_user_listing.xml index b2e55538..91eb926e 100644 --- a/app/src/main/res/layout/fragment_user_listing.xml +++ b/app/src/main/res/layout/fragment_user_listing.xml @@ -21,7 +21,8 @@ <androidx.recyclerview.widget.RecyclerView android:id="@+id/recycler_view_user_listing_fragment" android:layout_width="match_parent" - android:layout_height="match_parent" /> + android:layout_height="match_parent" + android:clipToPadding="false" /> <LinearLayout android:id="@+id/fetch_user_listing_info_linear_layout_user_listing_fragment" diff --git a/app/src/main/res/values-night/colors.xml b/app/src/main/res/values-night/colors.xml index e79b7fa2..4827628f 100644 --- a/app/src/main/res/values-night/colors.xml +++ b/app/src/main/res/values-night/colors.xml @@ -26,7 +26,7 @@ <color name="roundedBottomSheetPrimaryBackground">#242424</color> - <color name="roundedBottomSheetPrimaryNavigationBarColor">#000000</color> + <color name="roundedBottomSheetPrimaryNavigationBarColor">@color/roundedBottomSheetPrimaryBackground</color> <color name="voteUnavailableVoteButtonColor">#3C3C3C</color> diff --git a/app/src/main/res/values-sw600dp/attr.xml b/app/src/main/res/values-sw600dp/attr.xml new file mode 100644 index 00000000..d3a0e92c --- /dev/null +++ b/app/src/main/res/values-sw600dp/attr.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <bool name="isTablet">true</bool> +</resources>
\ No newline at end of file diff --git a/app/src/main/res/values/attr.xml b/app/src/main/res/values/attr.xml new file mode 100644 index 00000000..f855de6a --- /dev/null +++ b/app/src/main/res/values/attr.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <bool name="isTablet">false</bool> +</resources>
\ No newline at end of file diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index b69907f3..2f5b389f 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -26,7 +26,7 @@ <color name="roundedBottomSheetPrimaryBackground">#FFFFFF</color> - <color name="roundedBottomSheetPrimaryNavigationBarColor">#000000</color> + <color name="roundedBottomSheetPrimaryNavigationBarColor">@color/roundedBottomSheetPrimaryBackground</color> <color name="voteUnavailableVoteButtonColor">#F0F0F0</color> diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index 596e3813..75f23b15 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -1,4 +1,4 @@ -<resources> +<resources xmlns:tools="http://schemas.android.com/tools"> <!-- Base application theme. --> <style name="AppTheme" parent="Theme.MaterialComponents.DayNight"> |