Android 如何动态地将小部件强制到右侧?

Android 如何动态地将小部件强制到右侧?,android,android-layout,Android,Android Layout,我使用库,我有以下布局: <com.plumillonforge.android.chipview.ChipView android:id="@+id/chip_view" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginBottom="10dp&qu

我使用库,我有以下布局:

<com.plumillonforge.android.chipview.ChipView
    android:id="@+id/chip_view"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginBottom="10dp"
    chip:chip_background="@color/primaryColor"
    android:visibility="gone" />

出于某种原因,它没有检测到应用程序是RTL语言,它保持芯片从左到右(而不是从右到左)。这是一个第三方库,所以有什么我可以做的,以使它检测RTL?我希望它在LTR模式下是LTR,在RTL模式下是RTL,而不是强迫它总是RTL。如果需要动态更改,请演示如何使用Java进行更改