mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
resolved rtl issue in category (#2567)
* resolved rtl issue in category * combined nested if * modified code
This commit is contained in:
parent
0a3d8c09a7
commit
2e23658b77
1 changed files with 8 additions and 0 deletions
|
|
@ -1,5 +1,8 @@
|
|||
package fr.free.nrw.commons.upload;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.res.Configuration;
|
||||
import android.os.Build;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
|
@ -29,8 +32,13 @@ public class UploadCategoriesRenderer extends Renderer<CategoryItem> {
|
|||
@Override
|
||||
protected void setUpView(View view) {
|
||||
ButterKnife.bind(this, view);
|
||||
Configuration config = getContext().getResources().getConfiguration();
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1 && config.getLayoutDirection() == View.LAYOUT_DIRECTION_RTL) {
|
||||
checkedView.setLayoutDirection(View.LAYOUT_DIRECTION_LTR);
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressLint("WrongConstant")
|
||||
@Override
|
||||
protected void hookListeners(View view) {
|
||||
view.setOnClickListener(v -> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue