mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-19 13:03:36 +00:00
[android] Use material component on download screen
Signed-off-by: Jean-Baptiste Charron <jeanbaptiste.charron@outlook.fr>
This commit is contained in:
committed by
Konstantin Pastbin
parent
45bba5fb5e
commit
0234be60a2
@@ -8,9 +8,6 @@ import android.location.Location;
|
||||
import android.os.Bundle;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.activity.result.ActivityResultLauncher;
|
||||
import androidx.activity.result.contract.ActivityResultContracts;
|
||||
@@ -33,8 +30,12 @@ import app.organicmaps.util.StringUtils;
|
||||
import app.organicmaps.util.UiUtils;
|
||||
import app.organicmaps.util.Utils;
|
||||
import app.organicmaps.util.WindowInsetUtils.PaddingInsetsListener;
|
||||
|
||||
import com.google.android.material.button.MaterialButton;
|
||||
import com.google.android.material.checkbox.MaterialCheckBox;
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
||||
import com.google.android.material.progressindicator.LinearProgressIndicator;
|
||||
import com.google.android.material.textview.MaterialTextView;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
@@ -53,10 +54,10 @@ public class DownloadResourcesLegacyActivity extends BaseMwmFragmentActivity
|
||||
private static final int ERR_NO_MORE_FILES = -5;
|
||||
private static final int ERR_FILE_IN_PROGRESS = -6;
|
||||
|
||||
private TextView mTvMessage;
|
||||
private MaterialTextView mTvMessage;
|
||||
private LinearProgressIndicator mProgress;
|
||||
private Button mBtnDownload;
|
||||
private CheckBox mChbDownloadCountry;
|
||||
private MaterialButton mBtnDownload;
|
||||
private MaterialCheckBox mChbDownloadCountry;
|
||||
|
||||
private String mCurrentCountry;
|
||||
|
||||
|
||||
@@ -19,12 +19,12 @@
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
<ImageView
|
||||
<com.google.android.material.imageview.ShapeableImageView
|
||||
android:layout_width="90dp"
|
||||
android:layout_height="90dp"
|
||||
app:srcCompat="@drawable/ic_download"
|
||||
app:tint="?android:colorAccent"/>
|
||||
<TextView
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/head_message"
|
||||
style="?fontHeadline6"
|
||||
android:layout_width="match_parent"
|
||||
@@ -32,7 +32,7 @@
|
||||
android:layout_marginTop="@dimen/margin_base"
|
||||
android:gravity="center"
|
||||
android:text="@string/download_map_title" />
|
||||
<TextView
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/download_message"
|
||||
style="?fontBody2"
|
||||
android:layout_width="match_parent"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
<CheckBox
|
||||
<com.google.android.material.checkbox.MaterialCheckBox
|
||||
android:id="@+id/chb_download_country"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -27,7 +27,7 @@
|
||||
android:indeterminate="false"
|
||||
app:indicatorColor="?android:colorAccent"
|
||||
app:trackColor="@color/bg_routing_progress"/>
|
||||
<Button
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_download_resources"
|
||||
style="@style/MwmWidget.Button.Primary"
|
||||
android:layout_width="match_parent"
|
||||
|
||||
Reference in New Issue
Block a user