|
|
|
|
@ -155,12 +155,6 @@ public class DetailActivity extends BaseActivity { |
|
|
|
|
getSupportFragmentManager().beginTransaction().show(playFragment).commitAllowingStateLoss(); |
|
|
|
|
tvPlay.setText("全屏"); |
|
|
|
|
} |
|
|
|
|
new Handler().postDelayed(new Runnable() { |
|
|
|
|
@Override |
|
|
|
|
public void run() { |
|
|
|
|
tvPlay.requestFocus(); |
|
|
|
|
} |
|
|
|
|
},500); |
|
|
|
|
tvSort.setOnClickListener(new View.OnClickListener() { |
|
|
|
|
@Override |
|
|
|
|
public void onClick(View v) { |
|
|
|
|
@ -260,7 +254,7 @@ public class DetailActivity extends BaseActivity { |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void onItemPreSelected(TvRecyclerView parent, View itemView, int position) { |
|
|
|
|
seriesSelect = false; |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
@ -278,18 +272,20 @@ public class DetailActivity extends BaseActivity { |
|
|
|
|
public void onItemClick(BaseQuickAdapter adapter, View view, int position) { |
|
|
|
|
FastClickCheckUtil.check(view); |
|
|
|
|
if (vodInfo != null && vodInfo.seriesMap.get(vodInfo.playFlag).size() > 0) { |
|
|
|
|
boolean reload = false; |
|
|
|
|
if (vodInfo.playIndex != position) { |
|
|
|
|
seriesAdapter.getData().get(vodInfo.playIndex).selected = false; |
|
|
|
|
seriesAdapter.notifyItemChanged(vodInfo.playIndex); |
|
|
|
|
seriesAdapter.getData().get(position).selected = true; |
|
|
|
|
seriesAdapter.notifyItemChanged(position); |
|
|
|
|
vodInfo.playIndex = position; |
|
|
|
|
reload = true; |
|
|
|
|
} |
|
|
|
|
seriesAdapter.getData().get(vodInfo.playIndex).selected = true; |
|
|
|
|
seriesAdapter.notifyItemChanged(vodInfo.playIndex); |
|
|
|
|
//选集全屏 想选集不全屏的注释下面一行
|
|
|
|
|
if (showPreview && !fullWindows) toggleFullPreview(); |
|
|
|
|
jumpToPlay(); |
|
|
|
|
if (reload || !showPreview) jumpToPlay(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
@ -686,6 +682,9 @@ public class DetailActivity extends BaseActivity { |
|
|
|
|
boolean fullWindows = false; |
|
|
|
|
ViewGroup.LayoutParams windowsPreview = null; |
|
|
|
|
ViewGroup.LayoutParams windowsFull = null; |
|
|
|
|
ViewGroup playerParent = null; |
|
|
|
|
View playerRoot = null; |
|
|
|
|
ViewGroup llLayoutParent = null; |
|
|
|
|
|
|
|
|
|
void toggleFullPreview() { |
|
|
|
|
if (windowsPreview == null) { |
|
|
|
|
@ -694,8 +693,26 @@ public class DetailActivity extends BaseActivity { |
|
|
|
|
if (windowsFull == null) { |
|
|
|
|
windowsFull = new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT); |
|
|
|
|
} |
|
|
|
|
if (playerRoot == null) |
|
|
|
|
playerRoot = (View) llPlayerFragmentContainer.findViewById(R.id.mVideoView).getParent(); |
|
|
|
|
|
|
|
|
|
if (playerParent == null) { |
|
|
|
|
playerParent = (ViewGroup) playerRoot.getParent(); |
|
|
|
|
} |
|
|
|
|
if (llLayoutParent == null) |
|
|
|
|
llLayoutParent = (ViewGroup) llLayout.getParent(); |
|
|
|
|
|
|
|
|
|
fullWindows = !fullWindows; |
|
|
|
|
llPlayerFragmentContainer.setLayoutParams(fullWindows ? windowsFull : windowsPreview); |
|
|
|
|
// llPlayerFragmentContainer.setLayoutParams(fullWindows ? windowsFull : windowsPreview);
|
|
|
|
|
llPlayerFragmentContainerBlock.setVisibility(fullWindows ? View.GONE : View.VISIBLE); |
|
|
|
|
if (fullWindows) { |
|
|
|
|
playerParent.removeView(playerRoot); |
|
|
|
|
((ViewGroup) getWindow().getDecorView()).addView(playerRoot); |
|
|
|
|
llLayoutParent.removeView(llLayout); |
|
|
|
|
} else { |
|
|
|
|
((ViewGroup) getWindow().getDecorView()).removeView(playerRoot); |
|
|
|
|
playerParent.addView(playerRoot); |
|
|
|
|
llLayoutParent.addView(llLayout); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |