本文整理汇总了Java中android.support.v4.app.ActivityCompat.finishAfterTransition方法的典型用法代码示例。如果您正苦于以下问题:Java ActivityCompat.finishAfterTransition方法的具体用法?Java ActivityCompat.finishAfterTransition怎么用?Java ActivityCompat.finishAfterTransition使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.support.v4.app.ActivityCompat
的用法示例。
在下文中一共展示了ActivityCompat.finishAfterTransition方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onBackPressed
import android.support.v4.app.ActivityCompat; //导入方法依赖的package包/类
@Override
public void onBackPressed() {
//获取数据返回获取
long currPosition = exoPlayerManager.getCurrentPosition();
if (exoPlayerManager.onBackPressed()) {//使用播放返回键监听
isBack=true;
Toast.makeText(MainListInfoCustomActivity.this, "返回", Toast.LENGTH_LONG).show();
Intent intent = new Intent();
intent.putExtra("isEnd", isEnd);
intent.putExtra("currPosition", currPosition);
Log.d(TAG, "sss:" + exoPlayerManager.getCurrentPosition());
setResult(RESULT_OK, intent);
ActivityCompat.finishAfterTransition(this);
}
}
示例2: onBackPressed
import android.support.v4.app.ActivityCompat; //导入方法依赖的package包/类
@Override
public void onBackPressed() {
if (exoPlayerManager.onBackPressed()) {
ActivityCompat.finishAfterTransition(this);
}
}
示例3: onBackPressed
import android.support.v4.app.ActivityCompat; //导入方法依赖的package包/类
@Override
public void onBackPressed() {
if (exoPlayerManager.onBackPressed()) {
ActivityCompat.finishAfterTransition(this);
exoPlayerManager.onDestroy();
}
}
示例4: onCreate
import android.support.v4.app.ActivityCompat; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
if (Utils.hasLollipop()) requestWindowFeature(Window.FEATURE_CONTENT_TRANSITIONS);
super.onCreate(savedInstanceState);
if (Utils.hasLollipop()) {
getWindow().setExitTransition(new Fade());
}
Intent intent = new Intent(this, MainActivity.class);
ActivityOptionsCompat options = ActivityOptionsCompat.makeSceneTransitionAnimation(this);
ActivityCompat.startActivity(this, intent, options.toBundle());
ActivityCompat.finishAfterTransition(this);
}
示例5: onBackPressedSupport
import android.support.v4.app.ActivityCompat; //导入方法依赖的package包/类
/**
* 该方法回调时机为,Activity回退栈内Fragment的数量 小于等于1 时,默认finish Activity
* 请尽量复写该方法,避免复写onBackPress(),以保证SupportFragment内的onBackPressedSupport()回退事件正常执行
*/
public void onBackPressedSupport() {
if (getSupportFragmentManager().getBackStackEntryCount() > 1) {
pop();
} else {
ActivityCompat.finishAfterTransition(mActivity);
}
}
示例6: setResultAndFinish
import android.support.v4.app.ActivityCompat; //导入方法依赖的package包/类
public void setResultAndFinish() {
isReturning = true;
Intent data = new Intent();
data.setAction(SHARED_ELEMENT_RETURN_TRANSITION);
data.putExtra(AlbumActivity.ALBUM_PATH, album.getPath());
data.putExtra(AlbumActivity.EXTRA_CURRENT_ALBUM_POSITION, viewPager.getCurrentItem());
setResult(RESULT_OK, data);
ActivityCompat.finishAfterTransition(this);
}
示例7: onClick
import android.support.v4.app.ActivityCompat; //导入方法依赖的package包/类
@Override
public void onClick(View v) {
ActivityCompat.finishAfterTransition(activity);
}
示例8: startMainActivity
import android.support.v4.app.ActivityCompat; //导入方法依赖的package包/类
private void startMainActivity() {
MyBaseActivity.launch(this, MainActivity.class);
ActivityCompat.finishAfterTransition(this);
}
示例9: backBtnAction
import android.support.v4.app.ActivityCompat; //导入方法依赖的package包/类
@Override
protected void backBtnAction() {
ActivityCompat.finishAfterTransition(this);
}
示例10: onSingleTapConfirmed
import android.support.v4.app.ActivityCompat; //导入方法依赖的package包/类
@Override
public void onSingleTapConfirmed() {
ActivityCompat.finishAfterTransition(getActivity());
}
示例11: onSupportNavigateUp
import android.support.v4.app.ActivityCompat; //导入方法依赖的package包/类
@Override
public boolean onSupportNavigateUp() {
ActivityCompat.finishAfterTransition(this);
return true;
}
示例12: onBeforeBack
import android.support.v4.app.ActivityCompat; //导入方法依赖的package包/类
@Override
public boolean onBeforeBack() {
ActivityCompat.finishAfterTransition(this);
return false;
}