Added material dialog
This commit is contained in:
parent
b0605ff183
commit
9e04408efa
3 changed files with 24 additions and 19 deletions
|
@ -120,14 +120,14 @@ static def getDate() {
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
||||||
implementation 'androidx.multidex:multidex:2.0.1'
|
implementation 'androidx.multidex:multidex:2.0.1'
|
||||||
implementation 'androidx.fragment:fragment:1.1.0-alpha06'
|
implementation 'androidx.fragment:fragment:1.1.0-alpha08'
|
||||||
implementation 'androidx.appcompat:appcompat:1.1.0-alpha04'
|
implementation 'androidx.appcompat:appcompat:1.1.0-alpha05'
|
||||||
implementation 'androidx.recyclerview:recyclerview:1.1.0-alpha04'
|
implementation 'androidx.recyclerview:recyclerview:1.1.0-alpha04'
|
||||||
implementation "androidx.gridlayout:gridlayout:1.0.0"
|
implementation "androidx.gridlayout:gridlayout:1.0.0"
|
||||||
implementation "androidx.cardview:cardview:1.0.0"
|
implementation "androidx.cardview:cardview:1.0.0"
|
||||||
implementation "androidx.palette:palette:1.0.0"
|
implementation "androidx.palette:palette:1.0.0"
|
||||||
implementation 'androidx.annotation:annotation:1.1.0-beta01'
|
implementation 'androidx.annotation:annotation:1.1.0-beta01'
|
||||||
implementation 'androidx.preference:preference:1.1.0-alpha04'
|
implementation 'androidx.preference:preference:1.1.0-alpha05'
|
||||||
implementation "androidx.legacy:legacy-support-v13:1.0.0"
|
implementation "androidx.legacy:legacy-support-v13:1.0.0"
|
||||||
implementation "androidx.legacy:legacy-preference-v14:1.0.0"
|
implementation "androidx.legacy:legacy-preference-v14:1.0.0"
|
||||||
implementation 'com.google.android.material:material:1.1.0-alpha05'
|
implementation 'com.google.android.material:material:1.1.0-alpha05'
|
||||||
|
@ -135,10 +135,10 @@ dependencies {
|
||||||
implementation 'com.squareup.retrofit2:retrofit:2.5.0'
|
implementation 'com.squareup.retrofit2:retrofit:2.5.0'
|
||||||
implementation 'com.squareup.retrofit2:converter-gson:2.5.0'
|
implementation 'com.squareup.retrofit2:converter-gson:2.5.0'
|
||||||
implementation 'com.squareup.retrofit2:adapter-rxjava2:2.5.0'
|
implementation 'com.squareup.retrofit2:adapter-rxjava2:2.5.0'
|
||||||
implementation "com.afollestad.material-dialogs:core:$materialDialog"
|
implementation 'com.afollestad.material-dialogs:core:3.0.0-alpha1'
|
||||||
implementation "com.afollestad.material-dialogs:core:$materialDialog"
|
implementation 'com.afollestad.material-dialogs:input:3.0.0-alpha1'
|
||||||
implementation 'com.afollestad.material-dialogs:input:2.0.0'
|
implementation 'com.afollestad.material-dialogs:color:3.0.0-alpha1'
|
||||||
implementation 'com.afollestad.material-dialogs:color:2.0.0'
|
implementation 'com.afollestad.material-dialogs:bottomsheets:3.0.0-alpha1'
|
||||||
implementation 'com.afollestad:material-cab:0.1.12'
|
implementation 'com.afollestad:material-cab:0.1.12'
|
||||||
implementation 'com.github.bumptech.glide:glide:4.8.0'
|
implementation 'com.github.bumptech.glide:glide:4.8.0'
|
||||||
kapt 'com.github.bumptech.glide:compiler:4.8.0'
|
kapt 'com.github.bumptech.glide:compiler:4.8.0'
|
||||||
|
|
|
@ -20,6 +20,7 @@ import android.widget.Toast;
|
||||||
|
|
||||||
import com.afollestad.materialcab.MaterialCab;
|
import com.afollestad.materialcab.MaterialCab;
|
||||||
import com.afollestad.materialdialogs.MaterialDialog;
|
import com.afollestad.materialdialogs.MaterialDialog;
|
||||||
|
import com.afollestad.materialdialogs.bottomsheets.BottomSheet;
|
||||||
import com.google.android.material.appbar.AppBarLayout;
|
import com.google.android.material.appbar.AppBarLayout;
|
||||||
import com.google.android.material.snackbar.Snackbar;
|
import com.google.android.material.snackbar.Snackbar;
|
||||||
import com.simplecityapps.recyclerview_fastscroll.views.FastScrollRecyclerView;
|
import com.simplecityapps.recyclerview_fastscroll.views.FastScrollRecyclerView;
|
||||||
|
@ -48,8 +49,9 @@ import code.name.monkey.appthemehelper.util.ATHUtil;
|
||||||
import code.name.monkey.appthemehelper.util.ColorUtil;
|
import code.name.monkey.appthemehelper.util.ColorUtil;
|
||||||
import code.name.monkey.appthemehelper.util.TintHelper;
|
import code.name.monkey.appthemehelper.util.TintHelper;
|
||||||
import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper;
|
import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper;
|
||||||
|
|
||||||
import code.name.monkey.retromusic.R;
|
import code.name.monkey.retromusic.R;
|
||||||
|
import code.name.monkey.retromusic.adapter.SongFileAdapter;
|
||||||
|
import code.name.monkey.retromusic.fragments.base.AbsMainActivityFragment;
|
||||||
import code.name.monkey.retromusic.helper.MusicPlayerRemote;
|
import code.name.monkey.retromusic.helper.MusicPlayerRemote;
|
||||||
import code.name.monkey.retromusic.helper.menu.SongMenuHelper;
|
import code.name.monkey.retromusic.helper.menu.SongMenuHelper;
|
||||||
import code.name.monkey.retromusic.helper.menu.SongsMenuHelper;
|
import code.name.monkey.retromusic.helper.menu.SongsMenuHelper;
|
||||||
|
@ -60,8 +62,6 @@ import code.name.monkey.retromusic.misc.DialogAsyncTask;
|
||||||
import code.name.monkey.retromusic.misc.UpdateToastMediaScannerCompletionListener;
|
import code.name.monkey.retromusic.misc.UpdateToastMediaScannerCompletionListener;
|
||||||
import code.name.monkey.retromusic.misc.WrappedAsyncTaskLoader;
|
import code.name.monkey.retromusic.misc.WrappedAsyncTaskLoader;
|
||||||
import code.name.monkey.retromusic.model.Song;
|
import code.name.monkey.retromusic.model.Song;
|
||||||
import code.name.monkey.retromusic.adapter.SongFileAdapter;
|
|
||||||
import code.name.monkey.retromusic.fragments.base.AbsMainActivityFragment;
|
|
||||||
import code.name.monkey.retromusic.util.FileUtil;
|
import code.name.monkey.retromusic.util.FileUtil;
|
||||||
import code.name.monkey.retromusic.util.PreferenceUtil;
|
import code.name.monkey.retromusic.util.PreferenceUtil;
|
||||||
import code.name.monkey.retromusic.util.RetroColorUtil;
|
import code.name.monkey.retromusic.util.RetroColorUtil;
|
||||||
|
@ -245,7 +245,8 @@ public class FoldersFragment extends AbsMainActivityFragment implements
|
||||||
});
|
});
|
||||||
|
|
||||||
breadCrumbs.setActivatedContentColor(ToolbarContentTintHelper.toolbarTitleColor(getActivity(), ColorUtil.INSTANCE.darkenColor(primaryColor)));
|
breadCrumbs.setActivatedContentColor(ToolbarContentTintHelper.toolbarTitleColor(getActivity(), ColorUtil.INSTANCE.darkenColor(primaryColor)));
|
||||||
breadCrumbs.setDeactivatedContentColor(ToolbarContentTintHelper.toolbarSubtitleColor(getActivity(), ColorUtil.INSTANCE.darkenColor(primaryColor)));
|
breadCrumbs.setDeactivatedContentColor(ToolbarContentTintHelper.toolbarSubtitleColor(getActivity(),
|
||||||
|
ColorUtil.INSTANCE.darkenColor(primaryColor)));
|
||||||
appBarLayout.addOnOffsetChangedListener((appBarLayout, verticalOffset) -> getMainActivity().setLightStatusbar(!ATHUtil.INSTANCE.isWindowBackgroundDark(getContext())));
|
appBarLayout.addOnOffsetChangedListener((appBarLayout, verticalOffset) -> getMainActivity().setLightStatusbar(!ATHUtil.INSTANCE.isWindowBackgroundDark(getContext())));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -347,7 +348,8 @@ public class FoldersFragment extends AbsMainActivityFragment implements
|
||||||
BreadCrumbLayout.Crumb crumb = getActiveCrumb();
|
BreadCrumbLayout.Crumb crumb = getActiveCrumb();
|
||||||
if (crumb != null) {
|
if (crumb != null) {
|
||||||
//noinspection Convert2MethodRef
|
//noinspection Convert2MethodRef
|
||||||
new ListPathsAsyncTask(getActivity(), paths -> scanPaths(paths)).execute(new ListPathsAsyncTask.LoadingInfo(crumb.getFile(), AUDIO_FILE_FILTER));
|
new ListPathsAsyncTask(getActivity(), paths -> scanPaths(paths)).execute(new ListPathsAsyncTask.LoadingInfo(crumb.getFile(),
|
||||||
|
AUDIO_FILE_FILTER));
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -454,7 +456,9 @@ public class FoldersFragment extends AbsMainActivityFragment implements
|
||||||
case R.id.action_details:
|
case R.id.action_details:
|
||||||
case R.id.action_set_as_ringtone:
|
case R.id.action_set_as_ringtone:
|
||||||
case R.id.action_delete_from_device:
|
case R.id.action_delete_from_device:
|
||||||
new ListSongsAsyncTask(getActivity(), null, (songs, extra) -> SongMenuHelper.INSTANCE.handleMenuClick(getActivity(), songs.get(0), itemId)).execute(new ListSongsAsyncTask.LoadingInfo(toList(file), AUDIO_FILE_FILTER, getFileComparator()));
|
new ListSongsAsyncTask(getActivity(), null, (songs, extra) -> SongMenuHelper.INSTANCE.handleMenuClick(getActivity(),
|
||||||
|
songs.get(0), itemId)).execute(new ListSongsAsyncTask.LoadingInfo(toList(file), AUDIO_FILE_FILTER,
|
||||||
|
getFileComparator()));
|
||||||
return true;
|
return true;
|
||||||
case R.id.action_scan:
|
case R.id.action_scan:
|
||||||
new ListPathsAsyncTask(getActivity(), this::scanPaths).execute(new ListPathsAsyncTask.LoadingInfo(file, AUDIO_FILE_FILTER));
|
new ListPathsAsyncTask(getActivity(), this::scanPaths).execute(new ListPathsAsyncTask.LoadingInfo(file, AUDIO_FILE_FILTER));
|
||||||
|
@ -743,8 +747,8 @@ public class FoldersFragment extends AbsMainActivityFragment implements
|
||||||
ProgressBar progressBar = view.findViewById(R.id.progressBar);
|
ProgressBar progressBar = view.findViewById(R.id.progressBar);
|
||||||
ViewUtil.INSTANCE.setProgressDrawable(progressBar, ThemeStore.Companion.accentColor(context));
|
ViewUtil.INSTANCE.setProgressDrawable(progressBar, ThemeStore.Companion.accentColor(context));
|
||||||
|
|
||||||
MaterialDialog materialDialog= new MaterialDialog(context);
|
MaterialDialog materialDialog = new MaterialDialog(context, new BottomSheet());
|
||||||
materialDialog.setContentView(R.layout.progress_bar);
|
materialDialog.setContentView(view);
|
||||||
materialDialog.title(R.string.listing_files, "");
|
materialDialog.title(R.string.listing_files, "");
|
||||||
return materialDialog;
|
return materialDialog;
|
||||||
|
|
||||||
|
|
|
@ -614,5 +614,6 @@
|
||||||
<string name="on">On</string>
|
<string name="on">On</string>
|
||||||
<string name="select_preset">Select preset</string>
|
<string name="select_preset">Select preset</string>
|
||||||
<string name="upgrade_to_premium">Upgrade to premium</string>
|
<string name="upgrade_to_premium">Upgrade to premium</string>
|
||||||
|
<string name="action_new_playlist">New playlist</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|
Loading…
Reference in a new issue