本文整理汇总了Java中android.app.PictureInPictureParams类的典型用法代码示例。如果您正苦于以下问题:Java PictureInPictureParams类的具体用法?Java PictureInPictureParams怎么用?Java PictureInPictureParams使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PictureInPictureParams类属于android.app包,在下文中一共展示了PictureInPictureParams类的18个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: onUserLeaveHint
import android.app.PictureInPictureParams; //导入依赖的package包/类
@Override
public void onUserLeaveHint() {
super.onUserLeaveHint();
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
if (prefConfig.enablePip && connected) {
enterPictureInPictureMode(
new PictureInPictureParams.Builder()
.setAspectRatio(new Rational(prefConfig.width, prefConfig.height))
.setSourceRectHint(new Rect(
streamView.getLeft(), streamView.getTop(),
streamView.getRight(), streamView.getBottom()))
.build());
}
}
}
开发者ID:moonlight-stream,项目名称:moonlight-android,代码行数:17,代码来源:Game.java
示例2: onCreate
import android.app.PictureInPictureParams; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_pip_test);
mFramePlayer = findViewById(R.id.frame_mock_player);
mBtnPip = findViewById(R.id.btn_minimize);
mBtnPip.setOnClickListener(view -> {
if (android.os.Build.VERSION.SDK_INT >= 26) {
//Trigger PiP mode
try {
Rational rational = new Rational(mFramePlayer.getWidth(), mFramePlayer.getHeight());
PictureInPictureParams mParams =
new PictureInPictureParams.Builder()
.setAspectRatio(rational)
.build();
enterPictureInPictureMode(mParams);
} catch (IllegalStateException e) {
e.printStackTrace();
}
} else {
Toast.makeText(PipActivity.this, "API 26 needed to perform PiP", Toast.LENGTH_SHORT).show();
}
});
}
开发者ID:Suleiman19,项目名称:Android-O-Sample,代码行数:30,代码来源:PipActivity.java
示例3: onPictureInPictureClick
import android.app.PictureInPictureParams; //导入依赖的package包/类
private View.OnClickListener onPictureInPictureClick() {
return view -> {
if (exoPlayer != null && exoPlayer.getPlaybackState() == SimpleExoPlayer.STATE_READY) {
int videoWidth = exoPlayer.getVideoFormat().width;
int videoHeight = exoPlayer.getVideoFormat().height;
PictureInPictureParams params = new PictureInPictureParams.Builder()
.setAspectRatio(new Rational(videoWidth, videoHeight))
.build();
enterPictureInPictureMode(params);
} else {
Toast.makeText(PictureInPictureActivity.this, R.string.video_playback_not_ready, Toast.LENGTH_SHORT).show();
}
};
}
开发者ID:akexorcist,项目名称:Android-O-Feature,代码行数:15,代码来源:PictureInPictureActivity.java
示例4: onPause
import android.app.PictureInPictureParams; //导入依赖的package包/类
@Override
protected void onPause() {
super.onPause();
if (player.getPlayWhenReady() && Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
PictureInPictureParams params = new PictureInPictureParams.Builder()
.build();
enterPictureInPictureMode(params);
}
}
开发者ID:kollerlukas,项目名称:Camera-Roll-Android-App,代码行数:10,代码来源:VideoPlayerActivity.java
示例5: enterPictureInPictureMode
import android.app.PictureInPictureParams; //导入依赖的package包/类
boolean enterPictureInPictureMode(final CallFun1<Boolean, PictureInPictureParams> superCall,
final PictureInPictureParams params) {
synchronized (mSuperListeners) {
mSuperListeners.push(superCall);
return enterPictureInPictureMode(params);
}
}
开发者ID:passsy,项目名称:CompositeAndroid,代码行数:8,代码来源:ActivityPlugin.java
示例6: setPictureInPictureParams
import android.app.PictureInPictureParams; //导入依赖的package包/类
void setPictureInPictureParams(final CallVoid1<PictureInPictureParams> superCall,
final PictureInPictureParams params) {
synchronized (mSuperListeners) {
mSuperListeners.push(superCall);
setPictureInPictureParams(params);
}
}
开发者ID:passsy,项目名称:CompositeAndroid,代码行数:8,代码来源:ActivityPlugin.java
示例7: onEnterIntoPIPClicked
import android.app.PictureInPictureParams; //导入依赖的package包/类
public void onEnterIntoPIPClicked(View view) {
PictureInPictureParams params = new PictureInPictureParams.Builder()
.setAspectRatio(new Rational(10, 16)) // Portrait Aspect Ratio
.build();
enterPictureInPictureMode(params);
}
开发者ID:AgoraIO,项目名称:Agora-Picture-in-Picture-Android,代码行数:7,代码来源:VideoChatViewActivity.java
示例8: enterPictureInPictureMode
import android.app.PictureInPictureParams; //导入依赖的package包/类
@Override
public boolean enterPictureInPictureMode(final PictureInPictureParams params) {
return super.enterPictureInPictureMode(params);
}
开发者ID:passsy,项目名称:CompositeAndroid,代码行数:5,代码来源:BlueprintActivity.java
示例9: setPictureInPictureParams
import android.app.PictureInPictureParams; //导入依赖的package包/类
@Override
public void setPictureInPictureParams(final PictureInPictureParams params) {
super.setPictureInPictureParams(params);
}
开发者ID:passsy,项目名称:CompositeAndroid,代码行数:5,代码来源:BlueprintActivity.java
示例10: enterPictureInPictureMode
import android.app.PictureInPictureParams; //导入依赖的package包/类
@Override
public boolean enterPictureInPictureMode(final PictureInPictureParams params) {
return delegate.enterPictureInPictureMode(params);
}
开发者ID:passsy,项目名称:CompositeAndroid,代码行数:5,代码来源:CompositeActivity.java
示例11: setPictureInPictureParams
import android.app.PictureInPictureParams; //导入依赖的package包/类
@Override
public void setPictureInPictureParams(final PictureInPictureParams params) {
delegate.setPictureInPictureParams(params);
}
开发者ID:passsy,项目名称:CompositeAndroid,代码行数:5,代码来源:CompositeActivity.java
示例12: super_enterPictureInPictureMode
import android.app.PictureInPictureParams; //导入依赖的package包/类
@Override
public boolean super_enterPictureInPictureMode(final PictureInPictureParams params) {
return super.enterPictureInPictureMode(params);
}
开发者ID:passsy,项目名称:CompositeAndroid,代码行数:5,代码来源:CompositeActivity.java
示例13: super_setPictureInPictureParams
import android.app.PictureInPictureParams; //导入依赖的package包/类
@Override
public void super_setPictureInPictureParams(final PictureInPictureParams params) {
super.setPictureInPictureParams(params);
}
开发者ID:passsy,项目名称:CompositeAndroid,代码行数:5,代码来源:CompositeActivity.java
示例14: pipActivity
import android.app.PictureInPictureParams; //导入依赖的package包/类
public void pipActivity(View view) {
PictureInPictureParams params = new PictureInPictureParams.Builder()
.setAspectRatio(new Rational(9,16)) // Portrait Aspect Ratio
.build();
enterPictureInPictureMode(params);
}
开发者ID:opentok,项目名称:opentok-android-sdk-samples,代码行数:7,代码来源:MainActivity.java
示例15: enterPictureInPictureMode
import android.app.PictureInPictureParams; //导入依赖的package包/类
boolean enterPictureInPictureMode(final PictureInPictureParams params);
开发者ID:passsy,项目名称:CompositeAndroid,代码行数:2,代码来源:ICompositeActivity.java
示例16: setPictureInPictureParams
import android.app.PictureInPictureParams; //导入依赖的package包/类
void setPictureInPictureParams(final PictureInPictureParams params);
开发者ID:passsy,项目名称:CompositeAndroid,代码行数:2,代码来源:ICompositeActivity.java
示例17: super_enterPictureInPictureMode
import android.app.PictureInPictureParams; //导入依赖的package包/类
boolean super_enterPictureInPictureMode(final PictureInPictureParams params);
开发者ID:passsy,项目名称:CompositeAndroid,代码行数:2,代码来源:ICompositeActivity.java
示例18: super_setPictureInPictureParams
import android.app.PictureInPictureParams; //导入依赖的package包/类
void super_setPictureInPictureParams(final PictureInPictureParams params);
开发者ID:passsy,项目名称:CompositeAndroid,代码行数:2,代码来源:ICompositeActivity.java
注:本文中的android.app.PictureInPictureParams类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论