mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2025-10-06 05:49:49 +02:00
Add an bottom app bar and an fab to ViewUserDetailActivity. Hide read posts in ViewUserDetailActivity.
This commit is contained in:
@@ -7,6 +7,12 @@
|
||||
android:id="@+id/coordinator_layout_view_subreddit_detail_activity"
|
||||
tools:application=".Activity.ViewSubredditDetailActivity">
|
||||
|
||||
<androidx.viewpager2.widget.ViewPager2
|
||||
android:id="@+id/view_pager_view_subreddit_detail_activity"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appbar_layout_view_subreddit_detail_activity"
|
||||
android:layout_width="match_parent"
|
||||
@@ -166,81 +172,11 @@
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<androidx.viewpager2.widget.ViewPager2
|
||||
android:id="@+id/view_pager_view_subreddit_detail_activity"
|
||||
<include
|
||||
layout="@layout/bottom_app_bar_other_pages"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
|
||||
|
||||
<com.google.android.material.bottomappbar.BottomAppBar
|
||||
android:id="@+id/bottom_navigation_view_subreddit_detail_activity"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom"
|
||||
android:visibility="gone"
|
||||
app:fabAlignmentMode="center">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/linear_layout_bottom_app_bar_view_subreddit_detail_activity"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="6dp"
|
||||
android:weightSum="5">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/option_1_bottom_app_bar_view_subreddit_detail_activity"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:src="@drawable/ic_home_black_24dp"
|
||||
android:background="?attr/selectableItemBackgroundBorderless" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/option_2_bottom_app_bar_view_subreddit_detail_activity"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:src="@drawable/ic_subscritptions_bottom_app_bar_24dp"
|
||||
android:background="?attr/selectableItemBackgroundBorderless" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:background="@android:color/transparent"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/option_3_bottom_app_bar_view_subreddit_detail_activity"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:src="@drawable/ic_inbox_24dp"
|
||||
android:background="?attr/selectableItemBackgroundBorderless" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/option_4_bottom_app_bar_view_subreddit_detail_activity"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:gravity="center"
|
||||
android:src="@drawable/ic_account_circle_24dp"
|
||||
android:background="?attr/selectableItemBackgroundBorderless" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.google.android.material.bottomappbar.BottomAppBar>
|
||||
android:layout_gravity="bottom" />
|
||||
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
android:id="@+id/fab_view_subreddit_detail_activity"
|
||||
@@ -248,7 +184,6 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="@dimen/fab_margin"
|
||||
android:visibility="gone"
|
||||
app:srcCompat="@drawable/ic_add_day_night_24dp"
|
||||
app:tint="@android:color/white"
|
||||
app:layout_anchor="@id/bottom_navigation_view_subreddit_detail_activity" />
|
||||
|
||||
|
@@ -139,4 +139,19 @@
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<include
|
||||
layout="@layout/bottom_app_bar_other_pages"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom" />
|
||||
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
android:id="@+id/fab_view_user_detail_activity"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="@dimen/fab_margin"
|
||||
android:visibility="gone"
|
||||
app:tint="@android:color/white"
|
||||
app:layout_anchor="@id/bottom_navigation_view_subreddit_detail_activity" />
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
66
app/src/main/res/layout/bottom_app_bar_other_pages.xml
Normal file
66
app/src/main/res/layout/bottom_app_bar_other_pages.xml
Normal file
@@ -0,0 +1,66 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.google.android.material.bottomappbar.BottomAppBar xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/bottom_navigation_view_subreddit_detail_activity"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
app:fabAlignmentMode="center">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/linear_layout_bottom_app_bar_view_subreddit_detail_activity"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="6dp"
|
||||
android:weightSum="5">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/option_1_bottom_app_bar_view_subreddit_detail_activity"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:background="?attr/selectableItemBackgroundBorderless" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/option_2_bottom_app_bar_view_subreddit_detail_activity"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:background="?attr/selectableItemBackgroundBorderless" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:background="@android:color/transparent"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/option_3_bottom_app_bar_view_subreddit_detail_activity"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:background="?attr/selectableItemBackgroundBorderless" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/option_4_bottom_app_bar_view_subreddit_detail_activity"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:gravity="center"
|
||||
android:background="?attr/selectableItemBackgroundBorderless" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.google.android.material.bottomappbar.BottomAppBar>
|
Reference in New Issue
Block a user