本文整理汇总了Java中com.jaeger.library.StatusBarUtil.setColor方法的典型用法代码示例。如果您正苦于以下问题:Java StatusBarUtil.setColor方法的具体用法?Java StatusBarUtil.setColor怎么用?Java StatusBarUtil.setColor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.jaeger.library.StatusBarUtil
的用法示例。
在下文中一共展示了StatusBarUtil.setColor方法的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);
// }
}
示例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;
}
}
示例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);
}
示例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));
}
示例5: 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();
}
});
}
示例6: 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();
}
示例7: 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);
}
示例8: initView
import com.jaeger.library.StatusBarUtil; //导入方法依赖的package包/类
@Override
public void initView() {
/**
设置状态栏的颜色或者是否是沉浸式
*/
StatusBarUtil.setColor(this, UIUtils.getColor(R.color.black));
AlphaAnimation alphaAnimation = new AlphaAnimation(0, 1);
alphaAnimation.setDuration(1000);
mRlButton.startAnimation(alphaAnimation);//设置布局启动动画
}
示例9: 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);
}
示例10: setContentView
import com.jaeger.library.StatusBarUtil; //导入方法依赖的package包/类
@Override
public void setContentView(@LayoutRes int layoutResID) {
mBaseBinding = DataBindingUtil.inflate(LayoutInflater.from(this), R.layout.activity_base, null, false);
bindingView = DataBindingUtil.inflate(getLayoutInflater(), layoutResID, null, false);
RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
bindingView.getRoot().setLayoutParams(params);
RelativeLayout mContainer = (RelativeLayout) mBaseBinding.getRoot().findViewById(R.id.container);
mContainer.addView(bindingView.getRoot());
getWindow().setContentView(mBaseBinding.getRoot());
//设置透明状态栏
StatusBarUtil.setColor(this, CommonUtils.getColor(R.color.colorTheme),0);
llProgressBar = getView(R.id.ll_progress_bar);
refresh=getView(R.id.ll_error_refresh);
ImageView img = getView(R.id.img_progress);
// 加载动画
mAnimationDrawable= (AnimationDrawable) img.getDrawable();
//默认进入页面就开启动画
if(!mAnimationDrawable.isRunning()){
mAnimationDrawable.start();
}
OnceInit.once(this);
setToolBar();
bindingView.getRoot().setVisibility(View.GONE);
}
示例11: initTitle
import com.jaeger.library.StatusBarUtil; //导入方法依赖的package包/类
private void initTitle() {
//设置状态栏颜色
StatusBarUtil.setColor(this, CommonUtils.getColor(R.color.colorTheme), 0);
//初始化相关控件
mProgressBar = (ProgressBar) findViewById(R.id.pb_progress);
webView = (WebView) findViewById(R.id.webview_detail);
videoFullView = (FrameLayout) findViewById(R.id.video_fullView);
mTitleToolBar = (Toolbar) findViewById(R.id.title_tool_bar);
setSupportActionBar(mTitleToolBar);
ActionBar actionBar = getSupportActionBar();
if (actionBar != null) {
//去除默认Title显示
actionBar.setDisplayShowTitleEnabled(false);
//显示默认back键
actionBar.setDisplayHomeAsUpEnabled(true);
actionBar.setHomeAsUpIndicator(R.drawable.icon_back);
}
setTitle(mTitle);
//给默认back键设置点击事件
mTitleToolBar.setNavigationOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
onBackPressed();
}
});
}
示例12: initView
import com.jaeger.library.StatusBarUtil; //导入方法依赖的package包/类
@Override
public void initView() {
StatusBarUtil.setColor(this, UIUtils.getColor(R.color.black));
AlphaAnimation alphaAnimation = new AlphaAnimation(0, 1);
alphaAnimation.setDuration(1000);
mRlButton.startAnimation(alphaAnimation);
}
示例13: onCreate
import com.jaeger.library.StatusBarUtil; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
StatusBarUtil.setColor(this, Color.TRANSPARENT);
mBinding = DataBindingUtil.setContentView(this, R.layout.activity_splash);
setListener();
}
示例14: onCreate
import com.jaeger.library.StatusBarUtil; //导入方法依赖的package包/类
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
android.transition.Transition transition = TransitionInflater.from(this).inflateTransition(R.transition.explode);
getWindow().setEnterTransition(transition);
}
StatusBarUtil.setColor(this, Color.TRANSPARENT);
mDataBinding.btnUpdate.setOnClickListener(this);
mDataBinding.btnUpdate.measure(0, 0);
mUpdateBtnLeft = ScreenUtils.getScreenSize(this)[0] -
mDataBinding.btnUpdate.getMeasuredWidth() - DensityUtils.dp2px(this ,10);
initToolbar();
mSdcardRootPath = Environment.getExternalStorageDirectory()
.getAbsolutePath();
mDataBinding.rlMusice.setLayoutManager(new LinearLayoutManager(this));
mAdapter = new CommonAdapter<MusicInfo>(this, R.layout.item_musicfile, mMusicList) {
@Override
protected void convert(ViewHolder holder, final MusicInfo musicInfo, int position) {
holder.setText(R.id.tv_name, musicInfo.getFilename());
holder.setText(R.id.tv_size, musicInfo.getFileSize());
holder.itemView.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
clickItem(musicInfo);
}
});
}
};
mDataBinding.rlMusice.setAdapter(mAdapter);
mDataBinding.rlMusice.addItemDecoration(new DividerItemDecoration(this,
DividerItemDecoration.VERTICAL));
mDao = MyApplication.getInstances().
getDaoSession().getMusicInfoDao();
FileChooserActivityPermissionsDispatcher.refreshDataWithPermissionCheck(this, false);
}
示例15: onCreate
import com.jaeger.library.StatusBarUtil; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity1);
//设置颜色
StatusBarUtil.setColor(Activity1.this, Color.BLUE );
}