我想在android中使用我自己的字体导航抽屉.我根据这个答案使用了android studio附带的库:https://stackoverflow.com/a/23632492/4393226.但我不知道如何更改字体并使其成为RTL.我搜索了很多,我发现了如何制作抽屉RTL.我用这个代码:
getWindow().getDecorView().setLayoutDirection(View.LAYOUT_DIRECTION_RTL);
但正如您所知,这仅适用于API 17及更高版本.请帮忙!如何更改菜单字体?如何以正确的方式进行布局RTL?!
编辑:我的字体"TTF"文件是资产/字体,我知道如何使用java设置文本视图,但我不知道如何将其设置为导航抽屉菜单.
我在RTL语言中有android输入游标的问题.当我在RTL支持布局时,我有两个输入光标,这真的很有趣.是否有真正的解决方案,摆脱这个?
我使用此代码来制作我的Android UI RTL:
getWindow().getDecorView().setLayoutDirection(View.LAYOUT_DIRECTION_RTL);
这是我的文本视图xml:
<android.support.design.widget.TextInputLayout
        android:id="@+id/input_layout"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">
        <EditText
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:inputType="numberDecimal"
            android:id="@+id/myID"
            android:maxLines="1"
            android:focusableInTouchMode="true"
            android:layout_weight="0.25"
            android:layout_gravity="center_horizontal"
            android:hint="phone Number"
            android:maxLength="20"
            android:gravity="center" />
    </android.support.design.widget.TextInputLayout>