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


Java StatusBarUtil类代码示例

本文整理汇总了Java中com.jaeger.library.StatusBarUtil的典型用法代码示例。如果您正苦于以下问题:Java StatusBarUtil类的具体用法?Java StatusBarUtil怎么用?Java StatusBarUtil使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: onCreate

import com.jaeger.library.StatusBarUtil; //导入依赖的package包/类
@Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        StatusBarUtil.setColor(this, getResources().getColor(appBaseColor), 0);
        setContentView(R.layout.activity_settings);




        //从sp文件中取出isScrollToRead,判断是否显示初始页
        SharedPreferences sharedPreferences = getSharedPreferences("sp", Context.MODE_PRIVATE);
        boolean isScrollToRead = sharedPreferences.getBoolean("isScrollToRead", false);

//        if (isScrollToRead) {
//
//            tbNightMode.setChecked(true);
//        } else {
//            tbNightMode.setChecked(false);
//        }

    }
 
开发者ID:lxxlxx888,项目名称:Reer,代码行数:22,代码来源:SettingsActivity.java

示例2: onViewClicked

import com.jaeger.library.StatusBarUtil; //导入依赖的package包/类
@OnClick({R.id.textView2, R.id.button8, R.id.button9, R.id.button13})
public void onViewClicked(View view) {
    switch (view.getId()) {
        case R.id.textView2:
            break;
        case R.id.button8:
            startActivity(new Intent(this, SecondActivity.class));
            break;
        case R.id.button9:
            initData();
            break;
        case R.id.button13:
            // 改变颜色
            Random random = new Random();
            mColor = 0xff000000 | random.nextInt(0xffffff);
            if (getToolbar() != null) getToolbar().setBackgroundColor(mColor);
            StatusBarUtil.setColor(this, mColor, mAlpha);
            break;
    }
}
 
开发者ID:Jusenr,项目名称:RX_Demo,代码行数:21,代码来源:Dagger2TestActivity.java

示例3: onViewCreated

import com.jaeger.library.StatusBarUtil; //导入依赖的package包/类
@Override
protected void onViewCreated(@Nullable Bundle savedInstanceState) {
    setTitle("Dagger2Test2");

    DaggerSecondComponent.builder()
            .baseComponent(((TotalApplication) getApplication()).getBaseComponent())
            .secondModule(new SecondModule())
            .build()
            .inject(this);

    mTextView9.setText("绿布料加工后变成了" + clothHandler.handle(greenCloth) + "\nclothHandler地址:" + clothHandler);
    mTextView10.setText("");
    mTextView11.setText("");
    mTextView12.setText("");
    mTextView13.setText("");
    mTextView14.setText("");

    StatusBarUtil.setColor(this, getCurrentThemeColor(), 0);
}
 
开发者ID:Jusenr,项目名称:RX_Demo,代码行数:20,代码来源:SecondActivity.java

示例4: setContentView

import com.jaeger.library.StatusBarUtil; //导入依赖的package包/类
@Override
public void setContentView(int layoutResID) {
    super.setContentView(R.layout.activity_top);
    //
    llTitleMenu = $(R.id.ll_title_menu);
    llTitleMenu.setOnClickListener(this);
    toolbar = $(R.id.toolbar);
    svContent = $(R.id.sv_content);
    getLayoutInflater().inflate(layoutResID, svContent);
    //ActionBar
    setSupportActionBar(toolbar);
    ActionBar actionBar = getSupportActionBar();
    if (actionBar != null) {
        //去除默认Title显示
        actionBar.setDisplayShowTitleEnabled(false);
    }
    //
    StatusBarUtil.setColor(this,ContextCompat.getColor(this, R.color.colorTheme));
}
 
开发者ID:zhao-mingjian,项目名称:qvod,代码行数:20,代码来源:BaseTitleActivity.java

示例5: onCreate

import com.jaeger.library.StatusBarUtil; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_details_movie);
    ButterKnife.bind(this);
    //
    StatusBarUtil.setTranslucentForImageView(this, 0, toolBar);
    //
    onSetToolbar(toolBar);
    ActionBar actionBar = getSupportActionBar();
    if (actionBar != null) {
        //是否显示默认Title
        actionBar.setDisplayShowTitleEnabled(true);
        //是否显示返回键
        actionBar.setDisplayHomeAsUpEnabled(true);
    }
    //
    initLoading();
}
 
开发者ID:zhao-mingjian,项目名称:qvod,代码行数:20,代码来源:MovieDetailsActivity.java

示例6: onCreate

import com.jaeger.library.StatusBarUtil; //导入依赖的package包/类
@Override protected void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  setContentView(R.layout.module_ui_activity_scrolling);
  Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
  setSupportActionBar(toolbar);
  toolbar.setNavigationIcon(R.drawable.ic_back);
  StatusBarUtil.setColor(this, getResources().getColor(R.color.main_color_normal), 0);

  FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
  fab.setOnClickListener(new View.OnClickListener() {
    @Override public void onClick(View view) {
      Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)
          .setAction("Action", null)
          .show();
    }
  });
}
 
开发者ID:liuguoquan727,项目名称:android-study,代码行数:18,代码来源:ScrollingActivity.java

示例7: onCreate

import com.jaeger.library.StatusBarUtil; //导入依赖的package包/类
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    MyApp.activities.add(this);
    init();

    //判断是否使用MVP模式
    mPresenter = createPresenter();
    if (mPresenter != null) {
        mPresenter.attachView((V) this);//因为之后所有的子类都要实现对应的View接口
    }

    //子类不再需要设置布局ID,也不再需要使用ButterKnife.bind()
    setContentView(provideContentViewId());
    ButterKnife.bind(this);

    setupAppBarAndToolbar();

    //沉浸式状态栏
    StatusBarUtil.setColor(this, UIUtils.getColor(R.color.colorPrimaryDark), 10);

    initView();
    initData();
    initListener();
}
 
开发者ID:starryxp,项目名称:LQRWeChat-master,代码行数:26,代码来源:BaseActivity.java

示例8: onCreate

import com.jaeger.library.StatusBarUtil; //导入依赖的package包/类
@Override protected void onCreate(Bundle savedInstanceState) {
    setContentView(R.layout.activity_user);
    StatusBarUtil.setColorForSwipeBack(this, 0x284fbb);

    ButterKnife.bind(this);
    super.onCreate(savedInstanceState);

    Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
    setSupportActionBar(toolbar);

    back.setOnClickListener(new View.OnClickListener() {
        @Override public void onClick(View view) {
            finish();
        }
    });

    Intent intent = getIntent();
    loginName = intent.getStringExtra(LOGIN_NAME);

    TopicFragment topicFragment =
        TopicFragment.newInstance(loginName, TopicFragment.TYPE_CREATE);
    getSupportFragmentManager().beginTransaction().add(R.id.container, topicFragment).commit();

    userPresenter = new UserPresenter(this);
    userPresenter.getUser(loginName);
}
 
开发者ID:plusend,项目名称:DiyCode,代码行数:27,代码来源:UserActivity.java

示例9: onCreate

import com.jaeger.library.StatusBarUtil; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_navigation_view);
    Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
    setSupportActionBar(toolbar);

    FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
    fab.setOnClickListener(view -> Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)
            .setAction("Action", null).show());

    DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
    ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(
            this, drawer, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close);
    drawer.setDrawerListener(toggle);
    toggle.syncState();

    NavigationView navigationView = (NavigationView) findViewById(R.id.nav_view);
    //navigationView.setItemIconTintList(null);
    navigationView.setNavigationItemSelectedListener(this);
    StatusBarUtil.setColorForDrawerLayout(this,drawer,0,50);

}
 
开发者ID:ruinszero,项目名称:RuinsAndroidLibrary,代码行数:24,代码来源:NavigationViewActivity.java

示例10: onCreate

import com.jaeger.library.StatusBarUtil; //导入依赖的package包/类
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    // 设置右滑动返回
    Slidr.attach(this);
    setContentView(R.layout.swipe_back_activity);
    mToolbar = (Toolbar) findViewById(R.id.toolbar);
    mBtnChangeColor = (Button) findViewById(R.id.btn_change_color);

    setSupportActionBar(mToolbar);
    if (getSupportActionBar() != null) {
        getSupportActionBar().setDisplayHomeAsUpEnabled(true);
    }
    mToolbar.setBackgroundColor(mColor);
    mBtnChangeColor.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            Random random = new Random();
            mColor = 0xff000000 | random.nextInt(0xffffff);
            mToolbar.setBackgroundColor(mColor);
            StatusBarUtil.setColorForSwipeBack(SwipeBackActivity.this, mColor, 38);
        }
    });
}
 
开发者ID:laobie,项目名称:StatusBarUtil,代码行数:25,代码来源:SwipeBackActivity.java

示例11: onCreate

import com.jaeger.library.StatusBarUtil; //导入依赖的package包/类
@Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        App.getInstance().getAppComponent().inject(this);
        mThemeManager.setTheme(this);
        super.onCreate(savedInstanceState);
        if (provideLayoutId() != 0) {
            setContentView(provideLayoutId());
            ButterKnife.bind(this);
        }
//        if (rootView() != null) {
//            rootView().setBackground(new ColorDrawable(
//                    ResourceUtil.getAttrColor(this, android.R.attr.colorBackground)));
//        }
        setSupportActionBar(this.getToolbar());

        getToolbar().setBackground(
                new ColorDrawable(ResourceUtil.getAttrColor(this, android.R.attr.colorPrimary)));

        StatusBarUtil.setColorForSwipeBack(this,
                ResourceUtil.getAttrColor(this, android.R.attr.colorPrimaryDark), 0);

//        init(savedInstanceState);
    }
 
开发者ID:sorcererXW,项目名称:SorceryIconPack,代码行数:24,代码来源:BaseSubActivity.java

示例12: initView

import com.jaeger.library.StatusBarUtil; //导入依赖的package包/类
private void initView() {
    mToolbar = (Toolbar) findViewById(R.id.tool_bar);
    mToolbar.setTitle(R.string.app_name);
    setSupportActionBar(mToolbar);
    mTabLayout = (TabLayout) this.findViewById(R.id.tab_layout);
    mViewPager = (ViewPager) this.findViewById(R.id.view_pager);
    mDrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);
    StatusBarUtil.setColorForDrawerLayout(MainActivity.this, mDrawerLayout, getResources().getColor(R
            .color.colorPrimaryDark));
    ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(
            this, mDrawerLayout, mToolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close);
    mDrawerLayout.addDrawerListener(toggle);
    toggle.syncState();
    mNavigationView = (NavigationView) findViewById(R.id.nav_view);
    mNavigationView.setNavigationItemSelectedListener(this);
    mMainNavigationHeader = new MainNavigationHeader(this, mNavigationView);
    mMainNavigationHeader.bindData();
    mAdapter = new FragmentAdapter(getSupportFragmentManager());
}
 
开发者ID:sungerk,项目名称:meiShi,代码行数:20,代码来源:MainActivity.java

示例13: onCreate

import com.jaeger.library.StatusBarUtil; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_stus_bar);

    StatusBarUtil.setColor(this, 255);
}
 
开发者ID:lxxlxx888,项目名称:Reer,代码行数:8,代码来源:stusBar.java

示例14: initViews

import com.jaeger.library.StatusBarUtil; //导入依赖的package包/类
private void initViews() {
    setTitle("Gank");
    int color = getCurrentThemeColor();
    StatusBarUtil.setColor(this, color, 0);

    mAdapter = new MMListAdapter(null);
    mAdapter.setOnItemClickListener(mItemtClickListener);
    mAdapter.openLoadAnimation(BaseQuickAdapter.SLIDEIN_RIGHT);
    mBrvMmList.setAdapter(mAdapter);
    mRefreshLayout.setOnRefreshListener(mRefreshListener);
}
 
开发者ID:Jusenr,项目名称:RX_Demo,代码行数:12,代码来源:MMActivity.java

示例15: initView

import com.jaeger.library.StatusBarUtil; //导入依赖的package包/类
public void initView() {
    //ToolBar
    setSupportActionBar(toolbar);
    ActionBar actionBar = getSupportActionBar();
    if (actionBar != null) {
        //去除默认Title显示
        actionBar.setDisplayShowTitleEnabled(false);
        //去除返回键显示
        actionBar.setDisplayHomeAsUpEnabled(false);
    }
    //
    StatusBarUtil.setColorNoTranslucentForDrawerLayout(this, drawerLayout, ContextCompat.getColor(this, R.color.colorTheme));
    //
    ivTitleSpecial.setSelected(true);
}
 
开发者ID:zhao-mingjian,项目名称:qvod,代码行数:16,代码来源:MainActivity.java


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