Add geofavorite detail: Moved save button to header for consistency
This commit is contained in:
		@@ -80,11 +80,6 @@ public class GeofavoriteDetailActivity extends NextcloudMapsStyledActivity imple
 | 
				
			|||||||
                finish();
 | 
					                finish();
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            @Override
 | 
					 | 
				
			||||||
            public void onMapEditPressed() {
 | 
					 | 
				
			||||||
                //TODO
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            @Override
 | 
					            @Override
 | 
				
			||||||
            public void onActionIconShareClicked() {
 | 
					            public void onActionIconShareClicked() {
 | 
				
			||||||
                startActivity(Intent.createChooser(IntentGenerator.newShareIntent(GeofavoriteDetailActivity.this, mGeofavorite), getString(R.string.share_via)));
 | 
					                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) {
 | 
					            if (v.getId() == R.id.back_bt && this.listener != null) {
 | 
				
			||||||
                this.listener.onBackPressed();
 | 
					                this.listener.onBackPressed();
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            if (v.getId() == R.id.manual_pos_bt && this.listener != null) {
 | 
					 | 
				
			||||||
                this.listener.onMapEditPressed();
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
            // Actions
 | 
					            // Actions
 | 
				
			||||||
            if (v.getId() == R.id.action_icon_share && this.listener != null) {
 | 
					            if (v.getId() == R.id.action_icon_share && this.listener != null) {
 | 
				
			||||||
@@ -428,7 +420,6 @@ public class GeofavoriteDetailActivity extends NextcloudMapsStyledActivity imple
 | 
				
			|||||||
        void onSubmit();
 | 
					        void onSubmit();
 | 
				
			||||||
        void onMapClicked();
 | 
					        void onMapClicked();
 | 
				
			||||||
        void onBackPressed();
 | 
					        void onBackPressed();
 | 
				
			||||||
        void onMapEditPressed();
 | 
					 | 
				
			||||||
        void onActionIconShareClicked();
 | 
					        void onActionIconShareClicked();
 | 
				
			||||||
        void onActionIconNavClicked();
 | 
					        void onActionIconNavClicked();
 | 
				
			||||||
        void onActionIconDeleteClicked();
 | 
					        void onActionIconDeleteClicked();
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,10 +1,6 @@
 | 
				
			|||||||
<?xml version="1.0" encoding="utf-8"?>
 | 
					<?xml version="1.0" encoding="utf-8"?>
 | 
				
			||||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
 | 
					<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
 | 
				
			||||||
    <item
 | 
					    <item>
 | 
				
			||||||
        android:left="8dp"
 | 
					 | 
				
			||||||
        android:right="8dp"
 | 
					 | 
				
			||||||
        android:top="8dp"
 | 
					 | 
				
			||||||
        android:bottom="8dp">
 | 
					 | 
				
			||||||
        <shape
 | 
					        <shape
 | 
				
			||||||
            android:shape="oval">
 | 
					            android:shape="oval">
 | 
				
			||||||
            <solid android:color="@color/defaultBrandAlpha"/>
 | 
					            <solid android:color="@color/defaultBrandAlpha"/>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -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>
 | 
					 | 
				
			||||||
@@ -51,25 +51,26 @@
 | 
				
			|||||||
                    <!-- Back button -->
 | 
					                    <!-- Back button -->
 | 
				
			||||||
                    <ImageView
 | 
					                    <ImageView
 | 
				
			||||||
                        android:id="@+id/back_bt"
 | 
					                        android:id="@+id/back_bt"
 | 
				
			||||||
                        android:layout_width="?android:attr/actionBarSize"
 | 
					                        android:layout_width="40dp"
 | 
				
			||||||
                        android:layout_height="?android:attr/actionBarSize"
 | 
					                        android:layout_height="40dp"
 | 
				
			||||||
                        android:layout_gravity="start"
 | 
					                        android:layout_gravity="start"
 | 
				
			||||||
                        android:padding="16dp"
 | 
					                        android:layout_margin="8dp"
 | 
				
			||||||
 | 
					                        android:padding="8dp"
 | 
				
			||||||
                        android:src="@drawable/ic_back_grey"
 | 
					                        android:src="@drawable/ic_back_grey"
 | 
				
			||||||
                        app:tint="@color/white"
 | 
					                        app:tint="@color/white"
 | 
				
			||||||
                        android:background="@drawable/floating_semitransparent_button_background"/>
 | 
					                        android:background="@drawable/floating_semitransparent_button_background"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    <!-- Manual position button -->
 | 
					                    <!-- Save button -->
 | 
				
			||||||
                    <ImageView
 | 
					                    <ImageView
 | 
				
			||||||
                        android:id="@+id/manual_pos_bt"
 | 
					                        android:id="@+id/submit_bt"
 | 
				
			||||||
                        android:layout_width="?android:attr/actionBarSize"
 | 
					                        android:layout_width="40dp"
 | 
				
			||||||
                        android:layout_height="?android:attr/actionBarSize"
 | 
					                        android:layout_height="40dp"
 | 
				
			||||||
                        android:layout_gravity="end"
 | 
					                        android:layout_gravity="end"
 | 
				
			||||||
                        android:padding="16dp"
 | 
					                        android:layout_margin="8dp"
 | 
				
			||||||
                        android:src="@drawable/ic_manual_pos"
 | 
					                        android:padding="8dp"
 | 
				
			||||||
 | 
					                        android:src="@drawable/ic_ok"
 | 
				
			||||||
                        app:tint="@color/white"
 | 
					                        app:tint="@color/white"
 | 
				
			||||||
                        android:background="@drawable/floating_semitransparent_button_background"
 | 
					                        android:background="@drawable/round_button_background"/>
 | 
				
			||||||
                        android:visibility="gone"/> <!-- TODO: Implement edit -->
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
                </androidx.appcompat.widget.Toolbar>
 | 
					                </androidx.appcompat.widget.Toolbar>
 | 
				
			||||||
                    
 | 
					                    
 | 
				
			||||||
@@ -258,16 +259,6 @@
 | 
				
			|||||||
                    android:indeterminate="true"
 | 
					                    android:indeterminate="true"
 | 
				
			||||||
                    android:visibility="gone"/>
 | 
					                    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>
 | 
					            </LinearLayout>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        </androidx.core.widget.NestedScrollView>
 | 
					        </androidx.core.widget.NestedScrollView>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -61,7 +61,6 @@
 | 
				
			|||||||
        android:layout_marginBottom="25dp"
 | 
					        android:layout_marginBottom="25dp"
 | 
				
			||||||
        android:layout_gravity="bottom|right"
 | 
					        android:layout_gravity="bottom|right"
 | 
				
			||||||
        android:background="@drawable/unselected_floating_semitransparent_button_background"
 | 
					        android:background="@drawable/unselected_floating_semitransparent_button_background"
 | 
				
			||||||
        android:contentDescription="@string/list_mode"
 | 
					 | 
				
			||||||
        android:padding="5dp"
 | 
					        android:padding="5dp"
 | 
				
			||||||
        android:tint="@color/text_color"
 | 
					        android:tint="@color/text_color"
 | 
				
			||||||
        android:src="@drawable/ic_add_gps"
 | 
					        android:src="@drawable/ic_add_gps"
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user