fix align title text to the left side

This commit is contained in:
Skalii 2021-01-25 17:26:03 +02:00
parent 92217cba9f
commit becf77ca60
2 changed files with 6 additions and 0 deletions

View file

@ -2,6 +2,7 @@ package net.osmand.plus.onlinerouting.ui;
import android.text.Editable; import android.text.Editable;
import android.text.TextWatcher; import android.text.TextWatcher;
import android.view.Gravity;
import android.view.View; import android.view.View;
import android.view.View.OnClickListener; import android.view.View.OnClickListener;
import android.view.View.OnFocusChangeListener; import android.view.View.OnFocusChangeListener;
@ -79,6 +80,7 @@ public class OnlineRoutingCard extends BaseCard {
int activeColor = ContextCompat.getColor(app, appMode.getIconColorInfo().getColor(nightMode)); int activeColor = ContextCompat.getColor(app, appMode.getIconColorInfo().getColor(nightMode));
textFieldBoxes.setPrimaryColor(activeColor); textFieldBoxes.setPrimaryColor(activeColor);
textFieldBoxes.setGravityFloatingLabel(Gravity.START);
editText.addTextChangedListener(new TextWatcher() { editText.addTextChangedListener(new TextWatcher() {
@Override @Override

View file

@ -29,4 +29,8 @@ public class OsmandTextFieldBoxes extends TextFieldBoxes {
int paddingH = getResources().getDimensionPixelSize(R.dimen.route_info_card_details_margin); int paddingH = getResources().getDimensionPixelSize(R.dimen.route_info_card_details_margin);
inputLayout.setPadding(0, paddingH, 0, paddingH); inputLayout.setPadding(0, paddingH, 0, paddingH);
} }
public void setGravityFloatingLabel(int gravity) {
floatingLabel.setGravity(gravity);
}
} }