mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-23 06:33:42 +00:00
[android] Add new outlined buttons
Signed-off-by: Jean-Baptiste <jeanbaptiste.charron@outlook.fr>
This commit is contained in:
committed by
jeanbaptisteC
parent
b70d45691a
commit
2f5f9e15c3
@@ -33,6 +33,8 @@ import app.organicmaps.sdk.util.Utils;
|
||||
import app.organicmaps.util.Graphics;
|
||||
import app.organicmaps.util.InputUtils;
|
||||
import app.organicmaps.util.UiUtils;
|
||||
|
||||
import com.google.android.material.button.MaterialButton;
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
||||
import com.google.android.material.imageview.ShapeableImageView;
|
||||
import com.google.android.material.textfield.TextInputEditText;
|
||||
@@ -134,7 +136,7 @@ public class EditorFragment extends BaseMwmFragment implements View.OnClickListe
|
||||
private TextInputEditText mDescription;
|
||||
private final Map<Metadata.MetadataType, View> mDetailsBlocks = new HashMap<>();
|
||||
private final Map<Metadata.MetadataType, View> mSocialMediaBlocks = new HashMap<>();
|
||||
private MaterialTextView mReset;
|
||||
private MaterialButton mReset;
|
||||
|
||||
private EditorHostFragment mParent;
|
||||
|
||||
|
||||
@@ -182,20 +182,18 @@
|
||||
app:layout_constraintVertical_bias="0.5" />
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/report"
|
||||
style="@style/MwmWidget.M3.Button"
|
||||
style="@style/MwmWidget.M3.Button.Secondary"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/report_a_bug"
|
||||
android:textAlignment="center"
|
||||
android:textColor="@color/text_dark"
|
||||
android:layout_marginEnd="@dimen/margin_base_plus"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toEndOf="@+id/donate"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.5"
|
||||
app:backgroundTint="@color/light_gray"/>
|
||||
app:layout_constraintVertical_bias="0.5" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
|
||||
@@ -105,14 +105,12 @@
|
||||
android:textColor="?android:textColorPrimary" />
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/register"
|
||||
style="@style/MwmWidget.M3.Button"
|
||||
style="@style/MwmWidget.M3.Button.Secondary"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/margin_base"
|
||||
android:padding="@dimen/margin_quarter"
|
||||
android:text="@string/register_at_openstreetmap"
|
||||
android:textColor="@color/text_dark"
|
||||
app:backgroundTint="@color/bg_editor_light"/>
|
||||
android:text="@string/register_at_openstreetmap" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
@@ -121,13 +121,11 @@
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/report"
|
||||
style="@style/MwmWidget.M3.Button"
|
||||
style="@style/MwmWidget.M3.Button.Secondary"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/margin_half"
|
||||
android:text="@string/report_a_bug"
|
||||
android:textColor="@color/text_dark"
|
||||
app:backgroundTint="@color/light_gray"/>
|
||||
android:text="@string/report_a_bug" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/faq"
|
||||
|
||||
@@ -412,20 +412,16 @@
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/cv__more"
|
||||
style="@style/MwmWidget.Editor.CardView"
|
||||
android:layout_marginTop="@dimen/margin_double"
|
||||
android:layout_marginBottom="@dimen/margin_base">
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/reset"
|
||||
style="@style/MwmWidget.M3.Button.Secondary"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="36dp"
|
||||
android:background="?selectableItemBackground"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:textAppearance="@style/MwmTextAppearance.Button"
|
||||
android:layout_marginBottom="@dimen/margin_base"
|
||||
app:backgroundTint="?cardBackground"
|
||||
android:textColor="@color/base_red"
|
||||
app:strokeColor="@color/base_red"
|
||||
tools:text="Reset my changes"/>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
@@ -88,14 +88,12 @@
|
||||
android:textColor="?android:textColorPrimary" />
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/register"
|
||||
style="@style/MwmWidget.M3.Button"
|
||||
style="@style/MwmWidget.M3.Button.Secondary"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/margin_base"
|
||||
android:padding="@dimen/margin_quarter"
|
||||
android:text="@string/register_at_openstreetmap"
|
||||
android:textColor="@color/text_dark"
|
||||
app:backgroundTint="@color/bg_editor_light"/>
|
||||
android:text="@string/register_at_openstreetmap" />
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
</LinearLayout>
|
||||
|
||||
@@ -404,4 +404,10 @@
|
||||
<style name="MwmWidget.M3.Button.Primary" parent="@style/MwmWidget.M3.Button">
|
||||
<item name="backgroundTint">?colorSecondary</item>
|
||||
</style>
|
||||
|
||||
<style name="MwmWidget.M3.Button.Secondary" parent="@style/Widget.Material3.Button.OutlinedButton">
|
||||
<item name="android:textSize">16sp</item>
|
||||
<item name="strokeColor">?colorSecondary</item>
|
||||
<item name="android:textColor">?colorSecondary</item>
|
||||
</style>
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user