I have a ListView
with few items. Is it possible to change size of the selected item in the ListView
. For example, I want to expand selected item to show some buttons.
I appreciate you for help in advance.
I have a ListView
with few items. Is it possible to change size of the selected item in the ListView
. For example, I want to expand selected item to show some buttons.
I appreciate you for help in advance.
Set the visibility of these buttons as View.GONE in the items that you don't want it. Whenever you need them set them as View.VISIBLE. By setting them as View.GONE android doesn't include them in any kind of measurement (width or height) and it looks like nothing was supposed to be there.
btn = (Button) findViewById(R.id.btn);
if(condition){
btn.setVisibility(View.VISIBLE);
btn.setText("You can see me!");
} else {
btn.setVisibility(View.GONE);
// btn.setText("Now you can't!");
}