mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 12:23:58 +01:00
Added option to show and modify location while uploading (#4475)
* initial commit * Everything done * minor modification * minor modification * Issues fixed * minor modifications * issue fixed * Issues fixed
This commit is contained in:
parent
2c785f88fa
commit
e9a2c32527
7 changed files with 282 additions and 32 deletions
|
|
@ -2,7 +2,6 @@ package fr.free.nrw.commons.LocationPicker;
|
|||
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import androidx.annotation.NonNull;
|
||||
import com.mapbox.mapboxsdk.camera.CameraPosition;
|
||||
|
||||
/**
|
||||
|
|
@ -33,25 +32,34 @@ public final class LocationPicker {
|
|||
|
||||
/**
|
||||
* Gets and puts location in intent
|
||||
*
|
||||
* @param position CameraPosition
|
||||
* @return LocationPicker.IntentBuilder
|
||||
*/
|
||||
public LocationPicker.IntentBuilder defaultLocation(
|
||||
final CameraPosition position) {
|
||||
intent.putExtra(LocationPickerConstants.MAP_CAMERA_POSITION, position);
|
||||
return this;
|
||||
intent.putExtra(LocationPickerConstants.MAP_CAMERA_POSITION, position);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets and puts activity name in intent
|
||||
* @param activity activity key
|
||||
* @return LocationPicker.IntentBuilder
|
||||
*/
|
||||
public LocationPicker.IntentBuilder activityKey(
|
||||
final String activity) {
|
||||
intent.putExtra(LocationPickerConstants.ACTIVITY_KEY, activity);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets and sets the activity
|
||||
*
|
||||
* @param activity Activity
|
||||
* @return Intent
|
||||
*/
|
||||
public Intent build(final Activity activity) {
|
||||
intent.setClass(activity, LocationPickerActivity.class);
|
||||
return intent;
|
||||
public Intent build(final Activity activity) {
|
||||
intent.setClass(activity, LocationPickerActivity.class);
|
||||
return intent;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,12 +1,23 @@
|
|||
package fr.free.nrw.commons.LocationPicker;
|
||||
|
||||
import static com.mapbox.mapboxsdk.style.layers.Property.NONE;
|
||||
import static com.mapbox.mapboxsdk.style.layers.Property.VISIBLE;
|
||||
import static com.mapbox.mapboxsdk.style.layers.PropertyFactory.iconAllowOverlap;
|
||||
import static com.mapbox.mapboxsdk.style.layers.PropertyFactory.iconIgnorePlacement;
|
||||
import static com.mapbox.mapboxsdk.style.layers.PropertyFactory.iconImage;
|
||||
import static com.mapbox.mapboxsdk.style.layers.PropertyFactory.visibility;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.graphics.BitmapFactory;
|
||||
import android.os.Bundle;
|
||||
import android.text.Html;
|
||||
import android.text.method.LinkMovementMethod;
|
||||
import android.view.View;
|
||||
import android.view.Window;
|
||||
import android.view.animation.OvershootInterpolator;
|
||||
import android.widget.Button;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.ActionBar;
|
||||
|
|
@ -17,6 +28,7 @@ import androidx.lifecycle.Observer;
|
|||
import androidx.lifecycle.ViewModelProvider;
|
||||
import com.google.android.material.floatingactionbutton.FloatingActionButton;
|
||||
import com.mapbox.android.core.permissions.PermissionsManager;
|
||||
import com.mapbox.geojson.Point;
|
||||
import com.mapbox.mapboxsdk.camera.CameraPosition;
|
||||
import com.mapbox.mapboxsdk.camera.CameraPosition.Builder;
|
||||
import com.mapbox.mapboxsdk.camera.CameraUpdateFactory;
|
||||
|
|
@ -32,7 +44,11 @@ import com.mapbox.mapboxsdk.maps.MapboxMap.OnCameraMoveStartedListener;
|
|||
import com.mapbox.mapboxsdk.maps.OnMapReadyCallback;
|
||||
import com.mapbox.mapboxsdk.maps.Style;
|
||||
import com.mapbox.mapboxsdk.maps.UiSettings;
|
||||
import com.mapbox.mapboxsdk.style.layers.Layer;
|
||||
import com.mapbox.mapboxsdk.style.layers.SymbolLayer;
|
||||
import com.mapbox.mapboxsdk.style.sources.GeoJsonSource;
|
||||
import fr.free.nrw.commons.R;
|
||||
import fr.free.nrw.commons.Utils;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import timber.log.Timber;
|
||||
|
||||
|
|
@ -42,6 +58,10 @@ import timber.log.Timber;
|
|||
public class LocationPickerActivity extends AppCompatActivity implements OnMapReadyCallback,
|
||||
OnCameraMoveStartedListener, OnCameraIdleListener, Observer<CameraPosition> {
|
||||
|
||||
/**
|
||||
* DROPPED_MARKER_LAYER_ID : id for layer
|
||||
*/
|
||||
private static final String DROPPED_MARKER_LAYER_ID = "DROPPED_MARKER_LAYER_ID";
|
||||
/**
|
||||
* cameraPosition : position of picker
|
||||
*/
|
||||
|
|
@ -62,6 +82,38 @@ public class LocationPickerActivity extends AppCompatActivity implements OnMapRe
|
|||
* tvAttribution : credit
|
||||
*/
|
||||
private AppCompatTextView tvAttribution;
|
||||
/**
|
||||
* activity : activity key
|
||||
*/
|
||||
private String activity;
|
||||
/**
|
||||
* modifyLocationButton : button for start editing location
|
||||
*/
|
||||
Button modifyLocationButton;
|
||||
/**
|
||||
* showInMapButton : button for showing in map
|
||||
*/
|
||||
TextView showInMapButton;
|
||||
/**
|
||||
* placeSelectedButton : fab for selecting location
|
||||
*/
|
||||
FloatingActionButton placeSelectedButton;
|
||||
/**
|
||||
* droppedMarkerLayer : Layer for static screen
|
||||
*/
|
||||
private Layer droppedMarkerLayer;
|
||||
/**
|
||||
* shadow : imageview of shadow
|
||||
*/
|
||||
private ImageView shadow;
|
||||
/**
|
||||
* largeToolbarText : textView of shadow
|
||||
*/
|
||||
private TextView largeToolbarText;
|
||||
/**
|
||||
* smallToolbarText : textView of shadow
|
||||
*/
|
||||
private TextView smallToolbarText;
|
||||
|
||||
@Override
|
||||
protected void onCreate(@Nullable final Bundle savedInstanceState) {
|
||||
|
|
@ -77,6 +129,7 @@ public class LocationPickerActivity extends AppCompatActivity implements OnMapRe
|
|||
if (savedInstanceState == null) {
|
||||
cameraPosition = getIntent()
|
||||
.getParcelableExtra(LocationPickerConstants.MAP_CAMERA_POSITION);
|
||||
activity = getIntent().getStringExtra(LocationPickerConstants.ACTIVITY_KEY);
|
||||
}
|
||||
|
||||
final LocationPickerViewModel viewModel = new ViewModelProvider(this)
|
||||
|
|
@ -89,6 +142,15 @@ public class LocationPickerActivity extends AppCompatActivity implements OnMapRe
|
|||
addCredits();
|
||||
getToolbarUI();
|
||||
|
||||
if (activity.equals("UploadActivity")) {
|
||||
placeSelectedButton.setVisibility(View.GONE);
|
||||
modifyLocationButton.setVisibility(View.VISIBLE);
|
||||
showInMapButton.setVisibility(View.VISIBLE);
|
||||
largeToolbarText.setText(getResources().getString(R.string.image_location));
|
||||
smallToolbarText.setText(getResources().
|
||||
getString(R.string.check_whether_location_is_correct));
|
||||
}
|
||||
|
||||
mapView.onCreate(savedInstanceState);
|
||||
mapView.getMapAsync(this);
|
||||
}
|
||||
|
|
@ -116,6 +178,10 @@ public class LocationPickerActivity extends AppCompatActivity implements OnMapRe
|
|||
mapView = findViewById(R.id.map_view);
|
||||
markerImage = findViewById(R.id.location_picker_image_view_marker);
|
||||
tvAttribution = findViewById(R.id.tv_attribution);
|
||||
modifyLocationButton = findViewById(R.id.modify_location);
|
||||
showInMapButton = findViewById(R.id.show_in_map);
|
||||
showInMapButton.setText(getResources().getString(R.string.show_in_map_app).toUpperCase());
|
||||
shadow = findViewById(R.id.location_picker_image_view_shadow);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -133,24 +199,84 @@ public class LocationPickerActivity extends AppCompatActivity implements OnMapRe
|
|||
*/
|
||||
private void getToolbarUI() {
|
||||
final ConstraintLayout toolbar = findViewById(R.id.location_picker_toolbar);
|
||||
largeToolbarText = findViewById(R.id.location_picker_toolbar_primary_text_view);
|
||||
smallToolbarText = findViewById(R.id.location_picker_toolbar_secondary_text_view);
|
||||
toolbar.setBackgroundColor(getResources().getColor(R.color.primaryColor));
|
||||
}
|
||||
|
||||
/**
|
||||
* Takes action when map is ready to show
|
||||
*
|
||||
* @param mapboxMap map
|
||||
*/
|
||||
@Override
|
||||
public void onMapReady(final MapboxMap mapboxMap) {
|
||||
this.mapboxMap = mapboxMap;
|
||||
mapboxMap.setStyle(Style.MAPBOX_STREETS, style -> {
|
||||
adjustCameraBasedOnOptions();
|
||||
bindListeners();
|
||||
enableLocationComponent(style);
|
||||
|
||||
if (modifyLocationButton.getVisibility() == View.VISIBLE) {
|
||||
initDroppedMarker(style);
|
||||
adjustCameraBasedOnOptions();
|
||||
enableLocationComponent(style);
|
||||
if (style.getLayer(DROPPED_MARKER_LAYER_ID) != null) {
|
||||
final GeoJsonSource source = style.getSourceAs("dropped-marker-source-id");
|
||||
if (source != null) {
|
||||
source.setGeoJson(Point.fromLngLat(cameraPosition.target.getLongitude(),
|
||||
cameraPosition.target.getLatitude()));
|
||||
}
|
||||
droppedMarkerLayer = style.getLayer(DROPPED_MARKER_LAYER_ID);
|
||||
if (droppedMarkerLayer != null) {
|
||||
droppedMarkerLayer.setProperties(visibility(VISIBLE));
|
||||
markerImage.setVisibility(View.GONE);
|
||||
shadow.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
adjustCameraBasedOnOptions();
|
||||
enableLocationComponent(style);
|
||||
bindListeners();
|
||||
}
|
||||
modifyLocationButton.setOnClickListener(v -> {
|
||||
placeSelectedButton.setVisibility(View.VISIBLE);
|
||||
modifyLocationButton.setVisibility(View.GONE);
|
||||
showInMapButton.setVisibility(View.GONE);
|
||||
droppedMarkerLayer.setProperties(visibility(NONE));
|
||||
markerImage.setVisibility(View.VISIBLE);
|
||||
shadow.setVisibility(View.VISIBLE);
|
||||
largeToolbarText.setText(getResources().getString(R.string.choose_a_location));
|
||||
smallToolbarText.setText(getResources().getString(R.string.pan_and_zoom_to_adjust));
|
||||
bindListeners();
|
||||
});
|
||||
|
||||
showInMapButton.setOnClickListener(v -> showInMap());
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the location in map app
|
||||
*/
|
||||
public void showInMap(){
|
||||
Utils.handleGeoCoordinates(this,
|
||||
new fr.free.nrw.commons.location.LatLng(cameraPosition.target.getLatitude(),
|
||||
cameraPosition.target.getLongitude(), 0.0f));
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize Dropped Marker and layer without showing
|
||||
* @param loadedMapStyle style
|
||||
*/
|
||||
private void initDroppedMarker(@NonNull final Style loadedMapStyle) {
|
||||
// Add the marker image to map
|
||||
loadedMapStyle.addImage("dropped-icon-image", BitmapFactory.decodeResource(
|
||||
getResources(), R.drawable.map_default_map_marker));
|
||||
loadedMapStyle.addSource(new GeoJsonSource("dropped-marker-source-id"));
|
||||
loadedMapStyle.addLayer(new SymbolLayer(DROPPED_MARKER_LAYER_ID,
|
||||
"dropped-marker-source-id").withProperties(
|
||||
iconImage("dropped-icon-image"),
|
||||
visibility(NONE),
|
||||
iconAllowOverlap(true),
|
||||
iconIgnorePlacement(true)
|
||||
));
|
||||
}
|
||||
/**
|
||||
* move the location to the current media coordinates
|
||||
*/
|
||||
|
|
@ -160,10 +286,9 @@ public class LocationPickerActivity extends AppCompatActivity implements OnMapRe
|
|||
|
||||
/**
|
||||
* Enables location components
|
||||
*
|
||||
* @param loadedMapStyle Style
|
||||
*/
|
||||
@SuppressWarnings({"MissingPermission"})
|
||||
@SuppressWarnings( {"MissingPermission"})
|
||||
private void enableLocationComponent(@NonNull final Style loadedMapStyle) {
|
||||
final UiSettings uiSettings = mapboxMap.getUiSettings();
|
||||
uiSettings.setAttributionEnabled(false);
|
||||
|
|
@ -192,7 +317,6 @@ public class LocationPickerActivity extends AppCompatActivity implements OnMapRe
|
|||
|
||||
/**
|
||||
* Acts on camera moving
|
||||
*
|
||||
* @param reason int
|
||||
*/
|
||||
@Override
|
||||
|
|
@ -216,7 +340,6 @@ public class LocationPickerActivity extends AppCompatActivity implements OnMapRe
|
|||
|
||||
/**
|
||||
* Takes action on camera position
|
||||
*
|
||||
* @param position position of picker
|
||||
*/
|
||||
@Override
|
||||
|
|
@ -234,7 +357,7 @@ public class LocationPickerActivity extends AppCompatActivity implements OnMapRe
|
|||
* Select the preferable location
|
||||
*/
|
||||
private void addPlaceSelectedButton() {
|
||||
final FloatingActionButton placeSelectedButton = findViewById(R.id.location_chosen_button);
|
||||
placeSelectedButton = findViewById(R.id.location_chosen_button);
|
||||
placeSelectedButton.setOnClickListener(view -> placeSelected());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,9 +5,13 @@ package fr.free.nrw.commons.LocationPicker;
|
|||
*/
|
||||
public final class LocationPickerConstants {
|
||||
|
||||
public static final String ACTIVITY_KEY
|
||||
= "location.picker.activity";
|
||||
|
||||
public static final String MAP_CAMERA_POSITION
|
||||
= "location.picker.cameraPosition";
|
||||
|
||||
|
||||
private LocationPickerConstants() {
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -815,6 +815,7 @@ public class MediaDetailFragment extends CommonsDaggerSupportFragment implements
|
|||
.defaultLocation(new CameraPosition.Builder()
|
||||
.target(new LatLng(defaultLatitude, defaultLongitude))
|
||||
.zoom(16).build())
|
||||
.activityKey("MediaActivity")
|
||||
.build(getActivity()), REQUEST_CODE);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,10 @@
|
|||
package fr.free.nrw.commons.upload.mediaDetails;
|
||||
|
||||
import static android.app.Activity.RESULT_OK;
|
||||
import static fr.free.nrw.commons.utils.ImageUtils.getErrorMessageForResult;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
|
|
@ -23,19 +25,19 @@ import butterknife.BindView;
|
|||
import butterknife.ButterKnife;
|
||||
import butterknife.OnClick;
|
||||
import com.github.chrisbanes.photoview.PhotoView;
|
||||
import com.mapbox.mapboxsdk.camera.CameraPosition;
|
||||
import fr.free.nrw.commons.LocationPicker.LocationPicker;
|
||||
import fr.free.nrw.commons.R;
|
||||
import fr.free.nrw.commons.Utils;
|
||||
import fr.free.nrw.commons.filepicker.UploadableFile;
|
||||
import fr.free.nrw.commons.kvstore.JsonKvStore;
|
||||
import fr.free.nrw.commons.location.LatLng;
|
||||
import fr.free.nrw.commons.nearby.Place;
|
||||
import fr.free.nrw.commons.settings.Prefs;
|
||||
import fr.free.nrw.commons.upload.ImageCoordinates;
|
||||
import fr.free.nrw.commons.upload.SimilarImageDialogFragment;
|
||||
import fr.free.nrw.commons.upload.UploadBaseFragment;
|
||||
import fr.free.nrw.commons.upload.UploadItem;
|
||||
import fr.free.nrw.commons.upload.UploadMediaDetail;
|
||||
import fr.free.nrw.commons.upload.UploadMediaDetailAdapter;
|
||||
import fr.free.nrw.commons.upload.UploadItem;
|
||||
import fr.free.nrw.commons.utils.DialogUtil;
|
||||
import fr.free.nrw.commons.utils.ImageUtils;
|
||||
import fr.free.nrw.commons.utils.ViewUtil;
|
||||
|
|
@ -49,6 +51,7 @@ import timber.log.Timber;
|
|||
public class UploadMediaDetailFragment extends UploadBaseFragment implements
|
||||
UploadMediaDetailsContract.View, UploadMediaDetailAdapter.EventListener {
|
||||
|
||||
private static final int REQUEST_CODE = 1211;
|
||||
@BindView(R.id.tv_title)
|
||||
TextView tvTitle;
|
||||
@BindView(R.id.ib_map)
|
||||
|
|
@ -94,7 +97,10 @@ public class UploadMediaDetailFragment extends UploadBaseFragment implements
|
|||
*/
|
||||
private Place nearbyPlace;
|
||||
private UploadItem uploadItem;
|
||||
|
||||
/**
|
||||
* editableUploadItem : Storing the upload item before going to update the coordinates
|
||||
*/
|
||||
private UploadItem editableUploadItem;
|
||||
|
||||
private UploadMediaDetailFragmentCallback callback;
|
||||
|
||||
|
|
@ -378,10 +384,67 @@ public class UploadMediaDetailFragment extends UploadBaseFragment implements
|
|||
}
|
||||
|
||||
@Override
|
||||
public void showExternalMap(UploadItem uploadItem) {
|
||||
Utils.handleGeoCoordinates(getContext(),
|
||||
new LatLng(uploadItem.getGpsCoords().getDecLatitude(),
|
||||
uploadItem.getGpsCoords().getDecLongitude(), 0.0f));
|
||||
public void showExternalMap(final UploadItem uploadItem) {
|
||||
goToLocationPickerActivity(uploadItem);
|
||||
}
|
||||
|
||||
/**
|
||||
* Start Location picker activity. Show the location first then user can modify it by clicking
|
||||
* modify location button.
|
||||
* @param uploadItem current upload item
|
||||
*/
|
||||
private void goToLocationPickerActivity(final UploadItem uploadItem) {
|
||||
|
||||
editableUploadItem = uploadItem;
|
||||
startActivityForResult(new LocationPicker.IntentBuilder()
|
||||
.defaultLocation(new CameraPosition.Builder()
|
||||
.target(new com.mapbox.mapboxsdk.geometry.LatLng(uploadItem.getGpsCoords()
|
||||
.getDecLatitude(),
|
||||
uploadItem.getGpsCoords().getDecLongitude()))
|
||||
.zoom(16).build())
|
||||
.activityKey("UploadActivity")
|
||||
.build(getActivity()), REQUEST_CODE);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the coordinates and update the existing coordinates.
|
||||
* @param requestCode code of request
|
||||
* @param resultCode code of result
|
||||
* @param data intent
|
||||
*/
|
||||
@Override
|
||||
public void onActivityResult(final int requestCode, final int resultCode,
|
||||
@Nullable final Intent data) {
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
|
||||
if (requestCode == REQUEST_CODE && resultCode == RESULT_OK) {
|
||||
|
||||
assert data != null;
|
||||
final CameraPosition cameraPosition = LocationPicker.getCameraPosition(data);
|
||||
|
||||
if (cameraPosition != null) {
|
||||
|
||||
final String latitude = String.valueOf(cameraPosition.target.getLatitude());
|
||||
final String longitude = String.valueOf(cameraPosition.target.getLongitude());
|
||||
|
||||
editLocation(latitude, longitude);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the old coordinates with new one
|
||||
* @param latitude new latitude
|
||||
* @param longitude new longitude
|
||||
*/
|
||||
public void editLocation(final String latitude, final String longitude){
|
||||
|
||||
editableUploadItem.getGpsCoords().setDecLatitude(Double.parseDouble(latitude));
|
||||
editableUploadItem.getGpsCoords().setDecLongitude(Double.parseDouble(longitude));
|
||||
editableUploadItem.getGpsCoords().setDecimalCoords(latitude+"|"+longitude);
|
||||
editableUploadItem.getGpsCoords().setImageCoordsExists(true);
|
||||
Toast.makeText(getContext(), "Location Updated", Toast.LENGTH_LONG).show();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
|
|
@ -11,25 +10,72 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="16dp"
|
||||
android:contentDescription="@string/select_location_location_picker"
|
||||
android:tint="@color/white"
|
||||
app:backgroundTint="@color/wikimedia_green"
|
||||
app:elevation="3dp"
|
||||
app:layout_anchorGravity="top|end"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:srcCompat="@drawable/ic_check_black_24dp"
|
||||
android:contentDescription="@string/select_location_location_picker" />
|
||||
app:srcCompat="@drawable/ic_check_black_24dp" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tv_attribution"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="8dp"
|
||||
android:text="@string/map_attribution"
|
||||
android:textAlignment="center"
|
||||
android:layout_margin="8dp"
|
||||
android:textSize="10sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@+id/map_bottom_layout"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/map_bottom_layout"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/white"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent">
|
||||
|
||||
<Button
|
||||
android:id="@+id/modify_location"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/modify_location"
|
||||
android:textColor="@color/white"
|
||||
android:visibility="gone"
|
||||
android:layout_margin="5dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/map_bottom_layout"
|
||||
app:layout_constraintEnd_toStartOf="@+id/guideline3"
|
||||
app:layout_constraintStart_toStartOf="@id/map_bottom_layout"
|
||||
app:layout_constraintTop_toTopOf="@id/map_bottom_layout" />
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/guideline3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.5" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/show_in_map"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/show_in_map_app"
|
||||
android:textAlignment="center"
|
||||
android:textColor="@color/primaryColor"
|
||||
android:textSize="14sp"
|
||||
android:visibility="gone"
|
||||
android:layout_margin="5dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/map_bottom_layout"
|
||||
app:layout_constraintEnd_toEndOf="@id/map_bottom_layout"
|
||||
app:layout_constraintStart_toStartOf="@+id/guideline3"
|
||||
app:layout_constraintTop_toTopOf="@id/map_bottom_layout" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
@ -627,7 +627,12 @@ Upload your first media by tapping on the add button.</string>
|
|||
<string name="pan_and_zoom_to_adjust">Pan and zoom to adjust</string>
|
||||
<string name="exit_location_picker">Exit location picker</string>
|
||||
<string name="select_location_location_picker">Select location</string>
|
||||
<string name="show_in_map_app">Show in map app</string>
|
||||
<string name="modify_location">Edit location</string>
|
||||
<string name="location_picker_image_view">The image view of the location picker</string>
|
||||
<string name="location_picker_image_view_shadow">The shadow of the image view of the location picker</string>
|
||||
<string name="location_picker_image_view_shadow">
|
||||
The shadow of the image view of the location picker</string>
|
||||
<string name="image_location">Image Location</string>
|
||||
<string name="check_whether_location_is_correct">Check whether location is correct</string>
|
||||
|
||||
</resources>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue