0

I have ListView where every item represented as image + text, defined in separate layout. When user clicks any item, I would like to extend selected item with additional information, so listview would have bigger height and contain some text. What is the best practice to do that? Should I replace listview item view somehow?

1 Answer 1

1

You can use Visibility property by setting it to Invisible, and then change it to Visible when Item is Clicked. note that the information height should be auto and you need to calculate ListView Height with each modification;

Edited Code:

FindViewById<TextView>(Resource.Id.Test).Visibility = Android.Views.ViewStates.Invisible;

Use this code to set the element (ex. TextView) to Invisible or Visible (ViewStates.Visible)

Sign up to request clarification or add additional context in comments.

2 Comments

A. Salim, should I bind isVisible somehow to listitem? Do you have any example or link to example for similar functionality?
Sorry Vladimir, I confused with xamarin.forms, it's not IsVisible but actually Visibility Property that you can set to Invisible in your code, I will update my comment:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.