本文整理了Java中android.support.v7.widget.Toolbar.setNavigationIcon()
方法的一些代码示例,展示了Toolbar.setNavigationIcon()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Toolbar.setNavigationIcon()
方法的具体详情如下:
包路径:android.support.v7.widget.Toolbar
类名称:Toolbar
方法名:setNavigationIcon
暂无
代码示例来源:origin: smuyyh/BookReader
@Override
public void initToolBar() {
mCommonToolbar.setTitle(R.string.subject_book_list_detail);
mCommonToolbar.setNavigationIcon(R.drawable.ab_back);
}
代码示例来源:origin: smuyyh/BookReader
@Override
public void initToolBar() {
mCommonToolbar.setTitle("设置");
mCommonToolbar.setNavigationIcon(R.drawable.ab_back);
}
代码示例来源:origin: smuyyh/BookReader
@Override
public void initToolBar() {
mCommonToolbar.setTitle("详情");
mCommonToolbar.setNavigationIcon(R.drawable.ab_back);
}
代码示例来源:origin: smuyyh/BookReader
@Override
public void initToolBar() {
mCommonToolbar.setTitle("WiFi传书");
mCommonToolbar.setNavigationIcon(R.drawable.ab_back);
}
代码示例来源:origin: smuyyh/BookReader
@Override
public void initToolBar() {
mCommonToolbar.setTitle(R.string.subject_book_list);
mCommonToolbar.setNavigationIcon(R.drawable.ab_back);
}
代码示例来源:origin: smuyyh/BookReader
@Override
public void initToolBar() {
mCommonToolbar.setTitle("书荒互助区");
mCommonToolbar.setNavigationIcon(R.drawable.ab_back);
}
代码示例来源:origin: smuyyh/BookReader
@Override
public void initToolBar() {
mCommonToolbar.setTitle("书荒互助区详情");
mCommonToolbar.setNavigationIcon(R.drawable.ab_back);
}
代码示例来源:origin: smuyyh/BookReader
@Override
public void initToolBar() {
mCommonToolbar.setTitle("书评区");
mCommonToolbar.setNavigationIcon(R.drawable.ab_back);
}
代码示例来源:origin: smuyyh/BookReader
@Override
public void initToolBar() {
mCommonToolbar.setTitle("书评详情");
mCommonToolbar.setNavigationIcon(R.drawable.ab_back);
}
代码示例来源:origin: smuyyh/BookReader
@Override
public void initToolBar() {
mCommonToolbar.setNavigationIcon(R.drawable.ab_back);
mCommonToolbar.setTitle(R.string.book_detail);
}
代码示例来源:origin: rey5137/material
public NavigationManager(NavigationDrawerDrawable navigationIcon, Toolbar toolbar){
mToolbar = toolbar;
mNavigationIcon = navigationIcon;
mToolbar.setNavigationIcon(mNavigationVisible ? mNavigationIcon : null);
mToolbar.setNavigationOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
onNavigationClick();
}
});
mAnimationDuration = toolbar.getResources().getInteger(android.R.integer.config_shortAnimTime);
}
代码示例来源:origin: frogermcs/InstaMaterial
protected void setupToolbar() {
if (toolbar != null) {
setSupportActionBar(toolbar);
toolbar.setNavigationIcon(R.drawable.ic_menu_white);
}
}
代码示例来源:origin: smuyyh/BookReader
@Override
public void initToolBar() {
mIsDiscussion = getIntent().getBooleanExtra(INTENT_DIS, false);
if (mIsDiscussion) {
mCommonToolbar.setTitle("综合讨论区");
} else {
mCommonToolbar.setTitle("原创区");
}
mCommonToolbar.setNavigationIcon(R.drawable.ab_back);
}
代码示例来源:origin: smuyyh/BookReader
@Override
public void initToolBar() {
author = getIntent().getStringExtra(INTENT_AUTHOR);
mCommonToolbar.setTitle(author);
mCommonToolbar.setNavigationIcon(R.drawable.ab_back);
}
代码示例来源:origin: smuyyh/BookReader
@Override
public void initToolBar() {
cate = getIntent().getStringExtra(INTENT_CATE_NAME);
if (menuItem != null) {
menuItem.setTitle(cate);
}
gender = getIntent().getStringExtra(INTENT_GENDER);
mCommonToolbar.setTitle(cate);
mCommonToolbar.setNavigationIcon(R.drawable.ab_back);
}
代码示例来源:origin: smuyyh/BookReader
@Override
public void initToolBar() {
title = getIntent().getStringExtra(INTENT_TITLE).split(" ")[0];
id = getIntent().getStringExtra(BUNDLE_ID);
mCommonToolbar.setTitle(title);
mCommonToolbar.setNavigationIcon(R.drawable.ab_back);
}
代码示例来源:origin: smuyyh/BookReader
@Override
public void initToolBar() {
String filePath = Uri.decode(getIntent().getDataString().replace("file://", ""));
String fileName = filePath.substring(filePath.lastIndexOf("/") + 1, filePath.lastIndexOf("."));
mCommonToolbar.setTitle(fileName);
mCommonToolbar.setNavigationIcon(R.drawable.ab_back);
}
代码示例来源:origin: smuyyh/BookReader
@Override
public void initToolBar() {
chmFilePath = Uri.decode(getIntent().getDataString().replace("file://", ""));
chmFileName = chmFilePath.substring(chmFilePath.lastIndexOf("/") + 1, chmFilePath.lastIndexOf("."));
mCommonToolbar.setTitle(chmFileName);
mCommonToolbar.setNavigationIcon(R.drawable.ab_back);
}
代码示例来源:origin: scwang90/SmartRefreshLayout
private void setThemeColor(int colorPrimary, int colorPrimaryDark) {
mToolbar.setBackgroundResource(colorPrimary);
mToolbar.setTitleTextColor(ContextCompat.getColor(this, android.R.color.white));
mToolbar.setNavigationIcon(R.drawable.ic_arrow_back_white_24dp);
mRefreshLayout.setPrimaryColorsId(colorPrimary, android.R.color.white);
if (Build.VERSION.SDK_INT >= 21) {
getWindow().setStatusBarColor(ContextCompat.getColor(this, colorPrimaryDark));
}
if (Build.VERSION.SDK_INT >= 23) {
Window window = getWindow();
int systemUiVisibility = window.getDecorView().getSystemUiVisibility();
systemUiVisibility &= ~View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR;
window.getDecorView().setSystemUiVisibility(systemUiVisibility);
}
}
}
代码示例来源:origin: rey5137/material
@Override
public void onThemeChanged(@Nullable ThemeManager.OnThemeChangedEvent event) {
int style = ThemeManager.getInstance().getCurrentStyle(mStyleId);
if(mCurrentStyle != style){
mCurrentStyle = style;
NavigationDrawerDrawable drawable = new NavigationDrawerDrawable.Builder(mToolbar.getContext(), mCurrentStyle).build();
drawable.switchIconState(mNavigationIcon.getIconState(), false);
mNavigationIcon = drawable;
mToolbar.setNavigationIcon(mNavigationVisible ? mNavigationIcon : null);
}
}
内容来源于网络,如有侵权,请联系作者删除!