I am looking for a way to set the maxLine property of a textview based on the length of my string. For example, i have a string in the following format:
String test = "This is a \n \n test"
The above string would have 4 lines and i would like to assign this to the textView.maxLines property of the textview to make sure the textview will be able to display all the lines present in the string. How can i achieve this?