Search in sources :

Example 86 with MaterialDialog

use of com.afollestad.materialdialogs.MaterialDialog in project Shuttle by timusus.

the class BiographyDialog method getBiographyDialog.

private static MaterialDialog getBiographyDialog(final Context context, @BioType int type, String artistName, String albumName) {
    @SuppressLint("InflateParams") View customView = LayoutInflater.from(context).inflate(R.layout.dialog_biography, null, false);
    final ProgressBar progressBar = customView.findViewById(R.id.progress);
    final TextView message = customView.findViewById(R.id.message);
    Callback<LastFmArtist> artistCallback = new Callback<LastFmArtist>() {

        @Override
        public void onResponse(Call<LastFmArtist> call, Response<LastFmArtist> response) {
            progressBar.setVisibility(View.GONE);
            if (response != null && response.isSuccessful()) {
                if (response.body() != null && response.body().artist != null && response.body().artist.bio != null) {
                    String summary = response.body().artist.bio.summary;
                    if (ShuttleUtils.hasNougat()) {
                        message.setText(Html.fromHtml(summary, Html.FROM_HTML_MODE_COMPACT));
                    } else {
                        message.setText(Html.fromHtml(summary));
                    }
                } else {
                    message.setText(R.string.no_artist_info);
                }
            }
        }

        @Override
        public void onFailure(Call<LastFmArtist> call, Throwable t) {
            progressBar.setVisibility(View.GONE);
            switch(type) {
                case BioType.ARTIST:
                    message.setText(R.string.no_artist_info);
                    break;
                case BioType.ALBUM:
                    message.setText(R.string.no_album_info);
                    break;
            }
        }
    };
    Callback<LastFmAlbum> albumCallback = new Callback<LastFmAlbum>() {

        @Override
        public void onResponse(Call<LastFmAlbum> call, Response<LastFmAlbum> response) {
            progressBar.setVisibility(View.GONE);
            if (response != null && response.isSuccessful()) {
                if (response.body() != null && response.body().album != null && response.body().album.wiki != null) {
                    String summary = response.body().album.wiki.summary;
                    if (ShuttleUtils.hasNougat()) {
                        message.setText(Html.fromHtml(summary, Html.FROM_HTML_MODE_COMPACT));
                    } else {
                        message.setText(Html.fromHtml(summary));
                    }
                } else {
                    message.setText(R.string.no_album_info);
                }
            }
        }

        @Override
        public void onFailure(Call<LastFmAlbum> call, Throwable t) {
            progressBar.setVisibility(View.GONE);
            switch(type) {
                case BioType.ARTIST:
                    message.setText(R.string.no_artist_info);
                    break;
                case BioType.ALBUM:
                    message.setText(R.string.no_album_info);
                    break;
            }
        }
    };
    switch(type) {
        case BioType.ARTIST:
            HttpClient.getInstance().lastFmService.getLastFmArtistResult(artistName).enqueue(artistCallback);
            break;
        case BioType.ALBUM:
            HttpClient.getInstance().lastFmService.getLastFmAlbumResult(artistName, albumName).enqueue(albumCallback);
            break;
    }
    MaterialDialog.Builder builder = DialogUtils.getBuilder(context).title(R.string.info).customView(customView, false).negativeText(R.string.close);
    return builder.build();
}
Also used : Call(retrofit2.Call) LastFmArtist(com.simplecity.amp_library.http.lastfm.LastFmArtist) MaterialDialog(com.afollestad.materialdialogs.MaterialDialog) LastFmAlbum(com.simplecity.amp_library.http.lastfm.LastFmAlbum) View(android.view.View) TextView(android.widget.TextView) Response(retrofit2.Response) Callback(retrofit2.Callback) SuppressLint(android.annotation.SuppressLint) TextView(android.widget.TextView) ProgressBar(android.widget.ProgressBar)

Example 87 with MaterialDialog

use of com.afollestad.materialdialogs.MaterialDialog in project Shuttle by timusus.

the class ArtworkDialog method build.

public static MaterialDialog build(Context context, ArtworkProvider artworkProvider) {
    @SuppressLint("InflateParams") View customView = LayoutInflater.from(context).inflate(R.layout.dialog_artwork, null);
    ViewModelAdapter adapter = new ViewModelAdapter();
    RecyclerView.LayoutManager layoutManager = new LinearLayoutManager(context, LinearLayoutManager.HORIZONTAL, false);
    RecyclerView recyclerView = customView.findViewById(R.id.recyclerView);
    recyclerView.addItemDecoration(new SpacesItemDecoration(16));
    recyclerView.setLayoutManager(layoutManager);
    recyclerView.setHasFixedSize(true);
    recyclerView.setItemViewCacheSize(0);
    recyclerView.setRecyclerListener(new RecyclerListener());
    adapter.items.add(0, new ArtworkLoadingView());
    adapter.notifyDataSetChanged();
    recyclerView.setAdapter(adapter);
    ArtworkView.GlideListener glideListener = artworkView -> {
        int index = adapter.items.indexOf(artworkView);
        if (index != -1) {
            adapter.removeItem(index);
        }
    };
    List<ViewModel> viewModels = new ArrayList<>();
    UserSelectedArtwork userSelectedArtwork = ShuttleApplication.getInstance().userSelectedArtwork.get(artworkProvider.getArtworkKey());
    if (userSelectedArtwork != null) {
        File file = null;
        if (userSelectedArtwork.path != null) {
            file = new File(userSelectedArtwork.path);
        }
        ArtworkView artworkView = new ArtworkView(userSelectedArtwork.type, artworkProvider, glideListener, file, true);
        artworkView.setSelected(true);
        viewModels.add(artworkView);
    }
    if (userSelectedArtwork == null || userSelectedArtwork.type != ArtworkProvider.Type.MEDIA_STORE) {
        viewModels.add(new ArtworkView(ArtworkProvider.Type.MEDIA_STORE, artworkProvider, glideListener));
    }
    if (userSelectedArtwork == null || userSelectedArtwork.type != ArtworkProvider.Type.TAG) {
        viewModels.add(new ArtworkView(ArtworkProvider.Type.TAG, artworkProvider, glideListener));
    }
    if (userSelectedArtwork == null || userSelectedArtwork.type != ArtworkProvider.Type.LAST_FM) {
        viewModels.add(new ArtworkView(ArtworkProvider.Type.LAST_FM, artworkProvider, glideListener));
    }
    if (userSelectedArtwork == null || userSelectedArtwork.type != ArtworkProvider.Type.ITUNES) {
        viewModels.add(new ArtworkView(ArtworkProvider.Type.ITUNES, artworkProvider, glideListener));
    }
    // Dummy Folder ArtworkView - will be replaced or removed depending on availability of folder images
    ArtworkView folderView = new ArtworkView(ArtworkProvider.Type.FOLDER, null, null);
    viewModels.add(folderView);
    ArtworkView.ClickListener listener = artworkView -> {
        Stream.of(viewModels).filter(viewModel -> viewModel instanceof ArtworkView).forEachIndexed((i, viewModel) -> ((ArtworkView) viewModel).setSelected(viewModel == artworkView));
        adapter.notifyItemRangeChanged(0, adapter.getItemCount(), 0);
    };
    Stream.of(viewModels).filter(viewModel -> viewModel instanceof ArtworkView).forEach(viewModel -> ((ArtworkView) viewModel).setListener(listener));
    adapter.setItems(viewModels);
    Observable.fromCallable(artworkProvider::getFolderArtworkFiles).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()).subscribe(files -> {
        adapter.removeItem(adapter.items.indexOf(folderView));
        if (files != null) {
            Stream.of(files).filter(file -> userSelectedArtwork == null || !file.getPath().equals(userSelectedArtwork.path)).forEach(file -> adapter.addItem(new ArtworkView(ArtworkProvider.Type.FOLDER, artworkProvider, glideListener, file, false)));
        }
    }, error -> LogUtils.logException(TAG, "Error getting artwork files", error));
    return new MaterialDialog.Builder(context).title(R.string.artwork_edit).customView(customView, false).autoDismiss(false).positiveText(context.getString(R.string.save)).onPositive((dialog, which) -> {
        ArtworkView checkedView = ArtworkDialog.getCheckedView(adapter.items);
        if (checkedView != null) {
            ArtworkModel artworkModel = checkedView.getItem();
            ContentValues values = new ContentValues();
            values.put(CustomArtworkTable.COLUMN_KEY, artworkProvider.getArtworkKey());
            values.put(CustomArtworkTable.COLUMN_TYPE, artworkModel.type);
            values.put(CustomArtworkTable.COLUMN_PATH, artworkModel.file == null ? null : artworkModel.file.getPath());
            context.getContentResolver().insert(CustomArtworkTable.URI, values);
            ShuttleApplication.getInstance().userSelectedArtwork.put(artworkProvider.getArtworkKey(), new UserSelectedArtwork(artworkModel.type, artworkModel.file == null ? null : artworkModel.file.getPath()));
        } else {
            context.getContentResolver().delete(CustomArtworkTable.URI, CustomArtworkTable.COLUMN_KEY + "='" + artworkProvider.getArtworkKey().replaceAll("'", "\''") + "'", null);
            ShuttleApplication.getInstance().userSelectedArtwork.remove(artworkProvider.getArtworkKey());
        }
        dialog.dismiss();
    }).negativeText(context.getString(R.string.close)).onNegative((dialog, which) -> dialog.dismiss()).neutralText(context.getString(R.string.artwork_gallery)).onNeutral((dialog, which) -> RxImagePicker.with(context).requestImage(Sources.GALLERY).flatMap(uri -> {
        // The directory will be shuttle/custom_artwork/key_hashcode/currentSystemTime.artwork
        // We want the directory to be based on the key, so we can delete old artwork, and the
        // filename to be unique, because it's used for Glide caching.
        File dir = new File(ShuttleApplication.getInstance().getFilesDir() + "/shuttle/custom_artwork/" + artworkProvider.getArtworkKey().hashCode() + "/");
        // Create dir if necessary
        if (!dir.exists()) {
            dir.mkdirs();
        } else {
            // Delete any existing artwork for this key.
            if (dir.isDirectory()) {
                String[] children = dir.list();
                for (String child : children) {
                    new File(dir, child).delete();
                }
            }
        }
        File file = new File(dir.getPath() + System.currentTimeMillis() + ".artwork");
        try {
            file.createNewFile();
            if (file.exists()) {
                return RxImageConverters.uriToFile(context, uri, file);
            }
        } catch (IOException e) {
            e.printStackTrace();
        }
        return null;
    }).filter(file -> file != null && file.exists()).subscribe(file -> {
        // If we've already got user-selected artwork in the adapter, remove it.
        if (adapter.getItemCount() != 0) {
            File aFile = ((ArtworkView) adapter.items.get(0)).file;
            if (aFile != null && aFile.getPath().contains(artworkProvider.getArtworkKey())) {
                adapter.removeItem(0);
            }
        }
        ArtworkView artworkView = new ArtworkView(ArtworkProvider.Type.FOLDER, artworkProvider, glideListener, file, true);
        artworkView.setSelected(true);
        adapter.addItem(0, artworkView);
        recyclerView.scrollToPosition(0);
    }, error -> LogUtils.logException(TAG, "Error picking from gallery", error))).cancelable(false).build();
}
Also used : R(com.simplecity.amp_library.R) Context(android.content.Context) SpacesItemDecoration(com.simplecity.amp_library.ui.recyclerview.SpacesItemDecoration) Stream(com.annimon.stream.Stream) RecyclerListener(com.simplecityapps.recycler_adapter.recyclerview.RecyclerListener) ViewModelAdapter(com.simplecityapps.recycler_adapter.adapter.ViewModelAdapter) ViewModel(com.simplecityapps.recycler_adapter.model.ViewModel) AndroidSchedulers(io.reactivex.android.schedulers.AndroidSchedulers) ArrayList(java.util.ArrayList) UserSelectedArtwork(com.simplecity.amp_library.model.UserSelectedArtwork) SuppressLint(android.annotation.SuppressLint) View(android.view.View) Observable(io.reactivex.Observable) Schedulers(io.reactivex.schedulers.Schedulers) RxImageConverters(com.mlsdev.rximagepicker.RxImageConverters) RxImagePicker(com.mlsdev.rximagepicker.RxImagePicker) ArtworkModel(com.simplecity.amp_library.model.ArtworkModel) ArtworkView(com.simplecity.amp_library.ui.modelviews.ArtworkView) LayoutInflater(android.view.LayoutInflater) ArtworkLoadingView(com.simplecity.amp_library.ui.modelviews.ArtworkLoadingView) LinearLayoutManager(android.support.v7.widget.LinearLayoutManager) IOException(java.io.IOException) ArtworkProvider(com.simplecity.amp_library.model.ArtworkProvider) CustomArtworkTable(com.simplecity.amp_library.sql.databases.CustomArtworkTable) File(java.io.File) RecyclerView(android.support.v7.widget.RecyclerView) ShuttleApplication(com.simplecity.amp_library.ShuttleApplication) List(java.util.List) ContentValues(android.content.ContentValues) Nullable(android.support.annotation.Nullable) MaterialDialog(com.afollestad.materialdialogs.MaterialDialog) Sources(com.mlsdev.rximagepicker.Sources) ContentValues(android.content.ContentValues) MaterialDialog(com.afollestad.materialdialogs.MaterialDialog) ArtworkView(com.simplecity.amp_library.ui.modelviews.ArtworkView) RecyclerListener(com.simplecityapps.recycler_adapter.recyclerview.RecyclerListener) ArrayList(java.util.ArrayList) ViewModel(com.simplecityapps.recycler_adapter.model.ViewModel) IOException(java.io.IOException) LinearLayoutManager(android.support.v7.widget.LinearLayoutManager) ArtworkLoadingView(com.simplecity.amp_library.ui.modelviews.ArtworkLoadingView) ArtworkModel(com.simplecity.amp_library.model.ArtworkModel) View(android.view.View) ArtworkView(com.simplecity.amp_library.ui.modelviews.ArtworkView) ArtworkLoadingView(com.simplecity.amp_library.ui.modelviews.ArtworkLoadingView) RecyclerView(android.support.v7.widget.RecyclerView) UserSelectedArtwork(com.simplecity.amp_library.model.UserSelectedArtwork) SuppressLint(android.annotation.SuppressLint) RecyclerView(android.support.v7.widget.RecyclerView) SpacesItemDecoration(com.simplecity.amp_library.ui.recyclerview.SpacesItemDecoration) File(java.io.File) ViewModelAdapter(com.simplecityapps.recycler_adapter.adapter.ViewModelAdapter)

Example 88 with MaterialDialog

use of com.afollestad.materialdialogs.MaterialDialog in project Shuttle by timusus.

the class MenuUtils method deleteFile.

public static void deleteFile(Context context, BaseFileObject fileObject, UnsafeAction fileDeleted) {
    MaterialDialog.Builder builder = DialogUtils.getBuilder(context).title(R.string.delete_item).iconRes(R.drawable.ic_warning_24dp);
    if (fileObject.fileType == FileType.FILE) {
        builder.content(String.format(context.getResources().getString(R.string.delete_file_confirmation_dialog), fileObject.name));
    } else {
        builder.content(String.format(context.getResources().getString(R.string.delete_folder_confirmation_dialog), fileObject.path));
    }
    builder.positiveText(R.string.button_ok).onPositive((materialDialog, dialogAction) -> {
        if (FileHelper.deleteFile(new File(fileObject.path))) {
            fileDeleted.run();
            CustomMediaScanner.scanFiles(Collections.singletonList(fileObject.path), null);
        } else {
            Toast.makeText(context, fileObject.fileType == FileType.FOLDER ? R.string.delete_folder_failed : R.string.delete_file_failed, Toast.LENGTH_LONG).show();
        }
    });
    builder.negativeText(R.string.cancel).show();
}
Also used : MaterialDialog(com.afollestad.materialdialogs.MaterialDialog) File(java.io.File)

Example 89 with MaterialDialog

use of com.afollestad.materialdialogs.MaterialDialog in project Shuttle by timusus.

the class PlaylistUtils method createPlaylistDialog.

@SuppressLint("CheckResult")
private static void createPlaylistDialog(final Context context, final OnSavePlaylistListener listener) {
    @SuppressLint("InflateParams") View customView = LayoutInflater.from(context).inflate(R.layout.dialog_playlist, null);
    final EditText editText = customView.findViewById(R.id.editText);
    Observable.fromCallable(() -> makePlaylistName(context)).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()).subscribe(name -> {
        editText.setText(name);
        if (!TextUtils.isEmpty(name)) {
            editText.setSelection(name.length());
        }
    }, error -> LogUtils.logException(TAG, "PlaylistUtils: Error Setting playlist name", error));
    MaterialDialog.Builder builder = DialogUtils.getBuilder(context).customView(customView, false).title(R.string.menu_playlist).positiveText(R.string.create_playlist_create_text).onPositive((materialDialog, dialogAction) -> {
        String name = editText.getText().toString();
        if (!name.isEmpty()) {
            idForPlaylistObservable(context, name).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()).subscribe(id -> {
                Uri uri;
                if (id >= 0) {
                    uri = ContentUris.withAppendedId(MediaStore.Audio.Playlists.EXTERNAL_CONTENT_URI, id);
                    clearPlaylist(id);
                } else {
                    ContentValues values = new ContentValues(1);
                    values.put(MediaStore.Audio.Playlists.NAME, name);
                    try {
                        uri = context.getContentResolver().insert(MediaStore.Audio.Playlists.EXTERNAL_CONTENT_URI, values);
                    } catch (IllegalArgumentException | NullPointerException e) {
                        Toast.makeText(context, R.string.dialog_create_playlist_error, Toast.LENGTH_LONG).show();
                        uri = null;
                    }
                }
                if (uri != null) {
                    listener.onSave(new Playlist(Playlist.Type.USER_CREATED, Long.valueOf(uri.getLastPathSegment()), name, true, false, true, true, true));
                }
            }, error -> LogUtils.logException(TAG, "PlaylistUtils: Error Saving playlist", error));
        }
    }).negativeText(R.string.cancel);
    final Dialog dialog = builder.build();
    dialog.show();
    TextWatcher textWatcher = new TextWatcher() {

        public void beforeTextChanged(CharSequence s, int start, int count, int after) {
        // don't care about this one
        }

        // Fixme:
        // It's probably best to just query all playlist names first, and then check against
        // that list, rather than requerying for each char change.
        public void onTextChanged(CharSequence s, int start, int before, int count) {
            String newText = editText.getText().toString();
            if (newText.trim().length() == 0) {
                ((MaterialDialog) dialog).getActionButton(DialogAction.POSITIVE).setEnabled(false);
            } else {
                ((MaterialDialog) dialog).getActionButton(DialogAction.POSITIVE).setEnabled(true);
                // check if playlist with current name exists already, and warn the user if so.
                idForPlaylistObservable(context, newText).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()).subscribe(id -> {
                    if (id >= 0) {
                        ((MaterialDialog) dialog).getActionButton(DialogAction.POSITIVE).setText(R.string.create_playlist_overwrite_text);
                    } else {
                        ((MaterialDialog) dialog).getActionButton(DialogAction.POSITIVE).setText(R.string.create_playlist_create_text);
                    }
                }, error -> LogUtils.logException(TAG, "PlaylistUtils: Error handling text change", error));
            }
        }

        public void afterTextChanged(Editable s) {
        // don't care about this one
        }
    };
    editText.addTextChangedListener(textWatcher);
}
Also used : EditText(android.widget.EditText) R(com.simplecity.amp_library.R) Spannable(android.text.Spannable) Completable(io.reactivex.Completable) Uri(android.net.Uri) PlayCountTable(com.simplecity.amp_library.sql.providers.PlayCountTable) AndroidSchedulers(io.reactivex.android.schedulers.AndroidSchedulers) Song(com.simplecity.amp_library.model.Song) Optional(com.annimon.stream.Optional) CheckBox(android.widget.CheckBox) ContentResolver(android.content.ContentResolver) MediaStore(android.provider.MediaStore) View(android.view.View) Schedulers(io.reactivex.schedulers.Schedulers) Log(android.util.Log) Playlist(com.simplecity.amp_library.model.Playlist) SubMenu(android.view.SubMenu) Query(com.simplecity.amp_library.model.Query) List(java.util.List) TextView(android.widget.TextView) ContentValues(android.content.ContentValues) Nullable(android.support.annotation.Nullable) MaterialDialog(com.afollestad.materialdialogs.MaterialDialog) SqlUtils(com.simplecity.amp_library.sql.SqlUtils) TextWatcher(android.text.TextWatcher) FileType(com.simplecity.amp_library.interfaces.FileType) Context(android.content.Context) Stream(com.annimon.stream.Stream) Environment(android.os.Environment) Dialog(android.app.Dialog) Intent(android.content.Intent) NonNull(android.support.annotation.NonNull) Single(io.reactivex.Single) Editable(android.text.Editable) ArrayList(java.util.ArrayList) SuppressLint(android.annotation.SuppressLint) SpannableStringBuilder(android.text.SpannableStringBuilder) Toast(android.widget.Toast) BaseFileObject(com.simplecity.amp_library.model.BaseFileObject) Observable(io.reactivex.Observable) UnsafeConsumer(com.simplecity.amp_library.rx.UnsafeConsumer) Cursor(android.database.Cursor) SqlBriteUtils(com.simplecity.amp_library.sql.sqlbrite.SqlBriteUtils) LayoutInflater(android.view.LayoutInflater) StyleSpan(android.text.style.StyleSpan) FileWriter(java.io.FileWriter) ProgressDialog(android.app.ProgressDialog) TextUtils(android.text.TextUtils) DialogAction(com.afollestad.materialdialogs.DialogAction) IOException(java.io.IOException) WorkerThread(android.support.annotation.WorkerThread) File(java.io.File) TimeUnit(java.util.concurrent.TimeUnit) ShuttleApplication(com.simplecity.amp_library.ShuttleApplication) Pair(android.support.v4.util.Pair) Crashlytics(com.crashlytics.android.Crashlytics) Collections(java.util.Collections) EditText(android.widget.EditText) ContentUris(android.content.ContentUris) ContentValues(android.content.ContentValues) MaterialDialog(com.afollestad.materialdialogs.MaterialDialog) View(android.view.View) TextView(android.widget.TextView) Uri(android.net.Uri) Playlist(com.simplecity.amp_library.model.Playlist) MaterialDialog(com.afollestad.materialdialogs.MaterialDialog) Dialog(android.app.Dialog) ProgressDialog(android.app.ProgressDialog) SuppressLint(android.annotation.SuppressLint) TextWatcher(android.text.TextWatcher) Editable(android.text.Editable) SuppressLint(android.annotation.SuppressLint)

Example 90 with MaterialDialog

use of com.afollestad.materialdialogs.MaterialDialog in project Shuttle by timusus.

the class SleepTimer method showMinutesDialog.

public void showMinutesDialog(Context context, UnsafeAction timerStarted) {
    @SuppressLint("InflateParams") View customView = LayoutInflater.from(context).inflate(R.layout.dialog_minutes_picker, null);
    EditText editText = customView.findViewById(R.id.editText);
    new MaterialDialog.Builder(context).title(R.string.sleep_timer_set_minutes).customView(customView, false).positiveText(R.string.button_ok).negativeText(R.string.cancel).autoDismiss(false).onPositive((materialDialog, dialogAction) -> {
        if (!TextUtils.isEmpty(editText.getText())) {
            start(Integer.parseInt(editText.getText().toString()) * 60, playToEnd);
            timerStarted.run();
            materialDialog.dismiss();
        }
    }).onNegative((materialDialog, dialogAction) -> {
        materialDialog.dismiss();
    }).show();
    new Handler().post(() -> {
        InputMethodManager inputMethodManager = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE);
        inputMethodManager.showSoftInput(editText, InputMethodManager.SHOW_IMPLICIT);
    });
}
Also used : EditText(android.widget.EditText) R(com.simplecity.amp_library.R) Context(android.content.Context) BackpressureStrategy(io.reactivex.BackpressureStrategy) LayoutInflater(android.view.LayoutInflater) BehaviorSubject(io.reactivex.subjects.BehaviorSubject) TextUtils(android.text.TextUtils) InputMethodManager(android.view.inputmethod.InputMethodManager) TimeUnit(java.util.concurrent.TimeUnit) SuppressLint(android.annotation.SuppressLint) Flowable(io.reactivex.Flowable) Handler(android.os.Handler) View(android.view.View) Observable(io.reactivex.Observable) MaterialDialog(com.afollestad.materialdialogs.MaterialDialog) UnsafeAction(com.simplecity.amp_library.rx.UnsafeAction) EditText(android.widget.EditText) SuppressLint(android.annotation.SuppressLint) Handler(android.os.Handler) InputMethodManager(android.view.inputmethod.InputMethodManager) View(android.view.View)

Aggregations

MaterialDialog (com.afollestad.materialdialogs.MaterialDialog)90 View (android.view.View)57 DialogAction (com.afollestad.materialdialogs.DialogAction)45 TextView (android.widget.TextView)36 NonNull (android.support.annotation.NonNull)33 Intent (android.content.Intent)21 File (java.io.File)21 RecyclerView (android.support.v7.widget.RecyclerView)20 ImageView (android.widget.ImageView)19 SuppressLint (android.annotation.SuppressLint)18 List (java.util.List)16 LayoutInflater (android.view.LayoutInflater)14 MenuItem (android.view.MenuItem)14 Context (android.content.Context)13 PopupMenu (android.widget.PopupMenu)12 Activity (android.app.Activity)11 ListView (android.widget.ListView)11 Toast (android.widget.Toast)11 ArrayList (java.util.ArrayList)11 Bundle (android.os.Bundle)8