|
|
|
|
@ -8,7 +8,6 @@ import android.content.pm.ActivityInfo; |
|
|
|
|
import android.content.res.Configuration; |
|
|
|
|
import android.graphics.drawable.Drawable; |
|
|
|
|
import android.net.Uri; |
|
|
|
|
import android.os.Build; |
|
|
|
|
import android.os.Bundle; |
|
|
|
|
import android.provider.Settings; |
|
|
|
|
import android.text.SpannableStringBuilder; |
|
|
|
|
@ -25,6 +24,9 @@ import android.widget.TextView; |
|
|
|
|
|
|
|
|
|
import androidx.annotation.NonNull; |
|
|
|
|
import androidx.annotation.Nullable; |
|
|
|
|
import androidx.core.view.ViewCompat; |
|
|
|
|
import androidx.core.view.WindowCompat; |
|
|
|
|
import androidx.core.view.WindowInsetsCompat; |
|
|
|
|
import androidx.fragment.app.Fragment; |
|
|
|
|
import androidx.fragment.app.FragmentActivity; |
|
|
|
|
import androidx.lifecycle.Observer; |
|
|
|
|
@ -254,11 +256,6 @@ public class VideoActivity extends BaseActivity implements Clock.Callback, Custo |
|
|
|
|
return mBinding.getRoot().getTag().equals("port"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
protected boolean transparent() { |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
protected ViewBinding getBinding() { |
|
|
|
|
return mBinding = ActivityVideoBinding.inflate(getLayoutInflater()); |
|
|
|
|
@ -380,6 +377,14 @@ public class VideoActivity extends BaseActivity implements Clock.Callback, Custo |
|
|
|
|
mBinding.control.action.danmaku.setVisibility(Setting.isDanmakuLoad() ? View.VISIBLE : View.GONE); |
|
|
|
|
mBinding.control.action.reset.setText(ResUtil.getStringArray(R.array.select_reset)[Setting.getReset()]); |
|
|
|
|
mBinding.video.addOnLayoutChangeListener((view, left, top, right, bottom, oldLeft, oldTop, oldRight, oldBottom) -> mPiP.update(this, view)); |
|
|
|
|
WindowCompat.getInsetsController(getWindow(), getWindow().getDecorView()).setAppearanceLightStatusBars(false); |
|
|
|
|
ViewCompat.setOnApplyWindowInsetsListener(mBinding.getRoot(), (v, windowInsets) -> { |
|
|
|
|
int top = windowInsets.getInsets(WindowInsetsCompat.Type.statusBars()).top; |
|
|
|
|
ViewGroup.LayoutParams lp = mBinding.statusBar.getLayoutParams(); |
|
|
|
|
lp.height = top; |
|
|
|
|
mBinding.statusBar.setLayoutParams(lp); |
|
|
|
|
return windowInsets; |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void setVideoView(boolean isInPictureInPictureMode) { |
|
|
|
|
|