I have a problem with the setEmptyView method from a ListView.
Here is my Java code:
ListView view = (ListView)findViewById(R.id.listView1);
view.se
There are some correct solutions, but I think this is the best approach!
View emptyView = getLayoutInflater().inflate(R.layout.empty_list_cart, null);
addContentView(emptyView, listView.getLayoutParams()); // You're using the same params as listView
listView.setEmptyView(emptyView);
listView.setAdapter(adapter);