Do not open keyboard in save as track dialog
This commit is contained in:
parent
32986f1b64
commit
19f91cf13d
3 changed files with 9 additions and 3 deletions
|
@ -4,6 +4,7 @@
|
|||
android:layout_height="wrap_content">
|
||||
|
||||
<android.support.design.widget.TextInputLayout
|
||||
android:id="@+id/name_text_box"
|
||||
android:paddingEnd="@dimen/bottom_sheet_content_padding"
|
||||
android:paddingLeft="@dimen/bottom_sheet_content_padding"
|
||||
android:paddingRight="@dimen/bottom_sheet_content_padding"
|
||||
|
|
|
@ -4,7 +4,8 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<studio.carbonylgroup.textfieldboxes.TextFieldBoxes
|
||||
<net.osmand.plus.OsmandTextFieldBoxes
|
||||
android:id="@+id/name_text_box"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingEnd="@dimen/bottom_sheet_content_padding"
|
||||
|
@ -18,6 +19,6 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
</studio.carbonylgroup.textfieldboxes.TextFieldBoxes>
|
||||
</net.osmand.plus.OsmandTextFieldBoxes>
|
||||
|
||||
</LinearLayout>
|
|
@ -18,6 +18,7 @@ import android.widget.LinearLayout;
|
|||
|
||||
import net.osmand.AndroidUtils;
|
||||
import net.osmand.IndexConstants;
|
||||
import net.osmand.plus.OsmandTextFieldBoxes;
|
||||
import net.osmand.plus.R;
|
||||
import net.osmand.plus.activities.MapActivity;
|
||||
import net.osmand.plus.base.BottomSheetDialogFragment;
|
||||
|
@ -79,7 +80,10 @@ public class SaveAsTrackBottomSheetDialogFragment extends BottomSheetDialogFragm
|
|||
}
|
||||
final EditText nameEditText = (EditText) mainView.findViewById(R.id.name_edit_text);
|
||||
nameEditText.setText(displayedName);
|
||||
nameEditText.requestFocus();
|
||||
View textBox = mainView.findViewById(R.id.name_text_box);
|
||||
if (textBox instanceof OsmandTextFieldBoxes) {
|
||||
((OsmandTextFieldBoxes) textBox).activate(true);
|
||||
}
|
||||
|
||||
mainView.findViewById(R.id.save_button).setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue