Set width for the edit texts depending on the number of characters

This commit is contained in:
Alexander Sytnyk 2018-02-19 19:16:30 +02:00
parent 0efcffb6d6
commit dc91def00c

View file

@ -644,6 +644,8 @@ public class CoordinateInputDialogFragment extends DialogFragment implements Osm
EditTextEx et = (EditTextEx) mainView.findViewById(etId); EditTextEx et = (EditTextEx) mainView.findViewById(etId);
et.setMaxSymbolsCount(symbols); et.setMaxSymbolsCount(symbols);
et.setHint(createHint(symbols, lat ? 'x' : 'y')); et.setHint(createHint(symbols, lat ? 'x' : 'y'));
((LinearLayout.LayoutParams) et.getLayoutParams()).weight = symbols;
et.requestLayout();
} }
private String createHint(int symbolsCount, char symbol) { private String createHint(int symbolsCount, char symbol) {