Fixed debug mode scroll

This commit is contained in:
M66B 2022-04-16 17:59:31 +02:00
parent d2283c5e58
commit 3d38ea79ca
1 changed files with 9 additions and 1 deletions

View File

@ -125,6 +125,8 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
private SwitchCompat swCleanupAttachments; private SwitchCompat swCleanupAttachments;
private Button btnCleanup; private Button btnCleanup;
private TextView tvLastCleanup; private TextView tvLastCleanup;
private CardView cardAdvanced;
private SwitchCompat swProtocol; private SwitchCompat swProtocol;
private SwitchCompat swLogInfo; private SwitchCompat swLogInfo;
private SwitchCompat swDebug; private SwitchCompat swDebug;
@ -292,6 +294,8 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
swCleanupAttachments = view.findViewById(R.id.swCleanupAttachments); swCleanupAttachments = view.findViewById(R.id.swCleanupAttachments);
btnCleanup = view.findViewById(R.id.btnCleanup); btnCleanup = view.findViewById(R.id.btnCleanup);
tvLastCleanup = view.findViewById(R.id.tvLastCleanup); tvLastCleanup = view.findViewById(R.id.tvLastCleanup);
cardAdvanced = view.findViewById(R.id.cardAdvanced);
swProtocol = view.findViewById(R.id.swProtocol); swProtocol = view.findViewById(R.id.swProtocol);
swLogInfo = view.findViewById(R.id.swLogInfo); swLogInfo = view.findViewById(R.id.swLogInfo);
swDebug = view.findViewById(R.id.swDebug); swDebug = view.findViewById(R.id.swDebug);
@ -719,7 +723,11 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
view.post(new Runnable() { view.post(new Runnable() {
@Override @Override
public void run() { public void run() {
view.scrollTo(0, swDebug.getTop()); try {
view.scrollTo(0, cardAdvanced.getTop() + swDebug.getTop());
} catch (Throwable ex) {
Log.e(ex);
}
} }
}); });
} }