Java Code Examples for cn.ycbjie.ycstatusbarlib.bar.StateAppBar#setStatusBarColor()

The following examples show how to use cn.ycbjie.ycstatusbarlib.bar.StateAppBar#setStatusBarColor() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: BaseActivity.java    From YCAudioPlayer with Apache License 2.0 6 votes vote down vote up
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
    if (BaseConfig.INSTANCE.isNight()) {
        setTheme(getDarkTheme());
    }
    super.onCreate(savedInstanceState);
    setContentView(getContentView());
    ButterKnife.bind(this);
    //避免切换横竖屏
    setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
    StateAppBar.setStatusBarColor(this,R.color.redTab);
    if (mPresenter != null){
        mPresenter.subscribe();
    }
    initView();
    initListener();
    if(!NetworkUtils.isConnected()){
        ToastUtils.showShort("请检查网络是否连接");
    }
    initData();
}
 
Example 2
Source File: MainActivity.java    From YCAudioPlayer with Apache License 2.0 6 votes vote down vote up
@Override
public void initView() {
    //音频播放器需要让服务长期存在
    if (!checkServiceAlive()) {
        return;
    }
    StateAppBar.setStatusBarColor(this, ContextCompat.getColor(this, R.color.redTab));
    initFragment();
    initTabLayout();
    initPlayServiceListener();
    parseIntent();
    AppToolUtils.requestMsgPermission(this);
    ServiceUtils.startService(AppLogService.class);
    String channel = getChannel(this.getApplicationContext());
    AppLogUtils.eTag("渠道"+channel);
}
 
Example 3
Source File: NewArticleActivity.java    From YCCustomText with Apache License 2.0 6 votes vote down vote up
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_new);
    StateAppBar.setStatusBarColor(this, ContextCompat.getColor(this, R.color.colorPrimary));
    toolbar = findViewById(R.id.toolbar);
    hte_content = findViewById(R.id.hte_content);
    htv_content = findViewById(R.id.htv_content);
    initToolBar();
    screenWidth = CommonUtil.getScreenWidth(this);
    screenHeight = CommonUtil.getScreenHeight(this);
    initListener();
    initHyper();
    //解决点击EditText弹出收起键盘时出现的黑屏闪现现象
    View rootView = hte_content.getRootView();
    rootView.setBackgroundColor(Color.WHITE);
    hte_content.postDelayed(new Runnable() {
        @Override
        public void run() {
            EditText lastFocusEdit = hte_content.getLastFocusEdit();
            lastFocusEdit.requestFocus();
            //打开软键盘显示
            //HyperLibUtils.openSoftInput(NewArticleActivity.this);
        }
    },300);
}
 
Example 4
Source File: DebugActivity.java    From YCAudioPlayer with Apache License 2.0 5 votes vote down vote up
@SuppressLint("SetTextI18n")
@Override
public void initView() {
    StateAppBar.setStatusBarColor(this,
            ContextCompat.getColor(this, R.color.redTab));
    toolbarTitle.setText("设置Debug模式");
}
 
Example 5
Source File: OnlineMusicActivity.java    From YCAudioPlayer with Apache License 2.0 5 votes vote down vote up
@Override
public void initView() {
    if (!checkServiceAlive()) {
        return;
    }
    StateAppBar.setStatusBarColor(this, ContextCompat.getColor(this, R.color.redTab));
    initIntentData();
    initToolBar();
    initRecyclerView();
}
 
Example 6
Source File: MusicInfoActivity.java    From YCAudioPlayer with Apache License 2.0 5 votes vote down vote up
@Override
public void initView() {
    StateAppBar.setStatusBarColor(this, ContextCompat.getColor(this, R.color.redTab));
    initToolBar();
    initIntentData();
    initViewData();
}
 
Example 7
Source File: WebViewActivity.java    From YCAudioPlayer with Apache License 2.0 5 votes vote down vote up
@Override
public void initView() {
    StateAppBar.setStatusBarColor(this, ContextCompat.getColor(this, R.color.redTab));
    initIntentData();
    initToolBar();
    initWebView();
}
 
Example 8
Source File: ArtistInfoActivity.java    From YCAudioPlayer with Apache License 2.0 4 votes vote down vote up
@Override
public void initView() {
    StateAppBar.setStatusBarColor(this, ContextCompat.getColor(this, R.color.redTab));
    initIntentData();
}
 
Example 9
Source File: LocalOfficeActivity.java    From YCAudioPlayer with Apache License 2.0 4 votes vote down vote up
@Override
public void initView() {
    StateAppBar.setStatusBarColor(this, ContextCompat.getColor(this, R.color.redTab));
    initActionBar();
    initRecyclerView();
}
 
Example 10
Source File: LocalVideoActivity.java    From YCAudioPlayer with Apache License 2.0 4 votes vote down vote up
@Override
public void initView() {
    StateAppBar.setStatusBarColor(this, ContextCompat.getColor(this, R.color.redTab));
    initActionBar();
    initRecyclerView();
}
 
Example 11
Source File: LocalZipFileActivity.java    From YCAudioPlayer with Apache License 2.0 4 votes vote down vote up
@Override
public void initView() {
    StateAppBar.setStatusBarColor(this, ContextCompat.getColor(this, R.color.redTab));
    initActionBar();
    initRecyclerView();
}
 
Example 12
Source File: MeSettingActivity.java    From YCAudioPlayer with Apache License 2.0 4 votes vote down vote up
@Override
public void initView() {
    initActionBar();
    StateAppBar.setStatusBarColor(this, ContextCompat.getColor(this, R.color.redTab));
}