|
|
|
|
@ -2,10 +2,12 @@ package com.github.tvbox.osc.ui.activity; |
|
|
|
|
|
|
|
|
|
import android.content.DialogInterface; |
|
|
|
|
import android.content.Intent; |
|
|
|
|
import android.graphics.Rect; |
|
|
|
|
import android.os.Bundle; |
|
|
|
|
import android.text.Html; |
|
|
|
|
import android.text.TextUtils; |
|
|
|
|
import android.view.KeyEvent; |
|
|
|
|
import android.view.MotionEvent; |
|
|
|
|
import android.view.View; |
|
|
|
|
import android.view.ViewGroup; |
|
|
|
|
import android.widget.FrameLayout; |
|
|
|
|
@ -463,15 +465,15 @@ public class DetailActivity extends BaseActivity { |
|
|
|
|
if (event.obj instanceof Integer) { |
|
|
|
|
int index = (int) event.obj; |
|
|
|
|
// if (index != vodInfo.playIndex) {
|
|
|
|
|
seriesAdapter.getData().get(vodInfo.playIndex).selected = false; |
|
|
|
|
seriesAdapter.notifyItemChanged(vodInfo.playIndex); |
|
|
|
|
seriesAdapter.getData().get(index).selected = true; |
|
|
|
|
seriesAdapter.notifyItemChanged(index); |
|
|
|
|
mGridView.setSelection(index); |
|
|
|
|
vodInfo.playIndex = index; |
|
|
|
|
//保存历史
|
|
|
|
|
insertVod(sourceKey, vodInfo); |
|
|
|
|
// }
|
|
|
|
|
seriesAdapter.getData().get(vodInfo.playIndex).selected = false; |
|
|
|
|
seriesAdapter.notifyItemChanged(vodInfo.playIndex); |
|
|
|
|
seriesAdapter.getData().get(index).selected = true; |
|
|
|
|
seriesAdapter.notifyItemChanged(index); |
|
|
|
|
mGridView.setSelection(index); |
|
|
|
|
vodInfo.playIndex = index; |
|
|
|
|
//保存历史
|
|
|
|
|
insertVod(sourceKey, vodInfo); |
|
|
|
|
// }
|
|
|
|
|
} else if (event.obj instanceof JSONObject) { |
|
|
|
|
vodInfo.playerCfg = ((JSONObject) event.obj).toString(); |
|
|
|
|
//保存历史
|
|
|
|
|
@ -658,6 +660,18 @@ public class DetailActivity extends BaseActivity { |
|
|
|
|
return super.dispatchKeyEvent(event); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public boolean dispatchTouchEvent(MotionEvent ev) { |
|
|
|
|
if (showPreview && !fullWindows) { |
|
|
|
|
Rect editTextRect = new Rect(); |
|
|
|
|
llPlayerFragmentContainerBlock.getHitRect(editTextRect); |
|
|
|
|
if (editTextRect.contains((int) ev.getX(), (int) ev.getY())) { |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return super.dispatchTouchEvent(ev); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// preview
|
|
|
|
|
boolean showPreview = true; // true 开启 false 关闭
|
|
|
|
|
boolean fullWindows = false; |
|
|
|
|
|