I managed to solve it. Apparently, I was using wrong regular expression. I
just needed to check for "\n". Thanks though.

On Sun, Aug 5, 2012 at 9:58 AM, Farhan Tariq <[email protected]> wrote:

> MaxLines won't work. Like I said, I need to count number of line breaks
> (equal to "\n", return, newlines etc). MaxLines  just returns  the number
> of lines a piece of text takes! I could have a long sentence that would
> take up 5 lines, but no line break, and maxLines would return me 5, but
> desired number would be 1. Hope that clears my point.
>
>
> On Sun, Aug 5, 2012 at 9:46 AM, TreKing <[email protected]> wrote:
>
>> On Sat, Aug 4, 2012 at 10:57 PM, Farhan Tariq <[email protected]>wrote:
>>
>>> Any suggestion/help on how to limit editText to 4 new lines?
>>
>>
>>
>> http://developer.android.com/reference/android/R.styleable.html#TextView_maxLines
>>
>>
>>> I need it urgently,
>>>
>>
>> Come on now.
>>
>>
>> -------------------------------------------------------------------------------------------------
>> TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
>> transit tracking app for Android-powered devices
>>
>>  --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to [email protected]
>> To unsubscribe from this group, send email to
>> [email protected]
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>
>
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to