Search in sources :

Example 1 with ArtworkProvider

use of com.simplecity.amp_library.model.ArtworkProvider in project Shuttle by timusus.

the class ArtworkView method bindView.

@Override
public void bindView(ViewHolder holder) {
    super.bindView(holder);
    long time = System.currentTimeMillis();
    holder.textContainer.setBackground(null);
    holder.progressBar.setVisibility(View.VISIBLE);
    holder.lineTwo.setText(null);
    Glide.with(holder.itemView.getContext()).using(new TypeLoader(type, file), InputStream.class).from(ArtworkProvider.class).as(BitmapAndSize.class).sourceEncoder(new StreamEncoder()).decoder(new BitmapAndSizeDecoder(holder.itemView.getContext())).diskCacheStrategy(DiskCacheStrategy.NONE).load(artworkProvider).listener(new RequestListener<ArtworkProvider, BitmapAndSize>() {

        @Override
        public boolean onException(Exception e, ArtworkProvider model, Target<BitmapAndSize> target, boolean isFirstResource) {
            if (glideListener != null) {
                if (holder.itemView.getHandler() != null) {
                    holder.itemView.getHandler().postDelayed(() -> glideListener.onArtworkLoadFailed(ArtworkView.this), System.currentTimeMillis() + 1000 - time);
                }
            }
            return false;
        }

        @Override
        public boolean onResourceReady(BitmapAndSize resource, ArtworkProvider model, Target<BitmapAndSize> target, boolean isFromMemoryCache, boolean isFirstResource) {
            return false;
        }
    }).into(new ImageViewTarget<BitmapAndSize>(((ViewHolder) holder).imageView) {

        @Override
        protected void setResource(BitmapAndSize resource) {
            holder.textContainer.setBackgroundResource(R.drawable.text_protection_scrim_reversed);
            holder.progressBar.setVisibility(View.GONE);
            holder.imageView.setImageBitmap(resource.bitmap);
            holder.lineTwo.setText(String.format("%sx%spx", resource.size.width, resource.size.height));
        }
    });
    holder.lineOne.setText(ArtworkModel.getTypeString(type));
    if (type == ArtworkProvider.Type.FOLDER && file != null) {
        holder.lineOne.setText(file.getName());
    }
    if (isCustom && file != null && file.getPath().contains("custom_artwork")) {
        holder.lineOne.setText(holder.itemView.getContext().getString(R.string.artwork_type_custom));
    }
    holder.checkView.setVisibility(isSelected() ? View.VISIBLE : View.GONE);
}
Also used : Target(com.bumptech.glide.request.target.Target) ImageViewTarget(com.bumptech.glide.request.target.ImageViewTarget) RequestListener(com.bumptech.glide.request.RequestListener) BitmapAndSizeDecoder(com.simplecity.amp_library.glide.utils.BitmapAndSizeDecoder) BaseViewHolder(com.simplecityapps.recycler_adapter.recyclerview.BaseViewHolder) ArtworkProvider(com.simplecity.amp_library.model.ArtworkProvider) BitmapAndSize(com.simplecity.amp_library.glide.utils.BitmapAndSize) TypeLoader(com.simplecity.amp_library.glide.loader.TypeLoader) StreamEncoder(com.bumptech.glide.load.model.StreamEncoder)

Example 2 with ArtworkProvider

use of com.simplecity.amp_library.model.ArtworkProvider in project Shuttle by timusus.

the class ArtworkDownloadService method onCreate.

@Override
public void onCreate() {
    super.onCreate();
    notificationHelper = new NotificationHelper(this);
    if (!ShuttleUtils.isOnline(false)) {
        Toast toast = Toast.makeText(this, getResources().getString(R.string.connection_unavailable), Toast.LENGTH_SHORT);
        toast.show();
        stopSelf();
        return;
    }
    notificationHelper.notify(NOTIFICATION_ID, getNotificationBuilder().build());
    Single<List<ArtworkProvider>> sharedItemsSingle = DataManager.getInstance().getAlbumArtistsRelay().first(Collections.emptyList()).<ArtworkProvider>flatMapObservable(Observable::fromIterable).mergeWith(DataManager.getInstance().getAlbumsRelay().first(Collections.emptyList()).flatMapObservable(Observable::fromIterable)).toList();
    disposables.add(sharedItemsSingle.observeOn(AndroidSchedulers.mainThread()).subscribe(list -> {
        max = list.size();
        updateProgress();
    }, error -> LogUtils.logException(TAG, "Error determining max", error)));
    disposables.add(sharedItemsSingle.flatMapObservable(Observable::fromIterable).flatMap(artworkProvider -> Observable.just(artworkProvider).map(artwork -> {
        FutureTarget<File> futureTarget = Glide.with(ArtworkDownloadService.this).using(new ArtworkModelLoader(true), InputStream.class).load(artwork).as(InputStream.class).downloadOnly(SimpleTarget.SIZE_ORIGINAL, SimpleTarget.SIZE_ORIGINAL);
        try {
            futureTarget.get(30, TimeUnit.SECONDS);
        } catch (InterruptedException | ExecutionException | TimeoutException e) {
            Log.e(TAG, "Error downloading artworkProvider: " + e);
        }
        Glide.clear(futureTarget);
        return artwork;
    })).subscribeOn(Schedulers.computation()).observeOn(AndroidSchedulers.mainThread()).subscribe(item -> updateProgress(), error -> LogUtils.logException(TAG, "Error downloading artwork", error)));
}
Also used : R(com.simplecity.amp_library.R) TimeoutException(java.util.concurrent.TimeoutException) Intent(android.content.Intent) PendingIntent(android.app.PendingIntent) NotificationHelper(com.simplecity.amp_library.notifications.NotificationHelper) Single(io.reactivex.Single) AndroidSchedulers(io.reactivex.android.schedulers.AndroidSchedulers) IBinder(android.os.IBinder) FutureTarget(com.bumptech.glide.request.FutureTarget) Toast(android.widget.Toast) Observable(io.reactivex.Observable) Schedulers(io.reactivex.schedulers.Schedulers) ShuttleUtils(com.simplecity.amp_library.utils.ShuttleUtils) Log(android.util.Log) ArtworkModelLoader(com.simplecity.amp_library.glide.loader.ArtworkModelLoader) SimpleTarget(com.bumptech.glide.request.target.SimpleTarget) LogUtils(com.simplecity.amp_library.utils.LogUtils) ComponentName(android.content.ComponentName) Service(android.app.Service) ArtworkProvider(com.simplecity.amp_library.model.ArtworkProvider) File(java.io.File) ExecutionException(java.util.concurrent.ExecutionException) TimeUnit(java.util.concurrent.TimeUnit) List(java.util.List) CompositeDisposable(io.reactivex.disposables.CompositeDisposable) Glide(com.bumptech.glide.Glide) NotificationCompat(android.support.v4.app.NotificationCompat) DataManager(com.simplecity.amp_library.utils.DataManager) Nullable(android.support.annotation.Nullable) Collections(java.util.Collections) InputStream(java.io.InputStream) ArtworkModelLoader(com.simplecity.amp_library.glide.loader.ArtworkModelLoader) FutureTarget(com.bumptech.glide.request.FutureTarget) Toast(android.widget.Toast) NotificationHelper(com.simplecity.amp_library.notifications.NotificationHelper) ArtworkProvider(com.simplecity.amp_library.model.ArtworkProvider) List(java.util.List) Observable(io.reactivex.Observable)

Example 3 with ArtworkProvider

use of com.simplecity.amp_library.model.ArtworkProvider in project Shuttle by timusus.

the class ArtworkDialog method showDialog.

public static void showDialog(Context context, ArtworkProvider artworkProvider) {
    View customView = LayoutInflater.from(context).inflate(R.layout.dialog_artwork, null);
    ArtworkAdapter artworkAdapter = new ArtworkAdapter();
    RecyclerView.LayoutManager layoutManager = new LinearLayoutManager(context, LinearLayoutManager.HORIZONTAL, false);
    RecyclerView recyclerView = (RecyclerView) customView.findViewById(R.id.recyclerView);
    recyclerView.addItemDecoration(new SpacesItemDecoration(16));
    recyclerView.setLayoutManager(layoutManager);
    recyclerView.setHasFixedSize(true);
    recyclerView.setItemViewCacheSize(0);
    recyclerView.setRecyclerListener(holder -> {
        if (holder.getAdapterPosition() != -1) {
            artworkAdapter.items.get(holder.getAdapterPosition()).recycle(holder);
        }
    });
    artworkAdapter.items.add(0, new LoadingView());
    artworkAdapter.notifyDataSetChanged();
    recyclerView.setAdapter(artworkAdapter);
    ArtworkView.GlideListener glideListener = artworkView -> {
        int index = artworkAdapter.items.indexOf(artworkView);
        if (index != -1) {
            artworkAdapter.removeItem(index);
        }
    };
    List<AdaptableItem> adaptableItems = 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);
        adaptableItems.add(artworkView);
    }
    if (userSelectedArtwork == null || userSelectedArtwork.type != ArtworkProvider.Type.MEDIA_STORE) {
        adaptableItems.add(new ArtworkView(ArtworkProvider.Type.MEDIA_STORE, artworkProvider, glideListener));
    }
    if (userSelectedArtwork == null || userSelectedArtwork.type != ArtworkProvider.Type.TAG) {
        adaptableItems.add(new ArtworkView(ArtworkProvider.Type.TAG, artworkProvider, glideListener));
    }
    if (userSelectedArtwork == null || userSelectedArtwork.type != ArtworkProvider.Type.LAST_FM) {
        adaptableItems.add(new ArtworkView(ArtworkProvider.Type.LAST_FM, artworkProvider, glideListener));
    }
    if (userSelectedArtwork == null || userSelectedArtwork.type != ArtworkProvider.Type.ITUNES) {
        adaptableItems.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);
    adaptableItems.add(folderView);
    artworkAdapter.setItems(adaptableItems);
    Observable.fromCallable(artworkProvider::getFolderArtworkFiles).subscribeOn(Schedulers.io()).subscribeOn(AndroidSchedulers.mainThread()).subscribe(files -> {
        artworkAdapter.removeItem(artworkAdapter.items.indexOf(folderView));
        if (files != null) {
            Stream.of(files).filter(file -> userSelectedArtwork == null || !file.getPath().equals(userSelectedArtwork.path)).forEach(file -> {
                artworkAdapter.addItem(new ArtworkView(ArtworkProvider.Type.FOLDER, artworkProvider, glideListener, file, false));
            });
        }
    }, error -> {
        Log.e(TAG, "Error getting folder artwork files.. " + error.toString());
    });
    DialogUtils.getBuilder(context).title(context.getString(R.string.artwork_edit)).customView(customView, false).autoDismiss(false).positiveText(context.getString(R.string.save)).onPositive((dialog, which) -> {
        if (artworkAdapter.checkedItem != null) {
            ContentValues values = new ContentValues();
            values.put(CustomArtworkTable.COLUMN_KEY, artworkProvider.getArtworkKey());
            values.put(CustomArtworkTable.COLUMN_TYPE, artworkAdapter.checkedItem.type);
            values.put(CustomArtworkTable.COLUMN_PATH, artworkAdapter.checkedItem.file == null ? null : artworkAdapter.checkedItem.file.getPath());
            context.getContentResolver().insert(CustomArtworkTable.URI, values);
            ShuttleApplication.getInstance().userSelectedArtwork.put(artworkProvider.getArtworkKey(), new UserSelectedArtwork(artworkAdapter.checkedItem.type, artworkAdapter.checkedItem.file == null ? null : artworkAdapter.checkedItem.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 -> {
        File dir = new File(ShuttleApplication.getInstance().getFilesDir() + "/shuttle/custom_artwork/" + artworkProvider.getArtworkKey().hashCode() + "/");
        if (!dir.exists()) {
            dir.mkdirs();
        } else {
            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 (artworkAdapter.getItemCount() != 0) {
            File aFile = ((ArtworkView) artworkAdapter.items.get(0)).file;
            if (aFile != null && aFile.getPath().contains(artworkProvider.getArtworkKey())) {
                artworkAdapter.removeItem(0);
            }
        }
        ArtworkView artworkView = new ArtworkView(ArtworkProvider.Type.FOLDER, artworkProvider, glideListener, file, true);
        artworkAdapter.addItem(0, artworkView);
        artworkAdapter.selectItem(0);
        recyclerView.scrollToPosition(0);
    })).cancelable(false).show();
}
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) AndroidSchedulers(rx.android.schedulers.AndroidSchedulers) ItemAdapter(com.simplecity.amp_library.ui.adapters.ItemAdapter) ArrayList(java.util.ArrayList) Observable(rx.Observable) UserSelectedArtwork(com.simplecity.amp_library.model.UserSelectedArtwork) LoadingView(com.simplecity.amp_library.ui.modelviews.LoadingView) Schedulers(rx.schedulers.Schedulers) View(android.view.View) RxImageConverters(com.mlsdev.rximagepicker.RxImageConverters) Log(android.util.Log) RxImagePicker(com.mlsdev.rximagepicker.RxImagePicker) ArtworkModel(com.simplecity.amp_library.model.ArtworkModel) ArtworkView(com.simplecity.amp_library.ui.modelviews.ArtworkView) LayoutInflater(android.view.LayoutInflater) 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) AdaptableItem(com.simplecity.amp_library.model.AdaptableItem) Sources(com.mlsdev.rximagepicker.Sources) ContentValues(android.content.ContentValues) ArtworkView(com.simplecity.amp_library.ui.modelviews.ArtworkView) ArrayList(java.util.ArrayList) AdaptableItem(com.simplecity.amp_library.model.AdaptableItem) IOException(java.io.IOException) LinearLayoutManager(android.support.v7.widget.LinearLayoutManager) LoadingView(com.simplecity.amp_library.ui.modelviews.LoadingView) View(android.view.View) ArtworkView(com.simplecity.amp_library.ui.modelviews.ArtworkView) RecyclerView(android.support.v7.widget.RecyclerView) UserSelectedArtwork(com.simplecity.amp_library.model.UserSelectedArtwork) LoadingView(com.simplecity.amp_library.ui.modelviews.LoadingView) RecyclerView(android.support.v7.widget.RecyclerView) SpacesItemDecoration(com.simplecity.amp_library.ui.recyclerview.SpacesItemDecoration) File(java.io.File)

Example 4 with ArtworkProvider

use of com.simplecity.amp_library.model.ArtworkProvider 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)

Aggregations

ArtworkProvider (com.simplecity.amp_library.model.ArtworkProvider)4 R (com.simplecity.amp_library.R)3 File (java.io.File)3 List (java.util.List)3 ContentValues (android.content.ContentValues)2 Context (android.content.Context)2 Nullable (android.support.annotation.Nullable)2 LinearLayoutManager (android.support.v7.widget.LinearLayoutManager)2 RecyclerView (android.support.v7.widget.RecyclerView)2 Log (android.util.Log)2 LayoutInflater (android.view.LayoutInflater)2 View (android.view.View)2 Stream (com.annimon.stream.Stream)2 RxImageConverters (com.mlsdev.rximagepicker.RxImageConverters)2 RxImagePicker (com.mlsdev.rximagepicker.RxImagePicker)2 Sources (com.mlsdev.rximagepicker.Sources)2 ShuttleApplication (com.simplecity.amp_library.ShuttleApplication)2 ArtworkModel (com.simplecity.amp_library.model.ArtworkModel)2 UserSelectedArtwork (com.simplecity.amp_library.model.UserSelectedArtwork)2 CustomArtworkTable (com.simplecity.amp_library.sql.databases.CustomArtworkTable)2