In my application, I want to go through a certain menu depending on some conditions.
This is the layout:
<android.support.design.widget.NavigationView android:id="@+id/nav_view_free" android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_gravity="start" android:fitsSystemWindows="true" android:background="@color/Color_White" app:headerLayout="@layout/nav_header_main" app:menu="@menu/activity_main_drawer_1" />
All I want to do is dynamically change @ menu / activity_main_drawer_1 depending on some conditions.
How can I do this programmatically?
source share