Removed pull-to-refresh
Causes too much accidental updates
This commit is contained in:
parent
9e1eba29ab
commit
9bdc003a8c
|
@ -6,11 +6,6 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<android.support.v4.widget.SwipeRefreshLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:id="@+id/swipeRefreshLayout">
|
||||
|
||||
<com.mobeta.android.dslv.DragSortListView
|
||||
android:id="@android:id/list"
|
||||
android:scrollbarStyle="outsideOverlay"
|
||||
|
@ -29,8 +24,6 @@
|
|||
dslv:float_background_color="?attr/dragview_float_background"
|
||||
dslv:use_default_controller="true"/>
|
||||
|
||||
</android.support.v4.widget.SwipeRefreshLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@id/android:empty"
|
||||
android:layout_width="match_parent"
|
||||
|
|
|
@ -7,7 +7,6 @@ import android.os.AsyncTask;
|
|||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.support.v4.widget.SwipeRefreshLayout;
|
||||
import android.support.v7.app.ActionBarActivity;
|
||||
import android.support.v7.widget.SearchView;
|
||||
import android.view.*;
|
||||
|
@ -55,7 +54,6 @@ public class NewEpisodesFragment extends Fragment {
|
|||
|
||||
|
||||
private DragSortListView listView;
|
||||
private SwipeRefreshLayout swipeRefreshLayout;
|
||||
private NewEpisodesListAdapter listAdapter;
|
||||
private TextView txtvEmpty;
|
||||
private ProgressBar progLoading;
|
||||
|
@ -202,7 +200,6 @@ public class NewEpisodesFragment extends Fragment {
|
|||
|
||||
View root = inflater.inflate(R.layout.new_episodes_fragment, container, false);
|
||||
|
||||
swipeRefreshLayout = (SwipeRefreshLayout) root.findViewById(R.id.swipeRefreshLayout);
|
||||
listView = (DragSortListView) root.findViewById(android.R.id.list);
|
||||
txtvEmpty = (TextView) root.findViewById(android.R.id.empty);
|
||||
progLoading = (ProgressBar) root.findViewById(R.id.progLoading);
|
||||
|
@ -220,16 +217,6 @@ public class NewEpisodesFragment extends Fragment {
|
|||
});
|
||||
|
||||
final int secondColor = (UserPreferences.getTheme() == R.style.Theme_AntennaPod_Dark) ? R.color.swipe_refresh_secondary_color_dark : R.color.swipe_refresh_secondary_color_light;
|
||||
swipeRefreshLayout.setColorScheme(R.color.bright_blue, secondColor, R.color.bright_blue, secondColor);
|
||||
swipeRefreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
|
||||
@Override
|
||||
public void onRefresh() {
|
||||
List<Feed> feeds = ((MainActivity) getActivity()).getFeeds();
|
||||
if (feeds != null) {
|
||||
DBTasks.refreshAllFeeds(getActivity(), feeds);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
if (!itemsLoaded) {
|
||||
progLoading.setVisibility(View.VISIBLE);
|
||||
|
@ -331,18 +318,9 @@ public class NewEpisodesFragment extends Fragment {
|
|||
if (!viewsCreated) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (DownloadService.isRunning
|
||||
&& DownloadRequester.getInstance().isDownloadingFeeds()) {
|
||||
swipeRefreshLayout.setRefreshing(true);
|
||||
|
||||
} else {
|
||||
swipeRefreshLayout.setRefreshing(false);
|
||||
|
||||
// if case other fragments have set this to true, this fragment should remove the progress indicator
|
||||
((ActionBarActivity) getActivity())
|
||||
.setSupportProgressBarIndeterminateVisibility(false);
|
||||
}
|
||||
((ActionBarActivity) getActivity())
|
||||
.setSupportProgressBarIndeterminateVisibility(DownloadService.isRunning
|
||||
&& DownloadRequester.getInstance().isDownloadingFeeds());
|
||||
}
|
||||
|
||||
private EventDistributor.EventListener contentUpdate = new EventDistributor.EventListener() {
|
||||
|
|
Loading…
Reference in New Issue