本文整理汇总了Java中com.jaeger.library.StatusBarUtil.setColorForDrawerLayout方法的典型用法代码示例。如果您正苦于以下问题:Java StatusBarUtil.setColorForDrawerLayout方法的具体用法?Java StatusBarUtil.setColorForDrawerLayout怎么用?Java StatusBarUtil.setColorForDrawerLayout使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.jaeger.library.StatusBarUtil
的用法示例。
在下文中一共展示了StatusBarUtil.setColorForDrawerLayout方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: 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);
}
示例2: 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());
}
示例3: initData
import com.jaeger.library.StatusBarUtil; //导入方法依赖的package包/类
@Override
protected void initData(Bundle savedInstanceState) {
initView();
mSettingFragment = new SettingFragment();
mHomeFragment = new HomeFragment();
mAboutFragment = new AboutFragment();
switchToHomePage();
StatusBarUtil.setColorForDrawerLayout(MainActivity.this,
mDataBinding.drawerlayout, Color.TRANSPARENT);
}
示例4: onCreate
import com.jaeger.library.StatusBarUtil; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity4);
mDrawerLayout = (DrawerLayout) findViewById( R.id.drawer_layout );
mDrawerLayout.setDrawerShadow(R.mipmap.ic_launcher , GravityCompat.START);
StatusBarUtil.setColorForDrawerLayout( Activity4.this , mDrawerLayout , Color.BLUE) ;
}
示例5: setStatusBar
import com.jaeger.library.StatusBarUtil; //导入方法依赖的package包/类
@Override
protected void setStatusBar() {
StatusBarUtil.setColorForDrawerLayout(this,
(DrawerLayout) findViewById(R.id.drawer_layout),
getResources().getColor(R.color.colorPrimaryDark),
0);
}
示例6: setStatusBar
import com.jaeger.library.StatusBarUtil; //导入方法依赖的package包/类
@Override
protected void setStatusBar() {
mStatusBarColor = getResources().getColor(R.color.colorPrimary);
StatusBarUtil.setColorForDrawerLayout(this, (DrawerLayout) findViewById(R.id.drawer_layout), mStatusBarColor, mAlpha);
}