what-the-bank/sources/com/facetec/sdk/f.java

63 lines
2.0 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.facetec.sdk;
import android.content.Context;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.View;
import android.widget.LinearLayout;
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
/* JADX INFO: Access modifiers changed from: package-private */
/* loaded from: classes.dex */
public final class f extends LinearLayout {
public f(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
setEnabled(false);
}
@Override // android.view.View
public final boolean onTouchEvent(MotionEvent motionEvent) {
super.onTouchEvent(motionEvent);
if (!isEnabled()) {
return false;
}
if (motionEvent.getAction() == 0) {
setAlpha(0.4f);
postInvalidate();
} else if (motionEvent.getAction() == 1 || motionEvent.getAction() == 3 || motionEvent.getX() < BitmapDescriptorFactory.HUE_RED || motionEvent.getX() > getWidth() || motionEvent.getY() < BitmapDescriptorFactory.HUE_RED || motionEvent.getY() > getHeight()) {
setAlpha(1.0f);
postInvalidate();
}
return true;
}
public final void setOnClickRunnable(final Runnable runnable) {
setEnabled(true);
setClickable(true);
setOnClickListener(new View.OnClickListener(this, runnable) { // from class: com.facetec.sdk.f$$ExternalSyntheticLambda0
public final f f$0;
public final Runnable f$1;
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
this.f$0.d(this.f$1, view);
}
{
this.f$0 = this;
this.f$1 = runnable;
}
});
}
/* JADX INFO: Access modifiers changed from: private */
public /* synthetic */ void d(Runnable runnable, View view) {
if (isEnabled()) {
setEnabled(false);
if (runnable != null) {
runnable.run();
}
}
}
}