Can you make an EditText input from right to left?

后端 未结 10 1174
天命终不由人
天命终不由人 2020-12-20 11:52

I was wondering if you can control input on an EditText to move from right to left? The EditText would have to support insert/delete etc. from right to left as well. Is th

10条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-20 12:35

    try this code

    //initialize
    EditText userName = (EditText)findViewById(R.id.userName);
    
    //set gravity for userName 
    userName.setGravity(Gravity.RIGHT);
    

提交回复
热议问题