From b503614f4dde0d6602f0b0869bc4cb523c025f8c Mon Sep 17 00:00:00 2001 From: twig Date: Thu, 2 Jun 2016 19:38:01 +1000 Subject: [PATCH] - hide search view - added background task downloadRemoteRssItem() --- .../core/gui/remoterss/RemoteRssFragment.java | 8 ++++++- .../main/res/layout/activity_remoterss.xml | 22 +++++++++---------- 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/app/src/main/java/org/transdroid/core/gui/remoterss/RemoteRssFragment.java b/app/src/main/java/org/transdroid/core/gui/remoterss/RemoteRssFragment.java index 65379ab9..303bc027 100644 --- a/app/src/main/java/org/transdroid/core/gui/remoterss/RemoteRssFragment.java +++ b/app/src/main/java/org/transdroid/core/gui/remoterss/RemoteRssFragment.java @@ -27,6 +27,7 @@ import com.nispok.snackbar.Snackbar; import com.nispok.snackbar.SnackbarManager; import org.androidannotations.annotations.AfterViews; +import org.androidannotations.annotations.Background; import org.androidannotations.annotations.Bean; import org.androidannotations.annotations.EFragment; import org.androidannotations.annotations.InstanceState; @@ -113,8 +114,13 @@ public class RemoteRssFragment extends Fragment { @ItemClick(resName = "torrents_list") protected void detailsListClicked(int position) { - RemoteRssActivity activity = (RemoteRssActivity) getActivity(); RemoteRssItem item = (RemoteRssItem) adapter.getItem(position); + downloadRemoteRssItem(item); + } + + @Background + protected void downloadRemoteRssItem(RemoteRssItem item) { + RemoteRssActivity activity = (RemoteRssActivity) getActivity(); IDaemonAdapter currentConnection = activity.getCurrentConnection(); DaemonTaskResult result; diff --git a/app/src/main/res/layout/activity_remoterss.xml b/app/src/main/res/layout/activity_remoterss.xml index 2f0be10f..57949829 100644 --- a/app/src/main/res/layout/activity_remoterss.xml +++ b/app/src/main/res/layout/activity_remoterss.xml @@ -74,17 +74,17 @@ android:divider="@null" tools:listitem="@layout/list_item_filter" /> - + + + + + + + + + + +