Merge pull request #1619 from mfietz/issue/1222-completed-downloads-gears
Completed Downloads: Gears Dialog
This commit is contained in:
commit
9ca056253d
@ -25,13 +25,10 @@ public class DownloadedEpisodesListAdapter extends BaseAdapter {
|
||||
private final Context context;
|
||||
private final ItemAccess itemAccess;
|
||||
|
||||
private final int imageSize;
|
||||
|
||||
public DownloadedEpisodesListAdapter(Context context, ItemAccess itemAccess) {
|
||||
super();
|
||||
this.context = context;
|
||||
this.itemAccess = itemAccess;
|
||||
this.imageSize = (int) context.getResources().getDimension(R.dimen.thumbnail_length_downloaded_item);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -52,7 +49,7 @@ public class DownloadedEpisodesListAdapter extends BaseAdapter {
|
||||
@Override
|
||||
public View getView(int position, View convertView, ViewGroup parent) {
|
||||
Holder holder;
|
||||
final FeedItem item = (FeedItem) getItem(position);
|
||||
final FeedItem item = getItem(position);
|
||||
if (item == null) return null;
|
||||
|
||||
if (convertView == null) {
|
||||
@ -61,35 +58,19 @@ public class DownloadedEpisodesListAdapter extends BaseAdapter {
|
||||
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||
convertView = inflater.inflate(R.layout.downloaded_episodeslist_item,
|
||||
parent, false);
|
||||
holder.imageView = (ImageView) convertView.findViewById(R.id.imgvImage);
|
||||
holder.title = (TextView) convertView.findViewById(R.id.txtvTitle);
|
||||
holder.txtvSize = (TextView) convertView.findViewById(R.id.txtvSize);
|
||||
holder.queueStatus = (ImageView) convertView.findViewById(R.id.imgvInPlaylist);
|
||||
holder.pubDate = (TextView) convertView
|
||||
.findViewById(R.id.txtvPublished);
|
||||
holder.butSecondary = (ImageButton) convertView
|
||||
.findViewById(R.id.butSecondaryAction);
|
||||
holder.imageView = (ImageView) convertView.findViewById(R.id.imgvImage);
|
||||
holder.txtvSize = (TextView) convertView.findViewById(R.id.txtvSize);
|
||||
convertView.setTag(holder);
|
||||
} else {
|
||||
holder = (Holder) convertView.getTag();
|
||||
}
|
||||
|
||||
holder.title.setText(item.getTitle());
|
||||
String pubDateStr = DateUtils.formatAbbrev(context, item.getPubDate());
|
||||
holder.pubDate.setText(pubDateStr);
|
||||
holder.txtvSize.setText(Converter.byteToString(item.getMedia().getSize()));
|
||||
FeedItem.State state = item.getState();
|
||||
|
||||
if (state == FeedItem.State.PLAYING) {
|
||||
holder.butSecondary.setEnabled(false);
|
||||
} else {
|
||||
holder.butSecondary.setEnabled(true);
|
||||
}
|
||||
|
||||
holder.butSecondary.setFocusable(false);
|
||||
holder.butSecondary.setTag(item);
|
||||
holder.butSecondary.setOnClickListener(secondaryActionListener);
|
||||
|
||||
|
||||
Glide.with(context)
|
||||
.load(item.getImageUri())
|
||||
.placeholder(R.color.light_gray)
|
||||
@ -99,6 +80,22 @@ public class DownloadedEpisodesListAdapter extends BaseAdapter {
|
||||
.dontAnimate()
|
||||
.into(holder.imageView);
|
||||
|
||||
holder.title.setText(item.getTitle());
|
||||
holder.txtvSize.setText(Converter.byteToString(item.getMedia().getSize()));
|
||||
holder.queueStatus.setVisibility(item.isTagged(FeedItem.TAG_QUEUE) ? View.VISIBLE : View.GONE);
|
||||
String pubDateStr = DateUtils.formatAbbrev(context, item.getPubDate());
|
||||
holder.pubDate.setText(pubDateStr);
|
||||
|
||||
FeedItem.State state = item.getState();
|
||||
if (state == FeedItem.State.PLAYING) {
|
||||
holder.butSecondary.setEnabled(false);
|
||||
} else {
|
||||
holder.butSecondary.setEnabled(true);
|
||||
}
|
||||
holder.butSecondary.setFocusable(false);
|
||||
holder.butSecondary.setTag(item);
|
||||
holder.butSecondary.setOnClickListener(secondaryActionListener);
|
||||
|
||||
return convertView;
|
||||
}
|
||||
|
||||
@ -112,10 +109,11 @@ public class DownloadedEpisodesListAdapter extends BaseAdapter {
|
||||
|
||||
|
||||
static class Holder {
|
||||
TextView title;
|
||||
TextView pubDate;
|
||||
ImageView imageView;
|
||||
TextView title;
|
||||
TextView txtvSize;
|
||||
ImageView queueStatus;
|
||||
TextView pubDate;
|
||||
ImageButton butSecondary;
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,6 @@
|
||||
package de.danoeh.antennapod.dialog;
|
||||
|
||||
import android.content.res.TypedArray;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.ActivityCompat;
|
||||
@ -18,10 +17,6 @@ import android.widget.Button;
|
||||
import android.widget.ListView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.joanzapata.iconify.Icon;
|
||||
import com.joanzapata.iconify.IconDrawable;
|
||||
import com.joanzapata.iconify.fonts.FontAwesomeIcons;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
@ -39,6 +34,14 @@ public class EpisodesApplyActionFragment extends Fragment {
|
||||
|
||||
public String TAG = "EpisodeActionFragment";
|
||||
|
||||
public static final int ACTION_QUEUE = 0;
|
||||
public static final int ACTION_MARK_PLAYED = 1;
|
||||
public static final int ACTION_MARK_UNPLAYED = 2;
|
||||
public static final int ACTION_DOWNLOAD = 4;
|
||||
public static final int ACTION_REMOVE = 8;
|
||||
public static final int ACTION_ALL = ACTION_QUEUE | ACTION_MARK_PLAYED | ACTION_MARK_UNPLAYED
|
||||
| ACTION_DOWNLOAD | ACTION_REMOVE;
|
||||
|
||||
private ListView mListView;
|
||||
private ArrayAdapter<String> mAdapter;
|
||||
|
||||
@ -48,27 +51,26 @@ public class EpisodesApplyActionFragment extends Fragment {
|
||||
private Button btnDownload;
|
||||
private Button btnDelete;
|
||||
|
||||
private final Map<Long,FeedItem> idMap;
|
||||
private final List<FeedItem> episodes;
|
||||
private final Map<Long,FeedItem> idMap = new ArrayMap<>();
|
||||
private final List<FeedItem> episodes = new ArrayList<>();
|
||||
private int actions;
|
||||
private final List<String> titles = new ArrayList();
|
||||
private final LongList checkedIds = new LongList();
|
||||
|
||||
private MenuItem mSelectToggle;
|
||||
|
||||
private int textColor;
|
||||
|
||||
public EpisodesApplyActionFragment() {
|
||||
this.episodes = new ArrayList<>();
|
||||
this.idMap = new ArrayMap<>();
|
||||
public static EpisodesApplyActionFragment newInstance(List<FeedItem> items) {
|
||||
return newInstance(items, ACTION_ALL);
|
||||
}
|
||||
|
||||
public void setEpisodes(List<FeedItem> episodes) {
|
||||
this.episodes.clear();
|
||||
this.episodes.addAll(episodes);
|
||||
this.idMap.clear();
|
||||
for(FeedItem episode : episodes) {
|
||||
this.idMap.put(episode.getId(), episode);
|
||||
public static EpisodesApplyActionFragment newInstance(List<FeedItem> items, int actions) {
|
||||
EpisodesApplyActionFragment f = new EpisodesApplyActionFragment();
|
||||
f.episodes.addAll(items);
|
||||
for(FeedItem episode : items) {
|
||||
f.idMap.put(episode.getId(), episode);
|
||||
}
|
||||
f.actions = actions;
|
||||
return f;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -103,16 +105,48 @@ public class EpisodesApplyActionFragment extends Fragment {
|
||||
mListView.setAdapter(mAdapter);
|
||||
checkAll();
|
||||
|
||||
int lastVisibleDiv = 0;
|
||||
btnAddToQueue = (Button) view.findViewById(R.id.btnAddToQueue);
|
||||
btnAddToQueue.setOnClickListener(v -> queueChecked());
|
||||
if((actions & ACTION_QUEUE) != 0) {
|
||||
btnAddToQueue.setOnClickListener(v -> queueChecked());
|
||||
lastVisibleDiv = R.id.divider1;
|
||||
} else {
|
||||
btnAddToQueue.setVisibility(View.GONE);
|
||||
view.findViewById(R.id.divider1).setVisibility(View.GONE);
|
||||
}
|
||||
btnMarkAsPlayed = (Button) view.findViewById(R.id.btnMarkAsPlayed);
|
||||
btnMarkAsPlayed.setOnClickListener(v -> markedCheckedPlayed());
|
||||
if((actions & ACTION_MARK_PLAYED) != 0) {
|
||||
btnMarkAsPlayed.setOnClickListener(v -> markedCheckedPlayed());
|
||||
lastVisibleDiv = R.id.divider2;
|
||||
} else {
|
||||
btnMarkAsPlayed.setVisibility(View.GONE);
|
||||
view.findViewById(R.id.divider2).setVisibility(View.GONE);
|
||||
}
|
||||
btnMarkAsUnplayed = (Button) view.findViewById(R.id.btnMarkAsUnplayed);
|
||||
btnMarkAsUnplayed.setOnClickListener(v -> markedCheckedUnplayed());
|
||||
if((actions & ACTION_MARK_UNPLAYED) != 0) {
|
||||
btnMarkAsUnplayed.setOnClickListener(v -> markedCheckedUnplayed());
|
||||
lastVisibleDiv = R.id.divider3;
|
||||
} else {
|
||||
btnMarkAsUnplayed.setVisibility(View.GONE);
|
||||
view.findViewById(R.id.divider3).setVisibility(View.GONE);
|
||||
}
|
||||
btnDownload = (Button) view.findViewById(R.id.btnDownload);
|
||||
btnDownload.setOnClickListener(v -> downloadChecked());
|
||||
if((actions & ACTION_DOWNLOAD) != 0) {
|
||||
btnDownload.setOnClickListener(v -> downloadChecked());
|
||||
lastVisibleDiv = R.id.divider4;
|
||||
} else {
|
||||
btnDownload.setVisibility(View.GONE);
|
||||
view.findViewById(R.id.divider4).setVisibility(View.GONE);
|
||||
}
|
||||
btnDelete = (Button) view.findViewById(R.id.btnDelete);
|
||||
btnDelete.setOnClickListener(v -> deleteChecked());
|
||||
if((actions & ACTION_REMOVE) != 0) {
|
||||
btnDelete.setOnClickListener(v -> deleteChecked());
|
||||
} else {
|
||||
btnDelete.setVisibility(View.GONE);
|
||||
if(lastVisibleDiv > 0) {
|
||||
view.findViewById(lastVisibleDiv).setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
return view;
|
||||
}
|
||||
@ -122,11 +156,6 @@ public class EpisodesApplyActionFragment extends Fragment {
|
||||
super.onCreateOptionsMenu(menu, inflater);
|
||||
inflater.inflate(R.menu.episodes_apply_action_options, menu);
|
||||
|
||||
int[] attrs = { android.R.attr.textColor };
|
||||
TypedArray ta = getActivity().obtainStyledAttributes(attrs);
|
||||
textColor = ta.getColor(0, Color.GRAY);
|
||||
ta.recycle();
|
||||
|
||||
mSelectToggle = menu.findItem(R.id.select_toggle);
|
||||
mSelectToggle.setOnMenuItemClickListener(item -> {
|
||||
if (checkedIds.size() == episodes.size()) {
|
||||
@ -140,22 +169,21 @@ public class EpisodesApplyActionFragment extends Fragment {
|
||||
|
||||
@Override
|
||||
public void onPrepareOptionsMenu (Menu menu) {
|
||||
/*
|
||||
* Prepare icon for select toggle button
|
||||
*/
|
||||
// Prepare icon for select toggle button
|
||||
|
||||
// Find icon attribute
|
||||
int[] icon = new int[1];
|
||||
if(checkedIds.size() == episodes.size()) icon[0] = R.attr.ic_check_box;
|
||||
else if(checkedIds.size() == 0) icon[0] = R.attr.ic_check_box_outline;
|
||||
else icon[0] = R.attr.ic_indeterminate_check_box;
|
||||
if (checkedIds.size() == episodes.size()) {
|
||||
icon[0] = R.attr.ic_check_box;
|
||||
} else if (checkedIds.size() == 0) {
|
||||
icon[0] = R.attr.ic_check_box_outline;
|
||||
} else {
|
||||
icon[0] = R.attr.ic_indeterminate_check_box;
|
||||
}
|
||||
|
||||
// Get Drawable from attribute
|
||||
TypedArray a = getActivity().obtainStyledAttributes(icon);
|
||||
Drawable iconDrawable = a.getDrawable(0);
|
||||
a.recycle();
|
||||
|
||||
// Set icon
|
||||
mSelectToggle.setIcon(iconDrawable);
|
||||
}
|
||||
|
||||
@ -189,6 +217,14 @@ public class EpisodesApplyActionFragment extends Fragment {
|
||||
checkDownloaded(false);
|
||||
resId = R.string.selected_not_downloaded_label;
|
||||
break;
|
||||
case R.id.check_queued:
|
||||
checkQueued(true);
|
||||
resId = R.string.selected_queued_label;
|
||||
break;
|
||||
case R.id.check_not_queued:
|
||||
checkQueued(false);
|
||||
resId = R.string.selected_not_queued_label;
|
||||
break;
|
||||
case R.id.sort_title_a_z:
|
||||
sortByTitle(false);
|
||||
return true;
|
||||
@ -310,6 +346,17 @@ public class EpisodesApplyActionFragment extends Fragment {
|
||||
refreshCheckboxes();
|
||||
}
|
||||
|
||||
private void checkQueued(boolean isQueued) {
|
||||
for (FeedItem episode : episodes) {
|
||||
if(episode.isTagged(FeedItem.TAG_QUEUE) == isQueued) {
|
||||
checkedIds.add(episode.getId());
|
||||
} else {
|
||||
checkedIds.remove(episode.getId());
|
||||
}
|
||||
}
|
||||
refreshCheckboxes();
|
||||
}
|
||||
|
||||
private void refreshTitles() {
|
||||
titles.clear();
|
||||
for(FeedItem episode : episodes) {
|
||||
|
@ -1,12 +1,20 @@
|
||||
package de.danoeh.antennapod.fragment;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.res.TypedArray;
|
||||
import android.graphics.Color;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.ListFragment;
|
||||
import android.util.Log;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuInflater;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.widget.ListView;
|
||||
|
||||
import com.joanzapata.iconify.IconDrawable;
|
||||
import com.joanzapata.iconify.fonts.FontAwesomeIcons;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import de.danoeh.antennapod.R;
|
||||
@ -14,8 +22,10 @@ import de.danoeh.antennapod.activity.MainActivity;
|
||||
import de.danoeh.antennapod.adapter.DownloadedEpisodesListAdapter;
|
||||
import de.danoeh.antennapod.core.feed.EventDistributor;
|
||||
import de.danoeh.antennapod.core.feed.FeedItem;
|
||||
import de.danoeh.antennapod.core.preferences.UserPreferences;
|
||||
import de.danoeh.antennapod.core.storage.DBReader;
|
||||
import de.danoeh.antennapod.core.storage.DBWriter;
|
||||
import de.danoeh.antennapod.dialog.EpisodesApplyActionFragment;
|
||||
import rx.Observable;
|
||||
import rx.Subscription;
|
||||
import rx.android.schedulers.AndroidSchedulers;
|
||||
@ -28,22 +38,21 @@ public class CompletedDownloadsFragment extends ListFragment {
|
||||
|
||||
private static final String TAG = CompletedDownloadsFragment.class.getSimpleName();
|
||||
|
||||
private static final int EVENTS =
|
||||
EventDistributor.DOWNLOAD_HANDLED |
|
||||
EventDistributor.DOWNLOADLOG_UPDATE |
|
||||
EventDistributor.UNREAD_ITEMS_UPDATE;
|
||||
private static final int EVENTS = EventDistributor.DOWNLOAD_HANDLED |
|
||||
EventDistributor.DOWNLOADLOG_UPDATE |
|
||||
EventDistributor.UNREAD_ITEMS_UPDATE;
|
||||
|
||||
private List<FeedItem> items;
|
||||
private DownloadedEpisodesListAdapter listAdapter;
|
||||
|
||||
private boolean viewCreated = false;
|
||||
private boolean itemsLoaded = false;
|
||||
|
||||
private Subscription subscription;
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setHasOptionsMenu(true);
|
||||
loadItems();
|
||||
}
|
||||
|
||||
@ -81,9 +90,9 @@ public class CompletedDownloadsFragment extends ListFragment {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAttach(Activity activity) {
|
||||
super.onAttach(activity);
|
||||
if (viewCreated && itemsLoaded) {
|
||||
public void onAttach(Context context) {
|
||||
super.onAttach(context);
|
||||
if (viewCreated && items != null) {
|
||||
onFragmentLoaded();
|
||||
}
|
||||
}
|
||||
@ -99,7 +108,7 @@ public class CompletedDownloadsFragment extends ListFragment {
|
||||
lv.setPadding(0, vertPadding, 0, vertPadding);
|
||||
|
||||
viewCreated = true;
|
||||
if (itemsLoaded && getActivity() != null) {
|
||||
if (items != null && getActivity() != null) {
|
||||
onFragmentLoaded();
|
||||
}
|
||||
}
|
||||
@ -111,7 +120,6 @@ public class CompletedDownloadsFragment extends ListFragment {
|
||||
if (item != null) {
|
||||
((MainActivity) getActivity()).loadChildFragment(ItemFragment.newInstance(item.getId()));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void onFragmentLoaded() {
|
||||
@ -121,6 +129,43 @@ public class CompletedDownloadsFragment extends ListFragment {
|
||||
}
|
||||
setListShown(true);
|
||||
listAdapter.notifyDataSetChanged();
|
||||
getActivity().supportInvalidateOptionsMenu();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
|
||||
if(!isAdded()) {
|
||||
return;
|
||||
}
|
||||
super.onCreateOptionsMenu(menu, inflater);
|
||||
if(items != null) {
|
||||
inflater.inflate(R.menu.downloads_completed, menu);
|
||||
MenuItem episodeActions = menu.findItem(R.id.episode_actions);
|
||||
if(items.size() > 0) {
|
||||
int[] attrs = {R.attr.action_bar_icon_color};
|
||||
TypedArray ta = getActivity().obtainStyledAttributes(UserPreferences.getTheme(), attrs);
|
||||
int textColor = ta.getColor(0, Color.GRAY);
|
||||
ta.recycle();
|
||||
episodeActions.setIcon(new IconDrawable(getActivity(),
|
||||
FontAwesomeIcons.fa_gears).color(textColor).actionBarSize());
|
||||
episodeActions.setVisible(true);
|
||||
} else {
|
||||
episodeActions.setVisible(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
switch (item.getItemId()) {
|
||||
case R.id.episode_actions:
|
||||
EpisodesApplyActionFragment fragment = EpisodesApplyActionFragment
|
||||
.newInstance(items, EpisodesApplyActionFragment.ACTION_REMOVE);
|
||||
((MainActivity) getActivity()).loadChildFragment(fragment);
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private DownloadedEpisodesListAdapter.ItemAccess itemAccess = new DownloadedEpisodesListAdapter.ItemAccess() {
|
||||
@ -157,7 +202,7 @@ public class CompletedDownloadsFragment extends ListFragment {
|
||||
if(subscription != null) {
|
||||
subscription.unsubscribe();
|
||||
}
|
||||
if (!itemsLoaded && viewCreated) {
|
||||
if (items == null && viewCreated) {
|
||||
setListShown(false);
|
||||
}
|
||||
subscription = Observable.fromCallable(() -> DBReader.getDownloadedItems())
|
||||
@ -166,7 +211,6 @@ public class CompletedDownloadsFragment extends ListFragment {
|
||||
.subscribe(result -> {
|
||||
if (result != null) {
|
||||
items = result;
|
||||
itemsLoaded = true;
|
||||
if (viewCreated && getActivity() != null) {
|
||||
onFragmentLoaded();
|
||||
}
|
||||
|
@ -252,8 +252,8 @@ public class ItemlistFragment extends ListFragment {
|
||||
if (!FeedMenuHandler.onOptionsItemClicked(getActivity(), item, feed)) {
|
||||
switch (item.getItemId()) {
|
||||
case R.id.episode_actions:
|
||||
EpisodesApplyActionFragment fragment = new EpisodesApplyActionFragment();
|
||||
fragment.setEpisodes(feed.getItems());
|
||||
EpisodesApplyActionFragment fragment = EpisodesApplyActionFragment
|
||||
.newInstance(feed.getItems());
|
||||
((MainActivity)getActivity()).loadChildFragment(fragment);
|
||||
return true;
|
||||
case R.id.remove_item:
|
||||
|
@ -22,7 +22,7 @@
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_height="@dimen/thumbnail_length_downloaded_item"
|
||||
android:layout_marginLeft="@dimen/listitem_threeline_textleftpadding"
|
||||
android:layout_marginRight="@dimen/listitem_threeline_textrightpadding"
|
||||
android:layout_marginTop="@dimen/listitem_threeline_verticalpadding"
|
||||
@ -48,7 +48,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_below="@id/txtvTitle"
|
||||
android:layout_alignParentBottom="true"
|
||||
tools:text="23 MB"
|
||||
tools:background="@android:color/holo_green_dark" />
|
||||
|
||||
@ -58,10 +58,23 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_below="@id/txtvTitle"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginLeft="8dp"
|
||||
tools:text="Jan 23"
|
||||
tools:background="@android:color/holo_green_dark" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imgvInPlaylist"
|
||||
android:layout_width="@dimen/enc_icons_size"
|
||||
android:layout_height="@dimen/enc_icons_size"
|
||||
android:layout_toLeftOf="@id/txtvPublished"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:contentDescription="@string/in_queue_label"
|
||||
android:src="?attr/stat_playlist"
|
||||
android:visibility="visible"
|
||||
tools:src="@drawable/ic_list_white_24dp"
|
||||
tools:background="@android:color/holo_red_light" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<include layout="@layout/vertical_list_divider"/>
|
||||
|
@ -1,16 +1,16 @@
|
||||
<RelativeLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/bottomBar"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="68dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:padding="4dp">
|
||||
|
||||
<Button
|
||||
@ -18,103 +18,98 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:background="@android:color/transparent"
|
||||
android:drawableTop="?attr/content_new"
|
||||
android:text="@string/add_to_queue_label"
|
||||
android:textSize="10sp"
|
||||
android:background="@android:color/transparent"/>
|
||||
android:textSize="10sp" />
|
||||
|
||||
<View xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="4dp"
|
||||
android:background="?android:attr/listDivider"
|
||||
tools:background="@android:color/holo_red_dark" />
|
||||
<View
|
||||
android:id="@+id/divider1"
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="4dp"
|
||||
android:background="?android:attr/listDivider"
|
||||
tools:background="@android:color/holo_red_dark" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnMarkAsPlayed"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:background="@android:color/transparent"
|
||||
android:drawableTop="?attr/navigation_accept"
|
||||
android:text="@string/mark_read_label"
|
||||
android:textSize="10sp"
|
||||
android:background="@android:color/transparent"/>
|
||||
android:textSize="10sp" />
|
||||
|
||||
<View xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="4dp"
|
||||
android:background="?android:attr/listDivider"
|
||||
tools:background="@android:color/holo_red_dark" />
|
||||
<View
|
||||
android:id="@+id/divider2"
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="4dp"
|
||||
android:background="?android:attr/listDivider"
|
||||
tools:background="@android:color/holo_red_dark" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnMarkAsUnplayed"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:background="@android:color/transparent"
|
||||
android:drawableTop="?attr/navigation_cancel"
|
||||
android:text="@string/mark_unread_label"
|
||||
android:textSize="10sp"
|
||||
android:background="@android:color/transparent"/>
|
||||
android:textSize="10sp" />
|
||||
|
||||
<View xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="4dp"
|
||||
android:background="?android:attr/listDivider"
|
||||
tools:background="@android:color/holo_red_dark" />
|
||||
<View
|
||||
android:id="@+id/divider3"
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="4dp"
|
||||
android:background="?android:attr/listDivider"
|
||||
tools:background="@android:color/holo_red_dark" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnDownload"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:background="@android:color/transparent"
|
||||
android:drawableTop="?attr/av_download"
|
||||
android:text="@string/download_label"
|
||||
android:textSize="10sp"
|
||||
android:background="@android:color/transparent"/>
|
||||
android:textSize="10sp" />
|
||||
|
||||
<View xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="4dp"
|
||||
android:background="?android:attr/listDivider"
|
||||
tools:background="@android:color/holo_red_dark" />
|
||||
<View
|
||||
android:id="@+id/divider4"
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="4dp"
|
||||
android:background="?android:attr/listDivider"
|
||||
tools:background="@android:color/holo_red_dark" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnDelete"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:background="@android:color/transparent"
|
||||
android:drawableTop="?attr/content_discard"
|
||||
android:text="@string/remove_episode_lable"
|
||||
android:textSize="10sp"
|
||||
android:background="@android:color/transparent"/>
|
||||
android:textSize="10sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/divider"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="?android:attr/listDivider"
|
||||
android:paddingBottom="4dp"
|
||||
android:layout_above="@id/bottomBar"
|
||||
tools:background="@android:color/holo_red_dark" />
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_above="@id/bottomBar"
|
||||
android:background="?android:attr/listDivider"
|
||||
android:paddingBottom="4dp"
|
||||
tools:background="@android:color/holo_red_dark" />
|
||||
|
||||
<ListView
|
||||
android:id="@android:id/list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_above="@id/divider">
|
||||
|
||||
</ListView>
|
||||
|
||||
android:layout_above="@id/divider"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
13
app/src/main/res/menu/downloads_completed.xml
Normal file
13
app/src/main/res/menu/downloads_completed.xml
Normal file
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:custom="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<item
|
||||
android:id="@+id/episode_actions"
|
||||
android:menuCategory="container"
|
||||
android:title="@string/episode_actions"
|
||||
custom:showAsAction="always">
|
||||
</item>
|
||||
|
||||
</menu>
|
@ -42,6 +42,10 @@
|
||||
android:title="@string/downloaded_label"/>
|
||||
<item android:id="@+id/check_not_downloaded"
|
||||
android:title="@string/not_downloaded_label"/>
|
||||
<item android:id="@+id/check_queued"
|
||||
android:title="@string/queued_label"/>
|
||||
<item android:id="@+id/check_not_queued"
|
||||
android:title="@string/not_queued_label"/>
|
||||
</menu>
|
||||
</item>
|
||||
|
||||
|
@ -561,6 +561,10 @@
|
||||
<string name="selected_downloaded_label">Selected downloaded Episodes</string>
|
||||
<string name="not_downloaded_label">Not downloaded</string>
|
||||
<string name="selected_not_downloaded_label">Selected not downloaded Episodes</string>
|
||||
<string name="queued_label">Queued</string>
|
||||
<string name="selected_queued_label">Selected queued Episodes</string>
|
||||
<string name="not_queued_label">Not queued</string>
|
||||
<string name="selected_not_queued_label">Selected not queued Episodes</string>
|
||||
<string name="sort_title"><b>Sort by…</b></string>
|
||||
<string name="sort_title_a_z">Title (A \u2192 Z)</string>
|
||||
<string name="sort_title_z_a">Title (Z \u2192 A)</string>
|
||||
|
Loading…
x
Reference in New Issue
Block a user