Hide empty message at startup

pull/145/head
Alinson S. Xavier 9 years ago
parent ec0e8ac24c
commit 5d8a348aaf

@ -84,12 +84,6 @@ public class ListHabitsRootView extends BaseRootView
return progressBar; return progressBar;
} }
public boolean getShowArchived()
{
if (listAdapter == null) return false;
return listAdapter.getIncludeArchived();
}
public void setShowArchived(boolean showArchived) public void setShowArchived(boolean showArchived)
{ {
if (listAdapter == null) return; if (listAdapter == null) return;
@ -144,9 +138,6 @@ public class ListHabitsRootView extends BaseRootView
protected void onAttachedToWindow() protected void onAttachedToWindow()
{ {
super.onAttachedToWindow(); super.onAttachedToWindow();
updateEmptyView();
if (listAdapter != null) listAdapter.getObservable().addListener(this); if (listAdapter != null) listAdapter.getObservable().addListener(this);
} }
@ -175,6 +166,7 @@ public class ListHabitsRootView extends BaseRootView
private void updateEmptyView() private void updateEmptyView()
{ {
if (listAdapter == null) return; if (listAdapter == null) return;
llEmpty.setVisibility( llEmpty.setVisibility(
listAdapter.getCount() > 0 ? View.GONE : View.VISIBLE); listAdapter.getCount() > 0 ? View.GONE : View.VISIBLE);
} }

@ -55,7 +55,8 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:gravity="center" android:gravity="center"
android:orientation="vertical"> android:orientation="vertical"
android:visibility="gone">
<TextView <TextView
android:id="@+id/tvStarEmpty" android:id="@+id/tvStarEmpty"

Loading…
Cancel
Save