本文整理匯總了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;
}