mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-24 07:01:05 +00:00
Post focus
This commit is contained in:
parent
decf811114
commit
53535d68a3
1 changed files with 10 additions and 2 deletions
|
@ -1227,8 +1227,16 @@ public class FragmentMessages extends FragmentBase
|
|||
RecyclerView.ViewHolder vh = rvMessage.findViewHolderForAdapterPosition(positionStart);
|
||||
if (vh == null && positionStart > 0)
|
||||
vh = rvMessage.findViewHolderForAdapterPosition(positionStart - 1);
|
||||
if (vh != null)
|
||||
vh.itemView.requestFocus();
|
||||
if (vh == null)
|
||||
return;
|
||||
|
||||
View v = vh.itemView;
|
||||
rvMessage.post(new RunnableEx("focus") {
|
||||
@Override
|
||||
protected void delegate() {
|
||||
v.requestFocus();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue