mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2025-10-05 21:39:50 +02:00
Start implementing showing subscribed subreddits in the nav drawer. Use a RecyclerView to display all the items in the nav drawer.
This commit is contained in:
@@ -20,7 +20,14 @@
|
||||
android:layout_gravity="start"
|
||||
android:background="?attr/backgroundColor">
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/nav_drawer_recycler_view_main_activity"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scrollbars="vertical"
|
||||
android:clipToPadding="false" />
|
||||
|
||||
<!--<androidx.core.widget.NestedScrollView
|
||||
android:id="@+id/nested_scroll_view_main_activity"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
@@ -237,7 +244,7 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
</androidx.core.widget.NestedScrollView>-->
|
||||
|
||||
</com.google.android.material.navigation.NavigationView>
|
||||
|
||||
|
5
app/src/main/res/layout/item_nav_drawer_divider.xml
Normal file
5
app/src/main/res/layout/item_nav_drawer_divider.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<View xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@color/dividerColor" />
|
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="16dp"
|
||||
android:text="@string/label_post"
|
||||
android:textSize="?attr/font_default" />
|
12
app/src/main/res/layout/item_nav_drawer_menu_item.xml
Normal file
12
app/src/main/res/layout/item_nav_drawer_menu_item.xml
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:drawablePadding="32dp"
|
||||
android:focusable="true"
|
||||
android:gravity="center_vertical"
|
||||
android:padding="16dp"
|
||||
android:textColor="@color/primaryTextColor"
|
||||
android:textSize="?attr/font_default" />
|
27
app/src/main/res/layout/item_nav_drawer_subscribed_thing.xml
Normal file
27
app/src/main/res/layout/item_nav_drawer_subscribed_thing.xml
Normal file
@@ -0,0 +1,27 @@
|
||||
<?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="wrap_content"
|
||||
android:padding="16dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:background="?attr/selectableItemBackground">
|
||||
|
||||
<pl.droidsonroids.gif.GifImageView
|
||||
android:id="@+id/thing_icon_gif_image_view_item_nav_drawer_subscribed_thing"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginEnd="32dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/thing_name_text_view_item_nav_drawer_subscribed_thing"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:textColor="@color/primaryTextColor"
|
||||
android:textSize="?attr/font_default"
|
||||
android:layout_gravity="center_vertical" />
|
||||
|
||||
</LinearLayout>
|
Reference in New Issue
Block a user