Search in sources :

Example 1 with BizFragment

use of org.aisen.weibo.sina.ui.fragment.base.BizFragment in project AisenWeiBo by wangdan.

the class MainActivity method onCreate.

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.ui_main);
    CacheClearFragment.clearCompress();
    BizFragment bizFragment = BizFragment.createBizFragment(this);
    bizFragment.createFabAnimator(fabBtn);
    fabBtn.setOnLongClickListener(new View.OnLongClickListener() {

        @Override
        public boolean onLongClick(View v) {
            // 触发一次刷新
            ((AsToolbar) getToolbar()).performDoublcClick();
            appBarLayout.setExpanded(true);
            return true;
        }
    });
    bizFragment.getFabAnimator().setDuration(200);
    getSupportActionBar().setDisplayHomeAsUpEnabled(true);
    getSupportActionBar().setDisplayShowHomeEnabled(false);
    setupDrawer(savedInstanceState);
    setupMenu(savedInstanceState);
    setupFab(savedInstanceState);
    setupAppBarLayout(savedInstanceState);
    if (savedInstanceState != null) {
        toolbarTitle = savedInstanceState.getString("toolbarTitle");
        if (!TextUtils.isEmpty(toolbarTitle))
            getSupportActionBar().setTitle(toolbarTitle);
    }
    mInstance = this;
    OtherItemFragment.checkPhotoPermission(this, true);
}
Also used : BizFragment(org.aisen.weibo.sina.ui.fragment.base.BizFragment) View(android.view.View)

Aggregations

View (android.view.View)1 BizFragment (org.aisen.weibo.sina.ui.fragment.base.BizFragment)1