ui fixes started

This commit is contained in:
simon 2020-09-02 13:36:24 +03:00
parent ec69531993
commit 943f00a018
3 changed files with 11 additions and 3 deletions

View file

@ -150,7 +150,7 @@
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/address_button"
android:layout_width="wrap_content"
android:layout_height="@dimen/context_menu_buttons_bottom_height"
android:layout_height="@dimen/point_editor_fragment_expand_button_height"
android:layout_marginStart="@dimen/content_padding_half"
android:layout_marginLeft="@dimen/content_padding_half"
android:layout_marginTop="@dimen/content_padding_small"
@ -166,6 +166,11 @@
osmand:typeface="@string/font_roboto_medium"
tools:text="@string/add_address" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?attr/dashboard_divider" />
<LinearLayout
android:id="@+id/description"
android:layout_width="match_parent"
@ -206,7 +211,7 @@
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/description_button"
android:layout_width="wrap_content"
android:layout_height="@dimen/context_menu_buttons_bottom_height"
android:layout_height="@dimen/point_editor_fragment_expand_button_height"
android:layout_marginStart="@dimen/content_padding_half"
android:layout_marginLeft="@dimen/content_padding_half"
android:drawablePadding="8dp"

View file

@ -16,5 +16,6 @@
<dimen name="line_spacing_multiplier_description">1.2</dimen>
<dimen name="line_spacing_extra_description">5dp</dimen>
<dimen name="point_editor_fragment_expand_button_height">42dp</dimen>
</resources>

View file

@ -38,6 +38,7 @@ import androidx.fragment.app.FragmentActivity;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.google.android.material.textfield.TextInputEditText;
import com.google.android.material.textfield.TextInputLayout;
import net.osmand.AndroidUtils;
@ -273,8 +274,9 @@ public abstract class PointEditorFragmentNew extends BaseOsmAndFragment {
if (addressCaption.getVisibility() != View.VISIBLE) {
addressCaption.setVisibility(View.VISIBLE);
addAddressBtn.setText(view.getResources().getString(R.string.delete_address));
View addressEdit = view.findViewById(R.id.address_edit);
TextInputEditText addressEdit = view.findViewById(R.id.address_edit);
addressEdit.requestFocus();
addressEdit.setSelection(addressEdit.getText().length());
AndroidUtils.softKeyboardDelayed(requireActivity(),addressEdit);
} else {
addressCaption.setVisibility(View.GONE);