I am coding a multi language application one of those languages is Arabic that when selected I want to RTLize everything even the drawer fragment programmatically, please find below the layout xml:
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:id="@+id/container_toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<include
android:id="@+id/toolbar"
layout="@layout/toolbar" />
</LinearLayout>
<FrameLayout
android:id="@+id/container_body"
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_weight="1" >
</FrameLayout>
</LinearLayout>
<fragment
android:id="@+id/fragment_navigation_drawer"
android:name="com.customview.albertaadm.testapplication.FragmentDrawer"
android:layout_width="@dimen/nav_drawer_width"
android:layout_height="match_parent"
android:layout_gravity="start"
app:layout="@layout/fragment_navigation_drawer"
tools:layout="@layout/fragment_navigation_drawer" />
So I managed to RLT the actionbar and whole buttons but using the following code:
if (Lang.equals("ar")) {
rtlizer = new ActionBarRtlizer(this, "toolbar");
ViewGroup actionBarView = rtlizer.getActionBarView();
ViewGroup homeView = (ViewGroup) rtlizer.findViewByClass("HomeView", actionBarView);
rtlizer.flipActionBarUpIconIfAvailable(homeView);
RtlizeEverything.rtlize(actionBarView);
RtlizeEverything.rtlize(homeView);
but how can I make the fragment_navigation_drawer to re-position on the right and get it open to the right? Thank you.