Strange issue with android:ellipsize=“end”

前端 未结 5 2228
野的像风
野的像风 2021-02-20 14:53

I am using android:ellipsize=\"end\" in android xml file, & surprisingly I am not getting the layout that I want, the 3 dots(...) are showing but after that

5条回答
  •  我在风中等你
    2021-02-20 15:28

    i used :

    if (myModel.mDataText().length() > 150) {
        mTextView.setText(Html.fromHtml(myModel.mDataText().substring(0, 150) + "..."));
    } else {
        mTextView.setText(Html.fromHtml(myModel.mDataText() + "..."));
    }
    

提交回复
热议问题