mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
* Fixed Night Mode Problem in Spinner #2809 * Reverted irrelevant changes
This commit is contained in:
parent
69b0f40358
commit
01696ccc0e
1 changed files with 4 additions and 7 deletions
|
|
@ -2,9 +2,6 @@ package fr.free.nrw.commons.upload;
|
|||
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.os.Build;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
|
@ -18,6 +15,8 @@ import java.util.Collections;
|
|||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import fr.free.nrw.commons.R;
|
||||
|
|
@ -126,16 +125,14 @@ public class SpinnerLanguagesAdapter extends ArrayAdapter {
|
|||
view.setVisibility(View.VISIBLE);
|
||||
if (languageCodesList.get(position).isEmpty()) {
|
||||
tvLanguage.setText(languageNamesList.get(position));
|
||||
tvLanguage.setTextColor(Color.GRAY);
|
||||
tvLanguage.setTextAlignment(View.TEXT_ALIGNMENT_CENTER);
|
||||
} else {
|
||||
tvLanguage.setText(
|
||||
String.format("%s [%s]", languageNamesList.get(position), languageCodesList.get(position)));
|
||||
if(selectedLanguages.containsKey(languageCodesList.get(position))&&
|
||||
!languageCodesList.get(position).equals(selectedLangCode))
|
||||
!languageCodesList.get(position).equals(selectedLangCode)) {
|
||||
tvLanguage.setTextColor(Color.GRAY);
|
||||
else
|
||||
tvLanguage.setTextColor(Color.BLACK);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue