I set my textView to be ellipsezed in xml. Now on click I want it to expend and become not ellipsized.
null){ int lines = l. getLineCount(); if ( lines > 0) if ( l. getEllipsisCount(lines-1) > 0) Log. d(TAG, "Text is ellipsized"); } } });
Android Ellipsize Android TextView ellipsize property Causes words in the text that are longer than the view's width to be ellipsized ( means to shorten text using an ellipsis, i.e. three dots …) instead of broken in the middle to fit it inside the given view.
TextView tv1 = (TextView)findViewById(R. id. textView1); tv1. setText("Hello"); setContentView(tv1);
You are applying to your TextView a compound Drawable on the right.. to make the three dots appear in this scenario, you have to apply a android:drawablePadding="{something}dp" attribute to the TextView as well. Hope it helps!
Use setEllipsize()
to change the ellipsize behavior of a TextView
. For example, to turn off ellipsize use this:
myTextView.setEllipsize(null);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With