Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Dynamically change the width of a textView in a custom ListView

$
0
0

Hello.

In a Xamarin.Android project, I use a custom ListView that represents a table. I can dynamically change the background color of each cell like this:

private void UpdateSpotListExemple1 (Color textColor, View view, int textViewId)
{
view.FindViewById(textViewId).SetBackgroundColor(textColor);
}

So I can dynamically change the color of an entire column in the same way.

But if I do this how can I dynamically change the width of a column? Make it disappear? This doesn't work:

private void UpdateSpotListExemple2(View view, int textViewId)
{
view.FindViewById(textViewId).SetWidth(0);
}

How can I do ?


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>