What I want to achieve is similar to this question (I can't comment so far, that is why I created the new question). I want this menu on the right side in the landscape mode (my activity allows only landscape). I need it to be scaled for any device size. It should have 5 items.
For now, I wanted to do this by NavigationView
like this:
<android.support.design.widget.NavigationView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/nav_show"
android:layout_width="56dp"
android:layout_height="match_parent"
android:layout_alignParentEnd="true"
android:background="@android:color/white"
android:theme="@style/RightNav"
app:itemBackground="@android:color/white"
app:itemIconTint="@drawable/nav_item_color_state"
app:itemTextColor="@drawable/nav_item_color_state"
app:menu="@menu/nav_items_show" />
with style:
<style name="RightNav">
<item name="android:textSize">10sp</item><!-- text size in menu-->
<item name="android:listPreferredItemHeightSmall">90dp</item><!-- item size in menu-->
<item name="listPreferredItemHeightSmall">90dp</item><!-- item size in menu-->
</style>
and menu items:
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:id="@+id/a1"
android:title="a1" />
<item
android:id="@+id/a2"
android:title="a2" />
<item
android:id="@+id/a3"
android:title="a3" />
<item
android:id="@+id/a4"
android:title="a4" />
<item
android:id="@+id/a5"
android:title="a5" />
</menu>
I can switch between fragments etc. this is not the problem. I can't deal with the design only. The biggest issue is that I can't add the icons to match material.io
rules. Another problem is that I need to scroll over menu items if the device is too small.
I do not ask you for doing it for me. I'm here for any kind of advice to do it myself. Thanks!