Saving last comment and dark theme fix
This commit is contained in:
parent
b0a4747dbe
commit
7c0a084ba9
2 changed files with 11 additions and 5 deletions
|
@ -4,6 +4,7 @@
|
|||
xmlns:osmand="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:theme="?attr/new_app_theme">
|
||||
|
||||
<LinearLayout
|
||||
|
@ -47,9 +48,10 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_marginRight="16dp"
|
||||
android:textColor="@color/dashboard_black"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
android:textSize="@dimen/default_desc_text_size"
|
||||
osmand:typeface="@string/font_roboto_medium"/>
|
||||
osmand:typeface="@string/font_roboto_medium"
|
||||
tools:text="poi name"/>
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
|
@ -84,9 +86,10 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_marginRight="16dp"
|
||||
android:textColor="@color/dashboard_black"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
android:textSize="@dimen/default_desc_text_size"
|
||||
osmand:typeface="@string/font_roboto_medium"/>
|
||||
osmand:typeface="@string/font_roboto_medium"
|
||||
tools:text="landmark"/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
|
|
|
@ -19,6 +19,7 @@ import net.osmand.plus.osmedit.OsmPoint;
|
|||
public class SendPoiDialogFragment extends DialogFragment {
|
||||
public static final String TAG = "SendPoiDialogFragment";
|
||||
public static final String OPENSTREETMAP_POINT = "openstreetmap_point";
|
||||
private static String comment;
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
|
@ -31,6 +32,7 @@ public class SendPoiDialogFragment extends DialogFragment {
|
|||
final EditText passwordEditText = (EditText) view.findViewById(R.id.passwordEditText);
|
||||
final CheckBox closeChangeSetCheckBox =
|
||||
(CheckBox) view.findViewById(R.id.closeChangeSetCheckBox);
|
||||
messageEditText.setText(comment);
|
||||
final OsmandSettings settings = ((OsmandApplication) getActivity().getApplication())
|
||||
.getSettings();
|
||||
userNameEditText.setText(settings.USER_NAME.get());
|
||||
|
@ -44,12 +46,13 @@ public class SendPoiDialogFragment extends DialogFragment {
|
|||
.setPositiveButton(R.string.shared_string_ok, new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
comment = messageEditText.getText().toString();
|
||||
settings.USER_NAME.set(userNameEditText.getText().toString());
|
||||
settings.USER_PASSWORD.set(passwordEditText.getText().toString());
|
||||
for (OsmPoint osmPoint : poi) {
|
||||
if (osmPoint.getGroup() == OsmPoint.Group.POI) {
|
||||
((OpenstreetmapPoint) osmPoint)
|
||||
.setComment(messageEditText.getText().toString());
|
||||
.setComment(comment);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue