how to use getlinecount() in textview android

前端 未结 6 1734
忘掉有多难
忘掉有多难 2021-01-12 02:03

i want to know how many line in my text view. i already set mytextview text, then i want to get how many line it take in mytextview.

i use mytextview.getLineCount()

6条回答
  •  被撕碎了的回忆
    2021-01-12 02:28

    public int getLineCount ()

    Since: API Level 1

    Return the number of lines of text, or returns 0 if the internal Layout has not been built.

提交回复
热议问题