Make navigation bar and status bar transparent to display posts, comments, subreddits and users under them. Minor UI tweaks for bottom sheet fragments.

This commit is contained in:
Alex Ning
2019-08-10 18:29:04 +08:00
parent 4c21eea852
commit 413a18f6d3
31 changed files with 476 additions and 115 deletions

View File

@@ -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" />
</FrameLayout>
<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>
</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"

View File

@@ -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"

View File

@@ -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">

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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>

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<bool name="isTablet">true</bool>
</resources>

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<bool name="isTablet">false</bool>
</resources>

View File

@@ -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>

View File

@@ -1,4 +1,4 @@
<resources>
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.MaterialComponents.DayNight">