I've a ListView that can have 0 custom items inside (like "My Downloads").
Is there anyway to show a default text "No download yet" ?
Thanks !
EDIT : here is my solution,
TextView emptyView = new TextView(getApplicationContext());
emptyView.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
emptyView.setTextColor(R.color.black);
emptyView.setText(R.string.no_purchased_item);
emptyView.setTextSize(20);
emptyView.setVisibility(View.GONE);
emptyView.setGravity(Gravity.CENTER_VERTICAL | Gravity.CENTER_HORIZONTAL);
((ViewGroup)getListView().getParent()).addView(emptyView);
getListView().setEmptyView(emptyView);
