I have a linear layout with two textView. First textView has weight 40 and second 60. How I can change this weights in code in activity? This is possible? I want klick on the button and first weight should be 70 and second 30.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you are importing an XML layout and you are not creating your layout dynamically, you can grab it like this:
otherwise it is just like this
The last parameter is the weight.