当前位置: 首页>>代码示例>>Java>>正文


Java ActivityCompat.postponeEnterTransition方法代码示例

本文整理汇总了Java中android.support.v4.app.ActivityCompat.postponeEnterTransition方法的典型用法代码示例。如果您正苦于以下问题:Java ActivityCompat.postponeEnterTransition方法的具体用法?Java ActivityCompat.postponeEnterTransition怎么用?Java ActivityCompat.postponeEnterTransition使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在android.support.v4.app.ActivityCompat的用法示例。


在下文中一共展示了ActivityCompat.postponeEnterTransition方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onCreate

import android.support.v4.app.ActivityCompat; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_profile);
    Toolbar toolbar = findViewById(R.id.toolbar);
    setSupportActionBar(toolbar);
    if (getSupportActionBar() != null) {
        getSupportActionBar().setDisplayHomeAsUpEnabled(true);
    }
    mController = new PlantController(this);
    ActivityCompat.postponeEnterTransition(this);
    // Setting OnClickListeners
    findViewById(R.id.camera_fab).setOnClickListener(this);
    findViewById(R.id.height_button).setOnClickListener(this);
    findViewById(R.id.poop_button).setOnClickListener(this);
    findViewById(R.id.water_button).setOnClickListener(this);
    findViewById(R.id.calendar_button).setOnClickListener(this);
    findViewById(R.id.care_tips_expand_collapse).setOnClickListener(this);
    findViewById(R.id.toxic_warning_expand_collapse).setOnClickListener(this);
    findViewById(R.id.noxious_warning_expand_collapse).setOnClickListener(this);
    overridePendingTransition(R.anim.slide_up, R.anim.hold);
}
 
开发者ID:iskandergaba,项目名称:Botanist,代码行数:23,代码来源:PlantActivity.java

示例2: onCreate

import android.support.v4.app.ActivityCompat; //导入方法依赖的package包/类
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
        ActivityCompat.postponeEnterTransition(this);
    }
    component().inject(this);
    setToolbarInitialisation();
    comicDetailsPresenter.setView(this);
    if (getIntent() != null) {
        setIntentParameters();
        if (comic != null) {
            setInitialTitle();
            comicDetailsPresenter.setInfo(comic, this);
        } else {
            comicDetailsPresenter.errorGettingInfo(this);
        }
    } else {
        comicDetailsPresenter.errorGettingInfo(this);
    }
}
 
开发者ID:raulh82vlc,项目名称:Avengers,代码行数:22,代码来源:ComicDetailsActivity.java

示例3: onCreate

import android.support.v4.app.ActivityCompat; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    setupLayoutStableFullscreen();

    restoreState(savedInstanceState);

    if (!shouldUseDataBinding()) {
        // set contentView if child activity not use dataBinding
        setContentView(getLayout());
        initViews();
    }

    if (shouldPostponeTransition()) {
        ActivityCompat.postponeEnterTransition(this);
    }

    CommonUtils.hideSoftKeyboard(this);
}
 
开发者ID:duyp,项目名称:mvvm-template,代码行数:21,代码来源:BaseActivity.java

示例4: onCreate

import android.support.v4.app.ActivityCompat; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    ActivityCompat.postponeEnterTransition(this);
    ActivityCompat.setEnterSharedElementCallback(this, enterTransitionCallback);

    int mUIFlag = View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
            | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
            | View.SYSTEM_UI_FLAG_LAYOUT_STABLE
            | View.SYSTEM_UI_FLAG_LOW_PROFILE
            | View.SYSTEM_UI_FLAG_FULLSCREEN
            | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION;

    getWindow().getDecorView().setSystemUiVisibility(mUIFlag);

    setContentView(R.layout.activity_view_pager_gallery);

    Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
    toolbar.setTitle("Gallery");
    setSupportActionBar(toolbar);
    getSupportActionBar().setDisplayHomeAsUpEnabled(true);

    galleryViewPagerAdapter = new GalleryViewPagerAdapter(this);

    viewPager = (ViewPager) findViewById(R.id.container);
    viewPager.setAdapter(galleryViewPagerAdapter);

    int position = selectedIndex = getIntent().getIntExtra(EXTRA_POSITION, 0);
    viewPager.setCurrentItem(position);
    viewPager.setOnPageChangeListener(pageChangeListener);
    viewPager.getViewTreeObserver().addOnGlobalLayoutListener(pagerLayoutListener);
}
 
开发者ID:adithya321,项目名称:Instincts-2k17,代码行数:34,代码来源:GalleryViewPagerActivity.java

示例5: onCreate

import android.support.v4.app.ActivityCompat; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_image_detail);

    getWindow().setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS,
            WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);

    getSupportLoaderManager().initLoader(0, null, this);

    //Postpone transition here
    ActivityCompat.postponeEnterTransition(this);

    mPager = (ViewPager) findViewById(R.id.pager);
    mPager.setPageTransformer(false, new ParallaxPagerTransformer(R.id.image));
    mPagerAdapter = new MyPagerAdapter(getSupportFragmentManager());
    mPager.setAdapter(mPagerAdapter);
    mPager.setPageMargin((int) TypedValue
            .applyDimension(TypedValue.COMPLEX_UNIT_DIP, 1, getResources().getDisplayMetrics()));
    mPager.setPageMarginDrawable(new ColorDrawable(0x22000000));

    mPager.setOnPageChangeListener(new ViewPager.SimpleOnPageChangeListener() {
        @Override
        public void onPageScrollStateChanged(int state) {
            super.onPageScrollStateChanged(state);
        }

        @Override
        public void onPageSelected(int position) {
            if (mCursor != null) {
                mCursor.moveToPosition(position);
            }
            mSelectedItemId = mCursor.getLong(GalleryLoader.Query.COLUMN_IMAGE_ID);
        }
    });

    if (savedInstanceState == null) {
        if (getIntent() != null && getIntent().getData() != null) {
            mStartId = GalleryContract.GalleryEntry.getItemId(getIntent().getData());
            mSelectedItemId = mStartId;
        }
    }
}
 
开发者ID:prshntpnwr,项目名称:Monolith,代码行数:44,代码来源:ImageDetailActivity.java

示例6: onCreate

import android.support.v4.app.ActivityCompat; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_article_detail);

    getSupportLoaderManager().initLoader(0, null, this);

    getWindow().getDecorView().setSystemUiVisibility(
            View.SYSTEM_UI_FLAG_LAYOUT_STABLE
                    | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
                    | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION // hide nav bar
                    | View.SYSTEM_UI_FLAG_IMMERSIVE);

    //Postpone transition here
    ActivityCompat.postponeEnterTransition(this);

    mPager = (ViewPager) findViewById(R.id.pager);
    mPager.setPageTransformer(false, new ParallaxPagerTransformer(R.id.photo));
    mPagerAdapter = new MyPagerAdapter(getSupportFragmentManager());
    mPager.setAdapter(mPagerAdapter);
    mPager.setPageMargin((int) TypedValue
            .applyDimension(TypedValue.COMPLEX_UNIT_DIP, 1, getResources().getDisplayMetrics()));
    mPager.setPageMarginDrawable(new ColorDrawable(0x22000000));

    mPager.setOnPageChangeListener(new ViewPager.SimpleOnPageChangeListener() {
        @Override
        public void onPageScrollStateChanged(int state) {
            super.onPageScrollStateChanged(state);
        }

        @Override
        public void onPageSelected(int position) {
            if (mCursor != null) {
                mCursor.moveToPosition(position);
            }
            mSelectedItemId = mCursor.getLong(ArticleLoader.Query.COLUMN_ARTICLE_ID);
        }
    });

    if (savedInstanceState == null) {
        if (getIntent() != null && getIntent().getData() != null) {
            mStartId = ArticleContract.ArticleEntry.getItemId(getIntent().getData());
            mSelectedItemId = mStartId;
        }
    }
}
 
开发者ID:prshntpnwr,项目名称:Monolith,代码行数:47,代码来源:ArticleDetailActivity.java

示例7: postponeEnterTransition

import android.support.v4.app.ActivityCompat; //导入方法依赖的package包/类
private void postponeEnterTransition() {
    if (isAfterEnter) return;
    ActivityCompat.postponeEnterTransition(activity);
    isPostponeEnterTransition = true;
}
 
开发者ID:shenhuanet,项目名称:AndroidOpen,代码行数:6,代码来源:TransitionHelper.java


注:本文中的android.support.v4.app.ActivityCompat.postponeEnterTransition方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。