Add geofavorite detail: Moved save button to header for consistency

This commit is contained in:
Daniele Verducci (Slimpenguin) 2024-02-28 13:58:14 +01:00
parent 904cafcf48
commit 8b470c1927
5 changed files with 13 additions and 52 deletions

View File

@ -80,11 +80,6 @@ public class GeofavoriteDetailActivity extends NextcloudMapsStyledActivity imple
finish();
}
@Override
public void onMapEditPressed() {
//TODO
}
@Override
public void onActionIconShareClicked() {
startActivity(Intent.createChooser(IntentGenerator.newShareIntent(GeofavoriteDetailActivity.this, mGeofavorite), getString(R.string.share_via)));
@ -407,9 +402,6 @@ public class GeofavoriteDetailActivity extends NextcloudMapsStyledActivity imple
if (v.getId() == R.id.back_bt && this.listener != null) {
this.listener.onBackPressed();
}
if (v.getId() == R.id.manual_pos_bt && this.listener != null) {
this.listener.onMapEditPressed();
}
// Actions
if (v.getId() == R.id.action_icon_share && this.listener != null) {
@ -428,7 +420,6 @@ public class GeofavoriteDetailActivity extends NextcloudMapsStyledActivity imple
void onSubmit();
void onMapClicked();
void onBackPressed();
void onMapEditPressed();
void onActionIconShareClicked();
void onActionIconNavClicked();
void onActionIconDeleteClicked();

View File

@ -1,10 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:left="8dp"
android:right="8dp"
android:top="8dp"
android:bottom="8dp">
<item>
<shape
android:shape="oval">
<solid android:color="@color/defaultBrandAlpha"/>

View File

@ -1,16 +0,0 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?android:attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M13.95,13H9V8.05l5.61,-5.61C13.78,2.16 12.9,2 12,2c-4.2,0 -8,3.22 -8,8.2c0,3.32 2.67,7.25 8,11.8c5.33,-4.55 8,-8.48 8,-11.8c0,-1.01 -0.16,-1.94 -0.45,-2.8L13.95,13z"/>
<path
android:fillColor="@android:color/white"
android:pathData="M11,11l2.12,0l6.16,-6.16l-2.12,-2.12l-6.16,6.16z"/>
<path
android:fillColor="@android:color/white"
android:pathData="M20.71,2L20,1.29C19.8,1.1 19.55,1 19.29,1c-0.13,0 -0.48,0.07 -0.71,0.29l-0.72,0.72l2.12,2.12l0.72,-0.72C21.1,3.02 21.1,2.39 20.71,2z"/>
</vector>

View File

@ -51,25 +51,26 @@
<!-- Back button -->
<ImageView
android:id="@+id/back_bt"
android:layout_width="?android:attr/actionBarSize"
android:layout_height="?android:attr/actionBarSize"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_gravity="start"
android:padding="16dp"
android:layout_margin="8dp"
android:padding="8dp"
android:src="@drawable/ic_back_grey"
app:tint="@color/white"
android:background="@drawable/floating_semitransparent_button_background"/>
<!-- Manual position button -->
<!-- Save button -->
<ImageView
android:id="@+id/manual_pos_bt"
android:layout_width="?android:attr/actionBarSize"
android:layout_height="?android:attr/actionBarSize"
android:id="@+id/submit_bt"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_gravity="end"
android:padding="16dp"
android:src="@drawable/ic_manual_pos"
android:layout_margin="8dp"
android:padding="8dp"
android:src="@drawable/ic_ok"
app:tint="@color/white"
android:background="@drawable/floating_semitransparent_button_background"
android:visibility="gone"/> <!-- TODO: Implement edit -->
android:background="@drawable/round_button_background"/>
</androidx.appcompat.widget.Toolbar>
@ -258,16 +259,6 @@
android:indeterminate="true"
android:visibility="gone"/>
<Button
android:id="@+id/submit_bt"
style="@style/Widget.AppCompat.Button.Colored"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_margin="50dp"
android:text="@string/confirm"
app:backgroundTint="@color/defaultBrand"
android:onClick="onSubmit"/>
</LinearLayout>
</androidx.core.widget.NestedScrollView>

View File

@ -61,7 +61,6 @@
android:layout_marginBottom="25dp"
android:layout_gravity="bottom|right"
android:background="@drawable/unselected_floating_semitransparent_button_background"
android:contentDescription="@string/list_mode"
android:padding="5dp"
android:tint="@color/text_color"
android:src="@drawable/ic_add_gps"