android - How to remove ems from TextView programatically? -


having textview in layout xml ems width 8,

<textview    android:id="@+id/more"    android:ems="8"    android:layout_width="wrap_content"    android:layout_height="wrap_content"    android:background="@color/popup_grey"    android:drawableleft="@drawable/dot_small"    android:text="@string/get_more" /> 

i need remove ems textview dynamically on condition. tried view.setems(0), shrinks textview width 0.

is there piece of code remove it?

thanks in advance.

you can try this:

view.setems(0) @ sametime put width of textview match_parent? way won't shrink textview

hope helps gud luck


Comments

Popular posts from this blog

java - Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved -

Round ImageView Android -

How can I utilize Yahoo Weather API in android -