summaryrefslogtreecommitdiff
path: root/app/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main')
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/base/views/MainButton.java29
1 files changed, 0 insertions, 29 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/base/views/MainButton.java b/app/src/main/java/se/leap/bitmaskclient/base/views/MainButton.java
index 1a8fa09b..b12f2b00 100644
--- a/app/src/main/java/se/leap/bitmaskclient/base/views/MainButton.java
+++ b/app/src/main/java/se/leap/bitmaskclient/base/views/MainButton.java
@@ -5,9 +5,7 @@ import android.content.Context;
import android.graphics.PorterDuff;
import android.graphics.drawable.AnimationDrawable;
import android.util.AttributeSet;
-import android.util.Log;
import android.view.LayoutInflater;
-import android.view.MotionEvent;
import android.view.View;
import android.view.animation.AlphaAnimation;
import android.view.animation.Animation;
@@ -18,29 +16,21 @@ import androidx.annotation.DrawableRes;
import androidx.appcompat.widget.AppCompatImageView;
import androidx.core.content.ContextCompat;
-import java.lang.ref.WeakReference;
-
import se.leap.bitmaskclient.R;
public class MainButton extends RelativeLayout {
private static final String TAG = MainButton.class.getSimpleName();
- interface MainButtonListener {
- void onButtonClicked();
- }
-
AppCompatImageView glow;
AppCompatImageView shadowLight;
AnimationDrawable glowAnimation;
- WeakReference<MainButtonListener> callback;
private boolean isOn = false;
private boolean isProcessing = false;
private boolean isError = true;
-
public MainButton(Context context) {
super(context);
initLayout(context);
@@ -63,10 +53,6 @@ public class MainButton extends RelativeLayout {
initLayout(context);
}
- public void setMainButtonListener(MainButtonListener callback) {
- this.callback = new WeakReference<>(callback);
- }
-
private void initLayout(Context context) {
LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View rootview = inflater.inflate(R.layout.v_main_btn, this, true);
@@ -74,21 +60,6 @@ public class MainButton extends RelativeLayout {
glow = rootview.findViewById(R.id.vpn_btn_glow);
glowAnimation = (AnimationDrawable) glow.getBackground();
shadowLight = rootview.findViewById(R.id.vpn_btn_shadow_light);
-
- rootview.setOnGenericMotionListener(new OnGenericMotionListener() {
- @Override
- public boolean onGenericMotion(View v, MotionEvent event) {
- switch (event.getAction()) {
- case MotionEvent.ACTION_BUTTON_PRESS:
- Log.d(TAG, "onbuttonPrees");
- break;
- case MotionEvent.ACTION_BUTTON_RELEASE:
- Log.d(TAG, "onButtonRelease");
- break;
- }
- return false;
- }
- });
}