Make new style menu design consistent with style details menu

This commit is contained in:
2026-08-12 11:53:32 +02:00
parent f38bedd8cc
commit 5a608faf24
3 changed files with 115 additions and 41 deletions
@@ -16,6 +16,7 @@ import androidx.annotation.NonNull;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
import androidx.annotation.UiContext; import androidx.annotation.UiContext;
import androidx.constraintlayout.widget.ConstraintLayout;
import com.google.android.material.bottomsheet.BottomSheetDialogFragment; import com.google.android.material.bottomsheet.BottomSheetDialogFragment;
import eu.konggdev.strikemaps.R; import eu.konggdev.strikemaps.R;
import eu.konggdev.strikemaps.app.AppController; import eu.konggdev.strikemaps.app.AppController;
@@ -127,9 +128,9 @@ public class NewStyleBottomSheet extends BottomSheetDialogFragment {
View view = inflater.inflate(R.layout.dialog_new_style, container, false); View view = inflater.inflate(R.layout.dialog_new_style, container, false);
Button builtInBtn = view.findViewById(R.id.buttonFromBuiltInStyle); ConstraintLayout builtInBtn = view.findViewById(R.id.buttonFromBuiltInStyle);
Button fileBtn = view.findViewById(R.id.buttonFromFile); ConstraintLayout fileBtn = view.findViewById(R.id.buttonFromFile);
Button emptyBtn = view.findViewById(R.id.buttonCreateEmpty); ConstraintLayout emptyBtn = view.findViewById(R.id.buttonCreateEmpty);
builtInBtn.setOnClickListener(v -> { builtInBtn.setOnClickListener(v -> {
app.getUi().alert(AlertDialogFactory.copyBuiltInStyle(app, map, ui, mapChangePopup)); app.getUi().alert(AlertDialogFactory.copyBuiltInStyle(app, map, ui, mapChangePopup));
+5
View File
@@ -0,0 +1,5 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:tint="#000000" android:viewportHeight="960" android:viewportWidth="960" android:width="24dp">
<path android:fillColor="@android:color/white" android:pathData="M720,630Q720,734 647,807Q574,880 470,880Q366,880 293,807Q220,734 220,630L220,260Q220,185 272.5,132.5Q325,80 400,80Q475,80 527.5,132.5Q580,185 580,260L580,610Q580,656 548,688Q516,720 470,720Q424,720 392,688Q360,656 360,610L360,240L440,240L440,610Q440,623 448.5,631.5Q457,640 470,640Q483,640 491.5,631.5Q500,623 500,610L500,260Q499,218 470.5,189Q442,160 400,160Q358,160 329,189Q300,218 300,260L300,630Q299,701 349,750.5Q399,800 470,800Q540,800 589,750.5Q638,701 640,630L640,240L720,240L720,630Z"/>
</vector>
+106 -38
View File
@@ -1,60 +1,128 @@
<LinearLayout <?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical"
android:background="#000000" android:background="#000000"
android:padding="24dp"> android:padding="12dp">
<TextView <TextView
android:id="@+id/title"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="34dp"
android:gravity="center"
android:text="New style" android:text="New style"
android:textColor="#FFFFFF" android:textColor="#FFFFFF"
android:textSize="22sp" android:textSize="24sp"
android:textStyle="bold" /> app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
<Space <androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="6dp" />
<com.google.android.material.button.MaterialButton
android:id="@+id/buttonFromBuiltInStyle" android:id="@+id/buttonFromBuiltInStyle"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="56dp" android:layout_height="38dp"
android:text="From built-in style" android:layout_marginTop="16dp"
android:textAllCaps="false" android:layout_marginBottom="2dp"
android:textColor="#FFFFFF" android:background="#1B1A1A"
app:backgroundTint="#1A1A1A" app:layout_constraintTop_toBottomOf="@id/title"
app:cornerRadius="24dp" /> app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent">
<Space <ImageView
android:layout_width="match_parent" android:id="@+id/builtInStyleIcon"
android:layout_height="4dp" /> android:layout_width="32dp"
android:layout_height="32dp"
android:layout_marginStart="16dp"
android:src="@android:drawable/ic_menu_edit"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<com.google.android.material.button.MaterialButton <TextView
android:id="@+id/builtInStyleText"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:gravity="center"
android:text="From built-In style"
android:textColor="#FFFFFF"
android:textSize="20sp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/buttonFromFile" android:id="@+id/buttonFromFile"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="56dp" android:layout_height="38dp"
android:text="From file" android:layout_marginTop="6dp"
android:textAllCaps="false" android:layout_marginBottom="2dp"
android:textColor="#FFFFFF" android:background="#1B1A1A"
app:backgroundTint="#1A1A1A" app:layout_constraintTop_toBottomOf="@id/buttonFromBuiltInStyle"
app:cornerRadius="24dp" /> app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent">
<Space <ImageView
android:layout_width="match_parent" android:id="@+id/fileIcon"
android:layout_height="4dp" /> android:layout_width="32dp"
android:layout_height="32dp"
android:layout_marginStart="16dp"
android:src="@drawable/ic_file"
app:tint="#a4a3a3"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<com.google.android.material.button.MaterialButton <TextView
android:id="@+id/fileBtnText"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:gravity="center"
android:text="From file"
android:textColor="#FFFFFF"
android:textSize="20sp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/buttonCreateEmpty" android:id="@+id/buttonCreateEmpty"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="56dp" android:layout_height="38dp"
android:text="Create empty" android:layout_marginTop="6dp"
android:textAllCaps="false" android:layout_marginBottom="2dp"
android:textColor="#FFFFFF" android:background="#1B1A1A"
app:backgroundTint="#1A1A1A" app:layout_constraintTop_toBottomOf="@id/buttonFromFile"
app:cornerRadius="24dp" /> app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent">
</LinearLayout> <ImageView
android:id="@+id/emptyIcon"
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_marginStart="16dp"
android:src="@drawable/ic_create"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/emptyBtnText"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:gravity="center"
android:text="Create empty"
android:textColor="#FFFFFF"
android:textSize="20sp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>