-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
使用时的几个疑问 #7
Comments
1、你可以通过 setToolbarRightButton 来设置一个按钮,也支持原生 menu 菜单,代码设置如下: Menu menu = toolbar.getMenu();
MenuItem menuItem = menu.add(title);
menuItem.setIcon(icon);
menuItem.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);
menuItem.setOnMenuItemClickListener(); xml 的方式,你也可以试试 另外,你可以完全自定义 Toolbar, 只要重写 onCreateToolbar,并返回 null,就不会自动帮你创建 Toolbar 了 2、把你的字体图标放到 assets/fonts 目录下,剩下的参考 MainActivity 是怎样把一个 font 转换成 drawable 的。图标目前只需要传名称即可,晚点会支持 R.drawable.xxx 的形式,现在只需要传 xxx 即可。 3、 可以不使用 DrawerFragment, 在 MainActivity 中,把 setRootFragment(drawerFragment) 改成 setRootFragment(tabBarFragment) 即可 |
感谢回复,我正在偿试你的建议 |
ScrollView 或 NestedScrollView 如果需要作为 fragment 的根 view 并嵌套到 NavigationFragment 中,
需要重写 onCreateToolbar 返回 null.
… 在 2018年2月7日,下午3:33,Louis ***@***.***> 写道:
麻烦请教一下,当布局过长的时候,ScrollView 或者NestedScrollView怎么使用?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#7 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AELuQnFCSa8kwE7CH-AaLsrswnPIQ1sLks5tSVHAgaJpZM4R4HlR>.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
你好,看到你的项目觉的很好,同时也研究了下代码,从中有几个疑问点,希望能够得到解答
1、右上角菜单项支持多个吗?或者支持原生的menu菜单?
2、图标和字体这块怎么用?
3、可以不使用DrawerFragment实现吗?如微信主界面
The text was updated successfully, but these errors were encountered: