ListView layout inconsistent rendering with RTL languages (Arabic)

后端 未结 6 1288
鱼传尺愫
鱼传尺愫 2021-01-17 23:44

I have simple ListView with ArrayAdapter which is working just fine. The problems start with RTL language (Arabic in this case).

W

6条回答
  •  一整个雨季
    2021-01-18 00:01

    Try manually setting the direction based on configuration (that is quite reliably updated based on device language) by adding rowView.setLayoutDirection(getContext().getResources().getConfiguration().getLayoutDirection()); in the getView of your ListAdapter.

    From: ListView's first entry always incorrect for RTL

    This solved my problem that was similar to your.

提交回复
热议问题