Forum Xamarin.Android

How can I get a textview which it is above the button

I need to give advice. Can I find out ID of the textview (its above the button). I know ID button. I need to find out ID of the textview in the code (I dont want to use findViewById). Or can i find out children in the layout. I need to set max lines for the textview.

Thank you



  • CheesebaronCheesebaron DKInsider, University mod
    1. Easiest solution is to give the TextView an ID and look for that.
    2. Another solution would be to take the view which both the Button and the TextView are located in, and start by getting the index of the Button. Then potentially if you decremented that index by one would give you the TextView, given that you are using a LinearLayout or similar to hold the views.
Sign In or Register to comment.