mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-19 05:38:31 +00:00
Add classic configuration to wizard button
This commit is contained in:
parent
0958c9f349
commit
65b63104fd
2 changed files with 31 additions and 7 deletions
|
@ -133,13 +133,17 @@ public class FragmentBase extends Fragment {
|
|||
scroll.post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Rect rect = new Rect();
|
||||
child.getDrawingRect(rect);
|
||||
scroll.offsetDescendantRectToMyCoords(child, rect);
|
||||
int y = rect.top - scroll.getPaddingTop() + dy;
|
||||
if (y < 0)
|
||||
y = 0;
|
||||
scroll.scrollTo(0, y);
|
||||
try {
|
||||
Rect rect = new Rect();
|
||||
child.getDrawingRect(rect);
|
||||
scroll.offsetDescendantRectToMyCoords(child, rect);
|
||||
int y = rect.top - scroll.getPaddingTop() + dy;
|
||||
if (y < 0)
|
||||
y = 0;
|
||||
scroll.scrollTo(0, y);
|
||||
} catch (Throwable ex) {
|
||||
Log.e(ex);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -212,6 +212,10 @@ public class FragmentSetup extends FragmentBase {
|
|||
menu.add(Menu.NONE, R.string.title_setup_other, order++, R.string.title_setup_other)
|
||||
.setIcon(R.drawable.twotone_auto_fix_high_24);
|
||||
|
||||
menu.add(Menu.NONE, R.string.title_setup_classic, order++, R.string.title_setup_classic)
|
||||
.setIcon(R.drawable.twotone_settings_24)
|
||||
.setVisible(BuildConfig.DEBUG);
|
||||
|
||||
SpannableString ss = new SpannableString(getString(R.string.title_setup_pop3));
|
||||
ss.setSpan(new RelativeSizeSpan(0.9f), 0, ss.length(), 0);
|
||||
menu.add(Menu.NONE, R.string.title_setup_pop3, order++, ss);
|
||||
|
@ -247,6 +251,22 @@ public class FragmentSetup extends FragmentBase {
|
|||
} else if (itemId == R.string.title_setup_other) {
|
||||
lbm.sendBroadcast(new Intent(ActivitySetup.ACTION_QUICK_SETUP));
|
||||
return true;
|
||||
} else if (itemId == R.string.title_setup_classic) {
|
||||
ibManual.setPressed(true);
|
||||
ibManual.setPressed(false);
|
||||
manual = true;
|
||||
updateManual();
|
||||
view.post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
scrollTo(R.id.ibManual, 0);
|
||||
} catch (Throwable ex) {
|
||||
Log.e(ex);
|
||||
}
|
||||
}
|
||||
});
|
||||
return true;
|
||||
} else if (itemId == R.string.title_setup_pop3) {
|
||||
lbm.sendBroadcast(new Intent(ActivitySetup.ACTION_QUICK_POP3));
|
||||
return true;
|
||||
|
|
Loading…
Reference in a new issue