forked from organicmaps/organicmaps
[android] Modified edit text container
This commit is contained in:
parent
5d76a71818
commit
6b8428fb69
3 changed files with 15 additions and 37 deletions
|
@ -19,19 +19,8 @@
|
|||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:minHeight="@dimen/height_block_base"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@string/robotoMedium"
|
||||
android:paddingStart="@dimen/margin_base"
|
||||
android:paddingRight="@dimen/margin_base"
|
||||
android:paddingEnd="@dimen/margin_base"
|
||||
android:paddingLeft="@dimen/margin_base"
|
||||
tools:ignore="UnusedAttribute"/>
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="@dimen/margin_base">
|
||||
<include layout="@layout/list_divider"/>
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
|
@ -44,19 +33,18 @@
|
|||
android:background="?attr/cardBackground"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<EditText
|
||||
android:id="@+id/edit_text_field"
|
||||
<com.mapswithme.maps.widget.CustomTextInputLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:layout_width="match_parent"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:hint="@string/name_placeholder"
|
||||
android:background="@null"
|
||||
android:layout_height="0dp"/>
|
||||
<View
|
||||
android:background="?attr/iconTintDisabled"
|
||||
android:layout_marginTop="@dimen/margin_half"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/divider_height"/>
|
||||
android:layout_height="0dp">
|
||||
<EditText
|
||||
android:id="@+id/edit_text_field"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:hint="@string/name_placeholder"
|
||||
android:textColorHint="?attr/iconTintDisabled"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
</com.mapswithme.maps.widget.CustomTextInputLayout>
|
||||
<TextView
|
||||
android:id="@+id/characters_amount"
|
||||
android:layout_gravity="end"
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
android:fillViewport="true">
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_marginTop="@dimen/margin_base"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<ProgressBar
|
||||
|
@ -21,16 +22,6 @@
|
|||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<TextView
|
||||
android:text="@string/custom_props_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="@dimen/margin_base"
|
||||
android:paddingBottom="@dimen/margin_base"
|
||||
android:paddingRight="@dimen/margin_half_double_plus"
|
||||
android:paddingEnd="@dimen/margin_half_double_plus"
|
||||
android:paddingLeft="@dimen/margin_half_double_plus"
|
||||
android:paddingStart="@dimen/margin_half_double_plus"/>
|
||||
<include layout="@layout/list_divider"/>
|
||||
<TextView
|
||||
android:text="@string/custom_props_desc"
|
||||
|
|
|
@ -70,13 +70,12 @@ public abstract class BaseEditUserBookmarkCategoryFragment extends BaseMwmToolba
|
|||
setHasOptionsMenu(true);
|
||||
mEditText = root.findViewById(R.id.edit_text_field);
|
||||
InputFilter[] inputFilters = { new InputFilter.LengthFilter(mTextLimit) };
|
||||
mEditText.setHint(getTitleText());
|
||||
mEditText.setFilters(inputFilters);
|
||||
mEditText.setText(getEditableText());
|
||||
mEditText.addTextChangedListener(new TextRestrictionWatcher());
|
||||
mCharactersAmountText = root.findViewById(R.id.characters_amount);
|
||||
mCharactersAmountText.setText(makeFormattedCharsAmount(getEditableText(), mTextLimit));
|
||||
TextView titleView = root.findViewById(R.id.title);
|
||||
titleView.setText(getTitleText());
|
||||
TextView summaryView = root.findViewById(R.id.summary);
|
||||
summaryView.setText(getTopSummaryText());
|
||||
summaryView.append(DOUBLE_BREAK_LINE_CHAR);
|
||||
|
|
Loading…
Add table
Reference in a new issue