I have a navigation bar with RecyclerView
that has different items. I wish to change the font size of it.
Here is the code for navigation_menu.xml
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/app_background"
android:textSize="30sp"
android:fillViewport="true">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<include layout="@layout/nav_header_main" />
<android.support.v7.widget.RecyclerView
android:id="@+id/recyclerView_main"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginStart="5dp"
android:layout_marginTop="5dp" />
</LinearLayout>
</ScrollView>
First and easiest way i think about is change the font size directly in your single item. But if for some reason you dont want to do so, try to read this: Android change TextView textSize on RecyclerView adapter from Activity
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With