summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/src/main/java/de/danoeh/antennapod/PodcastApp.java2
-rw-r--r--app/src/main/java/de/danoeh/antennapod/fragment/ItemFragment.java225
-rw-r--r--app/src/main/java/de/danoeh/antennapod/fragment/ItemlistFragment.java56
-rw-r--r--app/src/main/res/layout/feeditem_fragment.xml127
-rw-r--r--app/src/main/res/layout/feeditem_fragment_header.xml136
5 files changed, 248 insertions, 298 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/PodcastApp.java b/app/src/main/java/de/danoeh/antennapod/PodcastApp.java
index 835f43f40..c1d4bc4fd 100644
--- a/app/src/main/java/de/danoeh/antennapod/PodcastApp.java
+++ b/app/src/main/java/de/danoeh/antennapod/PodcastApp.java
@@ -6,6 +6,7 @@ import android.os.StrictMode;
import com.joanzapata.iconify.Iconify;
import com.joanzapata.iconify.fonts.FontAwesomeModule;
+import com.joanzapata.iconify.fonts.MaterialModule;
import de.danoeh.antennapod.core.feed.EventDistributor;
import de.danoeh.antennapod.core.preferences.PlaybackPreferences;
@@ -62,6 +63,7 @@ public class PodcastApp extends Application {
NetworkUtils.init(this);
EventDistributor.getInstance();
Iconify.with(new FontAwesomeModule());
+ Iconify.with(new MaterialModule());
SPAUtil.sendSPAppsQueryFeedsIntent(this);
}
diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/ItemFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/ItemFragment.java
index 10d56d5cf..58cd6c40a 100644
--- a/app/src/main/java/de/danoeh/antennapod/fragment/ItemFragment.java
+++ b/app/src/main/java/de/danoeh/antennapod/fragment/ItemFragment.java
@@ -4,35 +4,33 @@ import android.annotation.TargetApi;
import android.content.ClipData;
import android.content.Context;
import android.content.Intent;
-import android.content.res.TypedArray;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v4.util.Pair;
-import android.support.v7.widget.PopupMenu;
-import android.support.v7.widget.Toolbar;
import android.text.TextUtils;
import android.text.format.DateUtils;
import android.util.Log;
import android.view.ContextMenu;
import android.view.LayoutInflater;
import android.view.Menu;
+import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
-import android.widget.Button;
-import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.ProgressBar;
import android.widget.TextView;
import android.widget.Toast;
import com.bumptech.glide.Glide;
+import com.joanzapata.iconify.Iconify;
+import com.joanzapata.iconify.widget.IconButton;
import org.apache.commons.lang3.ArrayUtils;
@@ -101,7 +99,6 @@ public class ItemFragment extends Fragment {
private List<Downloader> downloaderList;
private ViewGroup root;
- private View header;
private WebView webvDescription;
private TextView txtvTitle;
private TextView txtvDuration;
@@ -109,10 +106,9 @@ public class ItemFragment extends Fragment {
private ImageView imgvCover;
private ProgressBar progbarDownload;
private ProgressBar progbarLoading;
- private Button butAction1;
- private Button butAction2;
- private ImageButton butMore;
- private PopupMenu popupMenu;
+ private IconButton butAction1;
+ private IconButton butAction2;
+ private Menu popupMenu;
private Subscription subscription;
@@ -125,7 +121,7 @@ public class ItemFragment extends Fragment {
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setRetainInstance(true);
- setHasOptionsMenu(false);
+ setHasOptionsMenu(true);
itemID = getArguments().getLong(ARG_FEEDITEM, -1);
}
@@ -134,15 +130,12 @@ public class ItemFragment extends Fragment {
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
super.onCreateView(inflater, container, savedInstanceState);
- ((MainActivity) getActivity()).getSupportActionBar().setTitle("");
- Toolbar toolbar = ((MainActivity) getActivity()).getToolbar();
View layout = inflater.inflate(R.layout.feeditem_fragment, container, false);
- header = inflater.inflate(R.layout.feeditem_fragment_header, toolbar, false);
root = (ViewGroup) layout.findViewById(R.id.content_root);
- txtvTitle = (TextView) header.findViewById(R.id.txtvTitle);
- txtvDuration = (TextView) header.findViewById(R.id.txtvDuration);
- txtvPublished = (TextView) header.findViewById(R.id.txtvPublished);
+ txtvTitle = (TextView) layout.findViewById(R.id.txtvTitle);
+ txtvDuration = (TextView) layout.findViewById(R.id.txtvDuration);
+ txtvPublished = (TextView) layout.findViewById(R.id.txtvPublished);
if (Build.VERSION.SDK_INT >= 14) { // ellipsize is causing problems on old versions, see #448
txtvTitle.setEllipsize(TextUtils.TruncateAt.END);
}
@@ -172,81 +165,43 @@ public class ItemFragment extends Fragment {
});
registerForContextMenu(webvDescription);
- imgvCover = (ImageView) header.findViewById(R.id.imgvCover);
- progbarDownload = (ProgressBar) header.findViewById(R.id.progbarDownload);
+ imgvCover = (ImageView) layout.findViewById(R.id.imgvCover);
+ progbarDownload = (ProgressBar) layout.findViewById(R.id.progbarDownload);
progbarLoading = (ProgressBar) layout.findViewById(R.id.progbarLoading);
- butAction1 = (Button) header.findViewById(R.id.butAction1);
- butAction2 = (Button) header.findViewById(R.id.butAction2);
- butMore = (ImageButton) header.findViewById(R.id.butMoreActions);
- popupMenu = new PopupMenu(getActivity(), butMore);
-
- butAction1.setOnClickListener(new View.OnClickListener() {
- DefaultActionButtonCallback actionButtonCallback = new DefaultActionButtonCallback(getActivity());
-
- @Override
-
- public void onClick(View v) {
- if (item == null) {
- return;
- }
- actionButtonCallback.onActionButtonPressed(item);
- FeedMedia media = item.getMedia();
- if (media != null && media.isDownloaded()) {
- // playback was started, dialog should close itself
- ((MainActivity) getActivity()).dismissChildFragment();
- }
- }
- }
- );
+ butAction1 = (IconButton) layout.findViewById(R.id.butAction1);
+ butAction2 = (IconButton) layout.findViewById(R.id.butAction2);
- butAction2.setOnClickListener(v -> {
- if (item == null) {
- return;
- }
-
- if (item.hasMedia()) {
- FeedMedia media = item.getMedia();
- if (!media.isDownloaded()) {
- DBTasks.playMedia(getActivity(), media, true, true, true);
- ((MainActivity) getActivity()).dismissChildFragment();
- } else {
- DBWriter.deleteFeedMediaOfItem(getActivity(), media.getId());
- }
- } else if (item.getLink() != null) {
- Uri uri = Uri.parse(item.getLink());
- getActivity().startActivity(new Intent(Intent.ACTION_VIEW, uri));
- }
+ butAction1.setOnClickListener(v -> {
+ if (item == null) {
+ return;
}
- );
-
- butMore.setOnClickListener(v -> {
- if (item == null) {
- return;
- }
- popupMenu.getMenu().clear();
- popupMenu.inflate(R.menu.feeditem_options);
- if (item.hasMedia()) {
- FeedItemMenuHandler.onPrepareMenu(getActivity(), popupMenuInterface, item, true, queue);
- } else {
- // these are already available via button1 and button2
- FeedItemMenuHandler.onPrepareMenu(getActivity(), popupMenuInterface, item, true, queue,
- R.id.mark_read_item, R.id.visit_website_item);
- }
- popupMenu.show();
+ DefaultActionButtonCallback actionButtonCallback = new DefaultActionButtonCallback(getActivity());
+ actionButtonCallback.onActionButtonPressed(item);
+ FeedMedia media = item.getMedia();
+ if (media != null && media.isDownloaded()) {
+ // playback was started, dialog should close itself
+ ((MainActivity) getActivity()).dismissChildFragment();
}
- );
+ });
- popupMenu.setOnMenuItemClickListener(menuItem -> {
+ butAction2.setOnClickListener(v -> {
+ if (item == null) {
+ return;
+ }
- try {
- return FeedItemMenuHandler.onMenuItemClicked(getActivity(), menuItem.getItemId(), item);
- } catch (DownloadRequestException e) {
- e.printStackTrace();
- Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_LONG).show();
- return true;
+ if (item.hasMedia()) {
+ FeedMedia media = item.getMedia();
+ if (!media.isDownloaded()) {
+ DBTasks.playMedia(getActivity(), media, true, true, true);
+ ((MainActivity) getActivity()).dismissChildFragment();
+ } else {
+ DBWriter.deleteFeedMediaOfItem(getActivity(), media.getId());
}
+ } else if (item.getLink() != null) {
+ Uri uri = Uri.parse(item.getLink());
+ getActivity().startActivity(new Intent(Intent.ACTION_VIEW, uri));
}
- );
+ });
return layout;
}
@@ -254,8 +209,6 @@ public class ItemFragment extends Fragment {
@Override
public void onActivityCreated(@Nullable Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
- Toolbar toolbar = ((MainActivity) getActivity()).getToolbar();
- toolbar.addView(header);
load();
}
@@ -279,7 +232,6 @@ public class ItemFragment extends Fragment {
@Override
public void onDestroyView() {
super.onDestroyView();
- resetViewState();
if(subscription != null) {
subscription.unsubscribe();
}
@@ -289,15 +241,37 @@ public class ItemFragment extends Fragment {
}
}
- private void resetViewState() {
- Toolbar toolbar = ((MainActivity) getActivity()).getToolbar();
- toolbar.removeView(header);
+ @Override
+ public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
+ if(item == null) {
+ return;
+ }
+ inflater.inflate(R.menu.feeditem_options, menu);
+ popupMenu = menu;
+ if (item.hasMedia()) {
+ FeedItemMenuHandler.onPrepareMenu(getActivity(), popupMenuInterface, item, true, queue);
+ } else {
+ // these are already available via button1 and button2
+ FeedItemMenuHandler.onPrepareMenu(getActivity(), popupMenuInterface, item, true, queue,
+ R.id.mark_read_item, R.id.visit_website_item);
+ }
+ }
+
+ @Override
+ public boolean onOptionsItemSelected(MenuItem menuItem) {
+ try {
+ return FeedItemMenuHandler.onMenuItemClicked(getActivity(), menuItem.getItemId(), item);
+ } catch (DownloadRequestException e) {
+ e.printStackTrace();
+ Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_LONG).show();
+ return true;
+ }
}
private final FeedItemMenuHandler.MenuInterface popupMenuInterface = new FeedItemMenuHandler.MenuInterface() {
@Override
public void setItemVisibility(int id, boolean visible) {
- MenuItem item = popupMenu.getMenu().findItem(id);
+ MenuItem item = popupMenu.findItem(id);
if (item != null) {
item.setVisible(visible);
}
@@ -319,7 +293,7 @@ public class ItemFragment extends Fragment {
Log.d(TAG, "updateAppearance item is null");
return;
}
-
+ getActivity().supportInvalidateOptionsMenu();
txtvTitle.setText(item.getTitle());
if (item.getPubDate() != null) {
@@ -347,54 +321,55 @@ public class ItemFragment extends Fragment {
}
FeedMedia media = item.getMedia();
+ String butAction1Icon = null;
+ int butAction1Text = 0;
+ String butAction2Icon = null;
+ int butAction2Text = 0;
if (media == null) {
- TypedArray drawables = getActivity().obtainStyledAttributes(new int[]{R.attr.navigation_accept,
- R.attr.location_web_site});
-
if (!item.isPlayed()) {
- butAction1.setCompoundDrawablesWithIntrinsicBounds(drawables.getDrawable(0), null, null, null);
- butAction1.setText(getActivity().getString(R.string.mark_read_label));
- butAction1.setVisibility(View.VISIBLE);
- } else {
- butAction1.setVisibility(View.INVISIBLE);
+ butAction1Icon = "{fa-check 24sp}";
+ butAction1Text = R.string.mark_read_label;
}
-
if (item.getLink() != null) {
- butAction2.setCompoundDrawablesWithIntrinsicBounds(drawables.getDrawable(1), null, null, null);
- butAction2.setText(getActivity().getString(R.string.visit_website_label));
- } else {
- butAction2.setEnabled(false);
+ butAction2Icon = "{ma-web 24sp}";
+ butAction2Text = R.string.visit_website_label;
}
-
- drawables.recycle();
- } else {if(media.getDuration() > 0) {
+ } else {
+ if(media.getDuration() > 0) {
txtvDuration.setText(Converter.getDurationStringLong(media.getDuration()));
}
-
boolean isDownloading = DownloadRequester.getInstance().isDownloadingFile(media);
- TypedArray drawables = getActivity().obtainStyledAttributes(new int[]{R.attr.av_play,
- R.attr.av_download, R.attr.action_stream, R.attr.content_discard, R.attr.navigation_cancel});
-
if (!media.isDownloaded()) {
- butAction2.setCompoundDrawablesWithIntrinsicBounds(drawables.getDrawable(2), null, null, null);
- butAction2.setText(getActivity().getString(R.string.stream_label));
+ butAction2Icon = "{md-settings-input-antenna 24sp}";
+ butAction2Text = R.string.stream_label;
} else {
- butAction2.setCompoundDrawablesWithIntrinsicBounds(drawables.getDrawable(3), null, null, null);
- butAction2.setText(getActivity().getString(R.string.remove_episode_lable));
+ butAction2Icon = "{md-delete 24sp}";
+ butAction2Text = R.string.remove_label;
}
-
if (isDownloading) {
- butAction1.setCompoundDrawablesWithIntrinsicBounds(drawables.getDrawable(4), null, null, null);
- butAction1.setText(getActivity().getString(R.string.cancel_download_label));
+ butAction1Icon = "{md-cancel 24sp}";
+ butAction1Text = R.string.cancel_label;
} else if (media.isDownloaded()) {
- butAction1.setCompoundDrawablesWithIntrinsicBounds(drawables.getDrawable(0), null, null, null);
- butAction1.setText(getActivity().getString(R.string.play_label));
+ butAction1Icon = "{md-play-arrow 24sp}";
+ butAction1Text = R.string.play_label;
} else {
- butAction1.setCompoundDrawablesWithIntrinsicBounds(drawables.getDrawable(1), null, null, null);
- butAction1.setText(getActivity().getString(R.string.download_label));
+ butAction1Icon = "{md-file-download 24sp}";
+ butAction1Text = R.string.download_label;
}
-
- drawables.recycle();
+ }
+ if(butAction1Icon != null && butAction1Text != 0) {
+ butAction1.setText(butAction1Icon +"\u0020\u0020" + getActivity().getString(butAction1Text));
+ Iconify.addIcons(butAction1);
+ butAction1.setVisibility(View.VISIBLE);
+ } else {
+ butAction1.setVisibility(View.INVISIBLE);
+ }
+ if(butAction2Icon != null && butAction2Text != 0) {
+ butAction2.setText(butAction2Icon +"\u0020\u0020" + getActivity().getString(butAction2Text));
+ Iconify.addIcons(butAction2);
+ butAction2.setVisibility(View.VISIBLE);
+ } else {
+ butAction2.setVisibility(View.INVISIBLE);
}
}
diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/ItemlistFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/ItemlistFragment.java
index fbe2274a3..1a40b3532 100644
--- a/app/src/main/java/de/danoeh/antennapod/fragment/ItemlistFragment.java
+++ b/app/src/main/java/de/danoeh/antennapod/fragment/ItemlistFragment.java
@@ -12,7 +12,6 @@ import android.os.Bundle;
import android.support.v4.app.ListFragment;
import android.support.v4.util.Pair;
import android.support.v4.view.MenuItemCompat;
-import android.support.v7.app.ActionBarActivity;
import android.support.v7.widget.SearchView;
import android.util.Log;
import android.view.ContextMenu;
@@ -153,26 +152,19 @@ public class ItemlistFragment extends ListFragment {
}
@Override
- public void onStop() {
- super.onStop();
- EventDistributor.getInstance().unregister(contentUpdate);
- EventBus.getDefault().unregister(this);
- if(subscription != null) {
- subscription.unsubscribe();
- }
- }
-
- @Override
public void onResume() {
super.onResume();
Log.d(TAG, "onResume()");
+ ((MainActivity)getActivity()).getSupportActionBar().setTitle("");
updateProgressBarVisibility();
loadItems();
}
@Override
- public void onDetach() {
- super.onDetach();
+ public void onPause() {
+ super.onPause();
+ EventDistributor.getInstance().unregister(contentUpdate);
+ EventBus.getDefault().unregister(this);
if(subscription != null) {
subscription.unsubscribe();
}
@@ -368,7 +360,6 @@ public class ItemlistFragment extends ListFragment {
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
- ((ActionBarActivity) getActivity()).getSupportActionBar().setTitle("");
registerForContextMenu(getListView());
@@ -382,7 +373,9 @@ public class ItemlistFragment extends ListFragment {
public void onListItemClick(ListView l, View v, int position, long id) {
FeedItem selection = adapter.getItem(position - l.getHeaderViewsCount());
if (selection != null) {
- ((MainActivity) getActivity()).loadChildFragment(ItemFragment.newInstance(selection.getId()));
+ MainActivity activity = (MainActivity) getActivity();
+ activity.loadChildFragment(ItemFragment.newInstance(selection.getId()));
+ activity.getSupportActionBar().setTitle(feed.getTitle());
}
}
@@ -547,15 +540,12 @@ public class ItemlistFragment extends ListFragment {
.dontAnimate()
.into(imgvCover);
- butShowInfo.setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- if (viewsCreated && itemsLoaded) {
- Intent startIntent = new Intent(getActivity(), FeedInfoActivity.class);
- startIntent.putExtra(FeedInfoActivity.EXTRA_FEED_ID,
- feed.getId());
- startActivity(startIntent);
- }
+ butShowInfo.setOnClickListener(v -> {
+ if (viewsCreated && itemsLoaded) {
+ Intent startIntent = new Intent(getActivity(), FeedInfoActivity.class);
+ startIntent.putExtra(FeedInfoActivity.EXTRA_FEED_ID,
+ feed.getId());
+ startActivity(startIntent);
}
});
}
@@ -573,16 +563,13 @@ public class ItemlistFragment extends ListFragment {
View header = inflater.inflate(R.layout.more_content_list_footer, lv, false);
lv.addFooterView(header);
listFooter = new MoreContentListFooterUtil(header);
- listFooter.setClickListener(new MoreContentListFooterUtil.Listener() {
- @Override
- public void onClick() {
- if (feed != null) {
- try {
- DBTasks.loadNextPageOfFeed(getActivity(), feed, false);
- } catch (DownloadRequestException e) {
- e.printStackTrace();
- DownloadRequestErrorDialogCreator.newRequestErrorDialog(getActivity(), e.getMessage());
- }
+ listFooter.setClickListener(() -> {
+ if (feed != null) {
+ try {
+ DBTasks.loadNextPageOfFeed(getActivity(), feed, false);
+ } catch (DownloadRequestException e) {
+ e.printStackTrace();
+ DownloadRequestErrorDialogCreator.newRequestErrorDialog(getActivity(), e.getMessage());
}
}
});
@@ -629,7 +616,6 @@ public class ItemlistFragment extends ListFragment {
if(subscription != null) {
subscription.unsubscribe();
}
-
subscription = Observable.fromCallable(() -> loadData())
.subscribeOn(Schedulers.newThread())
.observeOn(AndroidSchedulers.mainThread())
diff --git a/app/src/main/res/layout/feeditem_fragment.xml b/app/src/main/res/layout/feeditem_fragment.xml
index 5e1b580d2..78b47a74c 100644
--- a/app/src/main/res/layout/feeditem_fragment.xml
+++ b/app/src/main/res/layout/feeditem_fragment.xml
@@ -1,13 +1,136 @@
<?xml version="1.0" encoding="utf-8"?>
-<FrameLayout 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:id="@+id/content_root"
android:layout_width="match_parent"
android:layout_height="match_parent">
+ <LinearLayout
+ android:id="@+id/header"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_horizontal"
+ android:background="?attr/colorPrimary"
+ android:gravity="center_horizontal"
+ android:orientation="vertical"
+ tools:background="@android:color/darker_gray">
+
+ <RelativeLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_horizontal"
+ android:orientation="horizontal"
+ android:layout_marginTop="16dp"
+ android:layout_marginLeft="16dp"
+ android:layout_marginRight="16dp">
+
+ <ImageView
+ android:id="@+id/imgvCover"
+ android:layout_width="50dp"
+ android:layout_height="50dp"
+ android:layout_gravity="center_vertical"
+ android:contentDescription="@string/cover_label"
+ android:gravity="center_vertical"
+ tools:src="@drawable/ic_stat_antenna_default"
+ tools:background="@android:color/holo_green_dark" />
+
+ <TextView
+ android:id="@+id/txtvPublished"
+ style="@style/AntennaPod.TextView.ListItemSecondaryTitle"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentTop="true"
+ android:layout_alignParentRight="true"
+ android:layout_marginLeft="8dp"
+ tools:text="Jan\n23"
+ tools:background="@android:color/holo_green_dark"
+ android:layout_below="@+id/txtvTitle"/>
+
+ <TextView
+ android:id="@+id/txtvTitle"
+ style="@style/TextAppearance.AppCompat.Widget.ActionBar.Title"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignTop="@id/imgvCover"
+ android:layout_marginLeft="16dp"
+ android:layout_toLeftOf="@id/txtvPublished"
+ android:layout_toRightOf="@id/imgvCover"
+ android:includeFontPadding="false"
+ android:maxLines="5"
+ tools:text="Podcast title"
+ tools:background="@android:color/holo_green_dark" />
+
+ <TextView
+ android:id="@+id/txtvDuration"
+ style="@style/AntennaPod.TextView.ListItemSecondaryTitle"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_toRightOf="@id/imgvCover"
+ android:layout_below="@id/txtvTitle"
+ android:layout_marginLeft="16dp"
+ tools:text="00:42:23"
+ tools:background="@android:color/holo_green_dark"/>
+
+ </RelativeLayout>
+
+ <ProgressBar
+ android:id="@+id/progbarDownload"
+ style="?android:attr/progressBarStyleHorizontal"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="8dp"
+ android:layout_marginLeft="16dp"
+ android:layout_marginRight="16dp"
+ android:visibility="gone" />
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginLeft="16dp"
+ android:layout_marginRight="16dp"
+ android:layout_marginBottom="8dp"
+ android:orientation="horizontal"
+ tools:background="@android:color/holo_blue_bright">
+
+ <com.joanzapata.iconify.widget.IconButton
+ android:id="@+id/butAction1"
+ android:layout_width="0dp"
+ android:layout_height="48dp"
+ android:layout_gravity="center_vertical"
+ android:layout_marginRight="8dp"
+ android:layout_weight="1"
+ android:background="?attr/selectableItemBackground"
+ android:ellipsize="end"
+ android:gravity="center"
+ android:textColor="?android:attr/textColorPrimary"
+ android:textSize="@dimen/text_size_small"
+ tools:text="Button 1"
+ tools:background="@android:color/holo_red_light" />
+
+ <com.joanzapata.iconify.widget.IconButton
+ android:id="@+id/butAction2"
+ android:layout_width="0dp"
+ android:layout_height="48dp"
+ android:layout_gravity="center_vertical"
+ android:layout_marginLeft="8dp"
+ android:layout_weight="1"
+ android:background="?attr/selectableItemBackground"
+ android:ellipsize="end"
+ android:gravity="center"
+ android:textColor="?android:attr/textColorPrimary"
+ android:textSize="@dimen/text_size_small"
+ tools:text="Button 2"
+ tools:background="@android:color/holo_orange_dark" />
+
+ </LinearLayout>
+
+ </LinearLayout>
<WebView
android:id="@+id/webvDescription"
android:layout_width="match_parent"
+ android:layout_below="@id/header"
android:layout_height="match_parent"
android:foreground="?android:windowContentOverlay" />
@@ -22,4 +145,4 @@
android:layout_gravity="center"
android:indeterminate="true" />
</FrameLayout>
-</FrameLayout> \ No newline at end of file
+</RelativeLayout> \ No newline at end of file
diff --git a/app/src/main/res/layout/feeditem_fragment_header.xml b/app/src/main/res/layout/feeditem_fragment_header.xml
deleted file mode 100644
index 2534dddbe..000000000
--- a/app/src/main/res/layout/feeditem_fragment_header.xml
+++ /dev/null
@@ -1,136 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:id="@+id/header"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_gravity="center_horizontal"
- android:background="?attr/colorPrimary"
- android:gravity="center_horizontal"
- android:orientation="vertical"
- tools:background="@android:color/darker_gray">
-
-
- <RelativeLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_gravity="center_horizontal"
- android:orientation="horizontal"
- android:paddingBottom="0dp">
-
- <ImageView
- android:id="@+id/imgvCover"
- android:layout_width="50dp"
- android:layout_height="50dp"
- android:layout_gravity="center_vertical"
- android:layout_marginBottom="8dp"
- android:layout_marginTop="16dp"
- android:contentDescription="@string/cover_label"
- android:gravity="center_vertical"
- tools:src="@drawable/ic_stat_antenna_default"
- tools:background="@android:color/holo_green_dark" />
-
-
- <ImageButton
- android:id="@+id/butMoreActions"
- android:layout_width="48dp"
- android:layout_height="48dp"
- android:layout_alignParentRight="true"
- android:layout_alignParentTop="true"
- android:background="?attr/selectableItemBackground"
- android:contentDescription="@string/butAction_label"
- android:paddingTop="4dp"
- android:src="?attr/ic_action_overflow"
- tools:src="@drawable/ic_info_white_24dp"
- tools:background="@android:color/holo_green_dark" />
-
- <TextView
- android:id="@+id/txtvTitle"
- style="@style/TextAppearance.AppCompat.Widget.ActionBar.Title"
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_centerVertical="true"
- android:layout_marginBottom="8dp"
- android:layout_marginLeft="16dp"
- android:layout_marginRight="8dp"
- android:layout_marginTop="16dp"
- android:layout_toLeftOf="@id/butMoreActions"
- android:layout_toRightOf="@id/imgvCover"
- android:maxLines="5"
- tools:text="Podcast title"
- tools:background="@android:color/holo_green_dark" />
-
- <TextView
- android:id="@+id/txtvDuration"
- style="@style/AntennaPod.TextView.ListItemSecondaryTitle"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_toRightOf="@id/imgvCover"
- android:layout_below="@id/txtvTitle"
- android:layout_marginLeft="16dp"
- tools:text="00:42:23"
- tools:background="@android:color/holo_green_dark"/>
-
- <TextView
- android:id="@+id/txtvPublished"
- style="@style/AntennaPod.TextView.ListItemSecondaryTitle"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_toLeftOf="@id/butMoreActions"
- android:layout_marginRight="8dp"
- tools:text="Jan 23"
- tools:background="@android:color/holo_green_dark"
- android:layout_below="@+id/txtvTitle"/>
-
- </RelativeLayout>
-
- <ProgressBar
- android:id="@+id/progbarDownload"
- style="?android:attr/progressBarStyleHorizontal"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginLeft="16dp"
- android:layout_marginRight="16dp"
- android:visibility="invisible" />
-
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="?attr/actionBarSize"
- android:layout_marginRight="8dp"
- android:orientation="horizontal"
- tools:background="@android:color/holo_blue_bright">
-
- <Button
- android:id="@+id/butAction1"
- android:layout_width="0dp"
- android:layout_height="48dp"
- android:layout_gravity="center_vertical"
- android:layout_marginRight="8dp"
- android:layout_weight="1"
- android:background="?attr/selectableItemBackground"
- android:ellipsize="end"
- android:paddingTop="4dp"
- android:textColor="?android:attr/textColorPrimary"
- android:textSize="@dimen/text_size_small"
- tools:text="Button 1"
- tools:background="@android:color/holo_red_light" />
-
- <Button
- android:id="@+id/butAction2"
- android:layout_width="0dp"
- android:layout_height="48dp"
- android:layout_gravity="center_vertical"
- android:layout_marginLeft="8dp"
- android:layout_weight="1"
- android:background="?attr/selectableItemBackground"
- android:ellipsize="end"
- android:paddingTop="4dp"
- android:textColor="?android:attr/textColorPrimary"
- android:textSize="@dimen/text_size_small"
- tools:text="Button 2"
- tools:background="@android:color/holo_orange_dark" />
-
- </LinearLayout>
-
-
-</LinearLayout> \ No newline at end of file