More and less if the texview is bigger than max count lines

Hello,
I would like to ask how can I change my code.
`listOfTexts.Add (eventText);
listOfTexts.Add (quoteText);
listOfTexts.Add (wordText);
listOfTexts.Add (articleText);
listOfTexts.Add (thoughtText);

        foreach (var tv in listOfTexts) {

            Java.Lang.Runnable mUpdateGeneration = new Java.Lang.Runnable(() =>
                {
                    if(tv.LineCount > MAX_LINE){
                        myButton = new Button(this);
                        myButton.Text = "more..." + tv.Id;
                        tv.SetMaxLines(tv.LineCount);
                        //RelativeLayout.LayoutParams textParams = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WrapContent, RelativeLayout.LayoutParams.WrapContent);

                        //textParams.AddRule(LayoutRules.Below,tv.Id);
                        myButton.Click += (object sender, EventArgs e) => {
                                myButton.Text = "less...";

                        };

                        //myButton.LayoutParameters = textParams;
                        mainLayout.AddView(myButton);
                    }
                });

            tv.Post (mUpdateGeneration);`

I want to do something like https://www.dropbox.com/lightbox/home

Thank you

Sign In or Register to comment.