Reputation: 1347
I'd like to use an EditText for an URL entry, along with a WebView. When the user press "enter", and so start loading the URL, I'd like to shift the EditText content to the left in order to hide the "http://" from the visible text part.
I didn't managed to use "setSelection" for that.
Any help ?
Upvotes: 1
Views: 386
Reputation: 6332
There is no way of moving the content that far to the left in an EditText. You might be able to achieve that by overlapping an EditText with a transparent background over a readOnly EditText, and then set a negative left margin for the editable EditText, but you'd be better off just stripping the "http://" part of the string manually.
Upvotes: 2