59 lines
1.9 KiB
Java
59 lines
1.9 KiB
Java
package com.ubt.jimu.community.view;
|
|
|
|
import android.os.Bundle;
|
|
import android.view.MotionEvent;
|
|
import android.view.View;
|
|
import android.widget.ImageView;
|
|
import android.widget.ProgressBar;
|
|
import android.widget.TextView;
|
|
import android.widget.VideoView;
|
|
import butterknife.ButterKnife;
|
|
import com.ubt.jimu.BaseActivity;
|
|
import com.ubt.jimu.R;
|
|
import com.ubt.jimu.utils.LogUtils;
|
|
|
|
/* loaded from: classes.dex */
|
|
public class VideoActivity extends BaseActivity {
|
|
private float a;
|
|
private float b;
|
|
ImageView imgPlay;
|
|
ProgressBar pbPlay;
|
|
TextView tvVideoDesc;
|
|
VideoView vvPreview;
|
|
|
|
private void bindClick() {
|
|
this.vvPreview.setOnTouchListener(new View.OnTouchListener() { // from class: com.ubt.jimu.community.view.d0
|
|
@Override // android.view.View.OnTouchListener
|
|
public final boolean onTouch(View view, MotionEvent motionEvent) {
|
|
return VideoActivity.this.a(view, motionEvent);
|
|
}
|
|
});
|
|
}
|
|
|
|
public /* synthetic */ boolean a(View view, MotionEvent motionEvent) {
|
|
int action = motionEvent.getAction();
|
|
if (action == 0) {
|
|
this.a = motionEvent.getY();
|
|
} else if (action == 1) {
|
|
this.b = motionEvent.getY();
|
|
LogUtils.c("y2=========" + this.b + "y1======" + this.a);
|
|
if (this.b - this.a > 60.0f) {
|
|
finish();
|
|
}
|
|
}
|
|
return true;
|
|
}
|
|
|
|
@Override // com.ubt.jimu.BaseActivity, com.ubt.jimu.ScreenRotationManageActivity, androidx.appcompat.app.AppCompatActivity, androidx.fragment.app.FragmentActivity, androidx.core.app.ComponentActivity, android.app.Activity
|
|
protected void onCreate(Bundle bundle) {
|
|
super.onCreate(bundle);
|
|
setContentView(R.layout.activity_video_preview_new);
|
|
ButterKnife.a(this);
|
|
bindClick();
|
|
}
|
|
|
|
@Override // com.ubt.jimu.BaseActivity
|
|
public void relayout() {
|
|
}
|
|
}
|