|
|
|
@ -915,28 +915,6 @@ public class FragmentSetup extends FragmentBase {
|
|
|
|
|
boolean setup_welcome = prefs.getBoolean("setup_welcome", true);
|
|
|
|
|
ibWelcome.setImageLevel(setup_welcome ? 0 /* less */ : 1 /* more */);
|
|
|
|
|
grpWelcome.setVisibility(setup_welcome ? View.VISIBLE : View.GONE);
|
|
|
|
|
|
|
|
|
|
ViewGroup vwWelcome = (ViewGroup) ibWelcome.getParent();
|
|
|
|
|
if (vwWelcome == null)
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
vwWelcome.post(new Runnable() {
|
|
|
|
|
@Override
|
|
|
|
|
public void run() {
|
|
|
|
|
try {
|
|
|
|
|
if (!getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.STARTED))
|
|
|
|
|
return;
|
|
|
|
|
Rect rect = new Rect(
|
|
|
|
|
vwWelcome.getLeft(),
|
|
|
|
|
ibWelcome.getTop(),
|
|
|
|
|
vwWelcome.getRight(),
|
|
|
|
|
ibWelcome.getBottom());
|
|
|
|
|
vwWelcome.setTouchDelegate(new TouchDelegate(rect, ibWelcome));
|
|
|
|
|
} catch (Throwable ex) {
|
|
|
|
|
Log.e(ex);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void updateManual() {
|
|
|
|
@ -964,28 +942,6 @@ public class FragmentSetup extends FragmentBase {
|
|
|
|
|
? View.VISIBLE : View.GONE);
|
|
|
|
|
|
|
|
|
|
grpExtra.setVisibility(setup_extra ? View.VISIBLE : View.GONE);
|
|
|
|
|
|
|
|
|
|
ViewGroup vwExtra = (ViewGroup) ibExtra.getParent();
|
|
|
|
|
if (vwExtra == null)
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
vwExtra.post(new Runnable() {
|
|
|
|
|
@Override
|
|
|
|
|
public void run() {
|
|
|
|
|
try {
|
|
|
|
|
if (!getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.STARTED))
|
|
|
|
|
return;
|
|
|
|
|
Rect rect = new Rect(
|
|
|
|
|
vwExtra.getLeft(),
|
|
|
|
|
ibExtra.getTop(),
|
|
|
|
|
vwExtra.getRight(),
|
|
|
|
|
ibExtra.getBottom());
|
|
|
|
|
vwExtra.setTouchDelegate(new TouchDelegate(rect, ibExtra));
|
|
|
|
|
} catch (Throwable ex) {
|
|
|
|
|
Log.e(ex);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void ensureVisible(View child) {
|
|
|
|
|