Merge pull request #10202 from osmandapp/fix-login-appereance
Fix outh login appearance
This commit is contained in:
commit
8245f31511
3 changed files with 19 additions and 1 deletions
4
OsmAnd/res/color/background_field.xml
Normal file
4
OsmAnd/res/color/background_field.xml
Normal file
|
@ -0,0 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:alpha="0.3" android:color="#CCCCCC"/>
|
||||
</selector>
|
4
OsmAnd/res/color/hint_label.xml
Normal file
4
OsmAnd/res/color/hint_label.xml
Normal file
|
@ -0,0 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:color="@color/text_color_secondary_light"/>
|
||||
</selector>
|
|
@ -3,11 +3,13 @@ package net.osmand.plus.settings.bottomsheets;
|
|||
import android.content.Context;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.widget.EditText;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.content.res.AppCompatResources;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
|
||||
|
@ -40,10 +42,13 @@ public class OsmLoginDataBottomSheet extends BasePreferenceBottomSheet {
|
|||
}
|
||||
OsmandApplication app = requiredMyApplication();
|
||||
|
||||
View view = UiUtilities.getInflater(context, nightMode).inflate(R.layout.osm_login_data, null);
|
||||
LayoutInflater themedInflater = UiUtilities.getInflater(requireContext(), nightMode);
|
||||
View view = themedInflater.inflate(R.layout.osm_login_data, null);
|
||||
|
||||
userNameEditText = view.findViewById(R.id.name_edit_text);
|
||||
passwordEditText = view.findViewById(R.id.password_edit_text);
|
||||
userNameEditText.setBackgroundColor(getResolvedColor(R.color.background_field));
|
||||
passwordEditText.setBackgroundColor(getResolvedColor(R.color.background_field));
|
||||
|
||||
String name = app.getSettings().USER_NAME.get();
|
||||
String password = app.getSettings().USER_PASSWORD.get();
|
||||
|
@ -59,6 +64,11 @@ public class OsmLoginDataBottomSheet extends BasePreferenceBottomSheet {
|
|||
TextInputLayout loginBox = view.findViewById(R.id.name_text_box);
|
||||
TextInputLayout passwordBox = view.findViewById(R.id.password_text_box);
|
||||
|
||||
loginBox.setBoxStrokeColor(getResolvedColor(R.color.osmand_orange));
|
||||
loginBox.setHintTextColor(AppCompatResources.getColorStateList(getContext(),R.color.hint_label));
|
||||
passwordBox.setBoxStrokeColor(getResolvedColor(R.color.osmand_orange));
|
||||
passwordBox.setHintTextColor(AppCompatResources.getColorStateList(getContext(),R.color.hint_label));
|
||||
|
||||
passwordBox.setStartIconDrawable(R.drawable.ic_action_lock);
|
||||
loginBox.setStartIconDrawable(R.drawable.ic_action_user_account);
|
||||
loginBox.setEndIconMode(TextInputLayout.END_ICON_CLEAR_TEXT);
|
||||
|
|
Loading…
Reference in a new issue