Put cursor to end when set keyword
This commit is contained in:
1 parent
9c11ffde3c
commit
6986a84cf6
2 files changed
+5
No files matched your search
@@ -307,6 +307,7 @@ public final class GalleryListScene extends BaseScene
|
||||
// Update search edit text
|
||||
if (!TextUtils.isEmpty(keyword) && null != mSearchBar) {
|
||||
mSearchBar.setText(keyword);
|
||||
mSearchBar.cursorToEnd();
|
||||
}
|
||||
|
||||
// Update title
|
||||
|
||||
@@ -209,6 +209,10 @@ public class SearchBar extends FrameLayout implements View.OnClickListener,
|
||||
return mEditText.getText().toString();
|
||||
}
|
||||
|
||||
public void cursorToEnd() {
|
||||
mEditText.setSelection(mEditText.getText().length());
|
||||
}
|
||||
|
||||
public void setTitle(String title) {
|
||||
mTitleTextView.setText(title);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user