#1 cursorAdapter empty field for no data
carquet opened this issue · 0 comments
carquet commented
if there is no information such as supplier name and phone number.
example :
/**NAME OF THE AUTHOR*/ //Evaluate whether there is a name or not TextView authorView = (TextView) listItemView.findViewById(R.id.author); // Check if a name is provided for this news or not if (currentNews.hasName()) { // If a name is available, display the provided name authorView.setText(currentNews.getmAuthor()); // Make sure the view is visible authorView.setVisibility(View.VISIBLE); } else { // Otherwise hide the ImageView (set visibility to GONE) authorView.setVisibility(View.GONE); }
From Project 6