Java Code Examples for com.jaeger.library.StatusBarUtil#setTransparent()
The following examples show how to use
com.jaeger.library.StatusBarUtil#setTransparent() .
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: WelcomePage.java From MusicPlayer_XiangDa with GNU General Public License v3.0 | 6 votes |
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_welcomepage); //状态栏透明化 StatusBarUtil.setTransparent(WelcomePage.this); //获取开始时间 Date date = new Date(); final long startTime = date.getTime(); //配置页面渐变动画 initAnimation(); //设置动态字段 initScaleTextView(); //获取结束时间 final long endTime = date.getTime(); //进行时间计算,证页面的展示时间一定 calculateShowTime(startTime, endTime); }
Example 2
Source File: MainActivity.java From MusicPlayer_XiangDa with GNU General Public License v3.0 | 5 votes |
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); //状态栏透明化 StatusBarUtil.setTransparent(this); //获取fragment列表,包含所以fragment List<Fragment> fragmentList = getFragmentList(); //获取viewPager控件 ViewPager viewPager = findViewById(R.id.Main_viewPager); //设置viewPager预加载fragment的数量(数量存储于常量池中) viewPager.setOffscreenPageLimit(Constant.MAINFRAGMENTPAGENUM); //获取底部TabLayout mBottomTabLayout = findViewById(R.id.mainActivity_bottomSliderTabLayout); //初始化底部TabLayout mBottomTabLayout.initialize(viewPager, getSupportFragmentManager(), fragmentList, savedInstanceState); //获取用户名 String show_name = Utils.getString(MainActivity.this, Constant.userNameSPKey, "")+" 欢迎你!"; //欢迎语句 Toast.makeText(MainActivity.this,show_name,Toast.LENGTH_LONG).show(); }
Example 3
Source File: RegisterActivity.java From MusicPlayer_XiangDa with GNU General Public License v3.0 | 5 votes |
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_register); //ActionBar隐藏,透明化任务栏 StatusBarUtil.setTransparent(this); //设置状态栏字体颜色为黑色 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {//android6.0以后可以对状态栏文字颜色和图标进行修改 getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR); } //初始化用户名输入框 initUserNameEditText(); //初始化密码输入框 initPasswordEditText(); //初始化图片点击(清除用户名,密码,显示隐藏密码) initImageButton(); //初始化登录按钮 initRegistButton(); //初始化邮箱输入框 initUserEmailEditText(); }
Example 4
Source File: LoginActivity.java From MusicPlayer_XiangDa with GNU General Public License v3.0 | 5 votes |
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_login); //ActionBar隐藏,透明化任务栏 StatusBarUtil.setTransparent(this); //设置状态栏字体颜色为黑色 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {//android6.0以后可以对状态栏文字颜色和图标进行修改 getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR); } //初始化用户名输入框 initUserNameEditText(); //初始化密码输入框 initPasswordEditText(); //初始化图片点击(清除用户名,密码,显示隐藏密码) initImageButton(); //初始化登录按钮 initLoginButton(); }
Example 5
Source File: BaseActivity.java From XposedWechatHelper with GNU General Public License v2.0 | 5 votes |
/** * 初始化状态栏颜色 * 更多详情https://github.com/laobie/StatusBarUtil */ protected void initStatusBar() { if (isStatusBarTransparent()) { StatusBarUtil.setTransparent(BaseActivity.this); return; } StatusBarUtil.setColor(this, (ContextCompat.getColor(this, getStatusBarColor())), 0); }
Example 6
Source File: BaseActivity.java From XposedRimetHelper with GNU General Public License v2.0 | 5 votes |
/** * 初始化状态栏颜色 * 更多详情https://github.com/laobie/StatusBarUtil */ protected void initStatusBar() { if (isStatusBarTransparent()) { StatusBarUtil.setTransparent(BaseActivity.this); return; } StatusBarUtil.setColor(this, (ContextCompat.getColor(this, getStatusBarColor())), 0); }
Example 7
Source File: Activity3.java From Android-StatusBarColor with Artistic License 2.0 | 5 votes |
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity3); //设置全屏 StatusBarUtil.setTransparent( Activity3.this ) ; }
Example 8
Source File: BaseActivityNoActionBar.java From MobileGuard with MIT License | 5 votes |
/** * hide action bar * if you override this method, remember call super.onStart(). */ @Override protected void onStart() { super.onStart(); WindowsUtils.hideActionBar(this); StatusBarUtil.setTransparent(this); }
Example 9
Source File: MusicListActivity.java From MusicPlayer_XiangDa with GNU General Public License v3.0 | 4 votes |
@Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_musiclist); //状态栏透明化 StatusBarUtil.setTransparent(MusicListActivity.this); //获取音乐列表listView musicListView = findViewById(R.id.musicListActivity_musicListView); //检查是否有音乐列表 //音乐列表LinkedList 是直接被持久化处理,现在获取看是否存在列表 list = Utils.getBeanFromSp(this, Constant.MUSICLISTKEY); if (list != null) { if (list.size() == 0) { //空 Toast.makeText(this, "未添加歌曲,点击右上方的搜索按钮可以进行搜索哦~", Toast.LENGTH_LONG).show(); } else { //设置适配器 adapter = new MyAdapter(); musicListView.setAdapter(adapter); } }else{ Toast.makeText(this, "未添加歌曲,点击右上方的搜索按钮可以进行搜索哦~", Toast.LENGTH_LONG).show(); } musicListView.setOnItemClickListener(new AdapterView.OnItemClickListener() { @Override public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) { //设置当前播放歌曲的位置 if (Utils.putInt(MusicListActivity.this, Constant.PLAYINGNUM, i)) { //进入播放页面 Intent intent = new Intent(MusicListActivity.this, PlayerActivity.class); startActivity(intent); finish(); overridePendingTransition(R.anim.next_in, R.anim.next_out); } } }); }