mirror of
https://github.com/ClaytonWWilson/Listify.git
synced 2025-12-16 02:38:47 +00:00
Message is displayed when shopping list is empty
This commit is contained in:
parent
a68ff731bb
commit
f573f9ff2c
@ -234,7 +234,12 @@ public class ListPage extends AppCompatActivity implements Requestor.Receiver {
|
||||
|
||||
if(list != null) {
|
||||
for (ListEntry entry : list.getEntries()) {
|
||||
//emptyMessage.setVisibility(View.GONE);
|
||||
this.runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
emptyMessage.setVisibility(View.GONE);
|
||||
}
|
||||
});
|
||||
int product = entry.getProductID();
|
||||
SynchronousReceiver<Item> pr = new SynchronousReceiver<>();
|
||||
requestor.getObject(Integer.toString(product), Item.class, pr, pr);
|
||||
@ -465,7 +470,7 @@ public class ListPage extends AppCompatActivity implements Requestor.Receiver {
|
||||
}
|
||||
|
||||
if(pNames.isEmpty()) {
|
||||
//emptyMessage.setVisibility(View.VISIBLE);
|
||||
emptyMessage.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
myAdapter.notifyDataSetChanged();
|
||||
|
||||
@ -58,8 +58,7 @@
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:textSize="20sp"
|
||||
android:text="This list is empty."
|
||||
android:visibility="gone"/>
|
||||
android:text="This list is empty."/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user