mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-26 15:53:36 +00:00
[android] Migrate download screens to Material components
Signed-off-by: Jean-Baptiste Charron <jeanbaptiste.charron@outlook.fr>
This commit is contained in:
committed by
Konstantin Pastbin
parent
3858b0905f
commit
deb663e4f9
@@ -1,8 +1,8 @@
|
||||
package app.organicmaps.downloader;
|
||||
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
|
||||
import com.google.android.material.button.MaterialButton;
|
||||
import com.google.android.material.floatingactionbutton.FloatingActionButton;
|
||||
import app.organicmaps.R;
|
||||
import app.organicmaps.util.StringUtils;
|
||||
@@ -14,7 +14,7 @@ class BottomPanel
|
||||
{
|
||||
private final DownloaderFragment mFragment;
|
||||
private final FloatingActionButton mFab;
|
||||
private final Button mButton;
|
||||
private final MaterialButton mButton;
|
||||
|
||||
private final View.OnClickListener mDownloadListener = new View.OnClickListener()
|
||||
{
|
||||
|
||||
@@ -6,13 +6,14 @@ import android.text.TextUtils;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Button;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.FragmentActivity;
|
||||
|
||||
import com.google.android.material.button.MaterialButton;
|
||||
import com.google.android.material.textview.MaterialTextView;
|
||||
|
||||
import app.organicmaps.R;
|
||||
import app.organicmaps.base.BaseMwmFragment;
|
||||
import app.organicmaps.base.BaseMwmFragmentActivity;
|
||||
@@ -30,10 +31,10 @@ public class CountrySuggestFragment extends BaseMwmFragment implements View.OnCl
|
||||
private LinearLayout mLlSelectDownload;
|
||||
private LinearLayout mLlActiveDownload;
|
||||
private WheelProgressView mWpvDownloadProgress;
|
||||
private TextView mTvCountry;
|
||||
private TextView mTvActiveCountry;
|
||||
private TextView mTvProgress;
|
||||
private Button mBtnDownloadMap;
|
||||
private MaterialTextView mTvCountry;
|
||||
private MaterialTextView mTvActiveCountry;
|
||||
private MaterialTextView mTvProgress;
|
||||
private MaterialButton mBtnDownloadMap;
|
||||
|
||||
private CountryItem mCurrentCountry;
|
||||
private CountryItem mDownloadingCountry;
|
||||
@@ -150,7 +151,7 @@ public class CountrySuggestFragment extends BaseMwmFragment implements View.OnCl
|
||||
mLlNoLocation = view.findViewById(R.id.ll__location_unknown);
|
||||
mBtnDownloadMap = view.findViewById(R.id.btn__download_map);
|
||||
mBtnDownloadMap.setOnClickListener(this);
|
||||
Button selectMap = view.findViewById(R.id.btn__select_map);
|
||||
MaterialButton selectMap = view.findViewById(R.id.btn__select_map);
|
||||
selectMap.setOnClickListener(this);
|
||||
mWpvDownloadProgress = view.findViewById(R.id.wpv__download_progress);
|
||||
mWpvDownloadProgress.setOnClickListener(this);
|
||||
|
||||
@@ -4,11 +4,13 @@ import android.location.Location;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Button;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.core.view.ViewCompat;
|
||||
|
||||
import com.google.android.material.button.MaterialButton;
|
||||
import com.google.android.material.textview.MaterialTextView;
|
||||
|
||||
import app.organicmaps.MwmActivity;
|
||||
import app.organicmaps.R;
|
||||
import app.organicmaps.location.LocationHelper;
|
||||
@@ -28,11 +30,11 @@ public class OnmapDownloader implements MwmActivity.LeftAnimationTrackListener
|
||||
|
||||
private final MwmActivity mActivity;
|
||||
private final View mFrame;
|
||||
private final TextView mParent;
|
||||
private final TextView mTitle;
|
||||
private final TextView mSize;
|
||||
private final MaterialTextView mParent;
|
||||
private final MaterialTextView mTitle;
|
||||
private final MaterialTextView mSize;
|
||||
private final WheelProgressView mProgress;
|
||||
private final Button mButton;
|
||||
private final MaterialButton mButton;
|
||||
|
||||
private int mStorageSubscriptionSlot;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user