resolved compilation problem and got rid of the 'no items' label

This commit is contained in:
Tom Hennen 2015-10-10 19:29:32 -04:00
parent 89bbc88826
commit f9ef32fff2
5 changed files with 5 additions and 54 deletions

View File

@ -21,6 +21,7 @@ import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AbsListView;
import android.widget.AdapterView;
import android.widget.ProgressBar;
import android.widget.TextView;
@ -76,7 +77,6 @@ public class AllEpisodesFragment extends Fragment {
private String prefName;
protected RecyclerView listView;
private AllEpisodesRecycleAdapter listAdapter;
private TextView txtvEmpty;
private ProgressBar progLoading;
private List<FeedItem> episodes;
@ -291,14 +291,10 @@ public class AllEpisodesFragment extends Fragment {
layoutManager = new LinearLayoutManager(getActivity());
listView.setLayoutManager(layoutManager);
txtvEmpty = (TextView) root.findViewById(android.R.id.empty);
progLoading = (ProgressBar) root.findViewById(R.id.progLoading);
//registerForContextMenu(listView);
if (!itemsLoaded) {
progLoading.setVisibility(View.VISIBLE);
txtvEmpty.setVisibility(View.GONE);
}
viewsCreated = true;
@ -395,7 +391,6 @@ public class AllEpisodesFragment extends Fragment {
}
if (viewsCreated && !itemsLoaded) {
listView.setVisibility(View.GONE);
txtvEmpty.setVisibility(View.GONE);
progLoading.setVisibility(View.VISIBLE);
}
subscription = Observable.defer(() -> Observable.just(loadData()))

View File

@ -119,10 +119,7 @@ public class FavoriteEpisodesFragment extends AllEpisodesFragment {
}
@Override
protected Pair<List<FeedItem>,LongList> loadData() {
List<FeedItem> items;
items = DBReader.getFavoriteItemsList();
LongList queuedIds = DBReader.getQueueIDList();
return Pair.create(items, queuedIds);
protected List<FeedItem> loadData() {
return DBReader.getFavoriteItemsList();
}
}

View File

@ -125,11 +125,8 @@ public class NewEpisodesFragment extends AllEpisodesFragment {
}
@Override
protected Pair<List<FeedItem>,LongList> loadData() {
List<FeedItem> items;
items = DBReader.getNewItemsList();
LongList queuedIds = DBReader.getQueueIDList();
return Pair.create(items, queuedIds);
protected List<FeedItem> loadData() {
return DBReader.getNewItemsList();
}
}

View File

@ -15,36 +15,6 @@
android:paddingTop="@dimen/list_vertical_padding"
android:paddingBottom="@dimen/list_vertical_padding"
android:clipToPadding="false"/>
<!--
<com.mobeta.android.dslv.DragSortListView
android:id="@android:id/list"
android:scrollbarStyle="outsideOverlay"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingTop="@dimen/list_vertical_padding"
android:paddingBottom="@dimen/list_vertical_padding"
android:clipToPadding="false"
dslv:collapsed_height="2dp"
dslv:drag_enabled="false"
dslv:drag_scroll_start="0.33"
dslv:float_alpha="0.6"
dslv:max_drag_scroll_speed="0.5"
dslv:remove_enabled="true"
dslv:remove_mode="flingRemove"
dslv:slide_shuffle_speed="0.3"
dslv:sort_enabled="false"
dslv:track_drag_sort="false"
dslv:float_background_color="?attr/dragview_float_background"
dslv:use_default_controller="true"
tools:background="@android:color/holo_green_dark"/>
-->
<TextView
android:id="@id/android:empty"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:gravity="center"
android:text="@string/no_items_label"/>
<ProgressBar
android:id="@+id/progLoading"

View File

@ -39,14 +39,6 @@
tools:background="@android:color/holo_green_dark"/>
-->
<TextView
android:id="@id/android:empty"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:gravity="center"
android:text="@string/no_items_label"/>
<ProgressBar
android:id="@+id/progLoading"
android:layout_width="wrap_content"