rahul.r4 Posted August 12, 2013 Share Posted August 12, 2013 I know how to add a scrollbar through the xml layout properties such that there is a bar in the right side of the Edittext field once we write code in it by making setSingleline(false).My question is :-is there a way to do the same through the activity , that is, dynamically? for eg:-Code is :-public class abc extends Activity{EditText edit = (EditText)findViewById(R.id.EditText1);edit.setVerticalScrollBarEnabled(true);edit.isVerticalScrollBarEnabled();}These two functions does not work. When i add these , i still am not able to see the scrollbar on the rightside of the Edittext when i scroll..Through XML, when we add :- android:scrollbars="vertical" , then we are able to see the scrollbar..I am asking for a WORKING way to do it through the activity dynamically or in other words programatically without adding any code in the layout filePlease its urgent. I would sincerely be thankful. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.