mirror of
https://github.com/ClaytonWWilson/Listify.git
synced 2025-12-16 10:48:46 +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) {
|
if(list != null) {
|
||||||
for (ListEntry entry : list.getEntries()) {
|
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();
|
int product = entry.getProductID();
|
||||||
SynchronousReceiver<Item> pr = new SynchronousReceiver<>();
|
SynchronousReceiver<Item> pr = new SynchronousReceiver<>();
|
||||||
requestor.getObject(Integer.toString(product), Item.class, pr, pr);
|
requestor.getObject(Integer.toString(product), Item.class, pr, pr);
|
||||||
@ -465,7 +470,7 @@ public class ListPage extends AppCompatActivity implements Requestor.Receiver {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(pNames.isEmpty()) {
|
if(pNames.isEmpty()) {
|
||||||
//emptyMessage.setVisibility(View.VISIBLE);
|
emptyMessage.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
myAdapter.notifyDataSetChanged();
|
myAdapter.notifyDataSetChanged();
|
||||||
|
|||||||
@ -58,8 +58,7 @@
|
|||||||
android:layout_centerHorizontal="true"
|
android:layout_centerHorizontal="true"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:textSize="20sp"
|
android:textSize="20sp"
|
||||||
android:text="This list is empty."
|
android:text="This list is empty."/>
|
||||||
android:visibility="gone"/>
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user