java - How to add a scrollbar in a EditText dynamically/programmatically in Android? -
i know how adda scrollbar through xml properties such there bar in right side of edittext field once write stuff in making setsingleline(false).
my question :-
is there way same through activity , is, dynamically? eg:-
code :-
public class abc extends activity { edittext edit = (edittext)findviewbyid(r.id.edittext1); edit.setverticalscrollbarenabled(true); edit.isverticalscrollbarenabled(); } these 2 not work. when add these , still not able see scrollbar on rightside of edittext when scroll..
through xml, when add :- android:scrollbars="vertical" , able see scrollbar..
i asking working way through activity dynamically or in other words programatically
please urgent. sincerely thankful.
in xml
android:fadescrollbars="false" dynamically/programatically:
edit.setscrollbarfadingenabled(false);
Comments
Post a Comment