mirror of https://github.com/M66B/FairEmail.git
Auto expand list selection
This commit is contained in:
parent
5156aeba85
commit
a0f86be19a
|
@ -207,11 +207,14 @@ public class StyleHelper {
|
||||||
int dp6 = Helper.dp2pixels(context, 6);
|
int dp6 = Helper.dp2pixels(context, 6);
|
||||||
float textSize = Helper.getTextSize(context, 0);
|
float textSize = Helper.getTextSize(context, 0);
|
||||||
|
|
||||||
|
int end = e;
|
||||||
|
if (e > 1 && e + 1 < t.length() && t.charAt(e - 1) != '\n' && t.charAt(e) == '\n')
|
||||||
|
end++;
|
||||||
|
|
||||||
int i = s;
|
int i = s;
|
||||||
int j = s + 1;
|
int j = s + 1;
|
||||||
int index = 1;
|
int index = 1;
|
||||||
while (j < e) {
|
while (j < end) {
|
||||||
if (i > 0 && t.charAt(i - 1) == '\n' && t.charAt(j) == '\n') {
|
if (i > 0 && t.charAt(i - 1) == '\n' && t.charAt(j) == '\n') {
|
||||||
if (item.getItemId() == R.id.menu_style_list_bullets)
|
if (item.getItemId() == R.id.menu_style_list_bullets)
|
||||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.P)
|
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.P)
|
||||||
|
@ -227,6 +230,7 @@ public class StyleHelper {
|
||||||
}
|
}
|
||||||
|
|
||||||
etBody.setText(t);
|
etBody.setText(t);
|
||||||
|
etBody.setSelection(s, end);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue