
Android
咸鱼码农
这个作者很懒,什么都没留下…
展开
-
Android折叠式工具栏的实现(CollapsingToolbar的应用)
先添加依赖库的代码在build.gradle中,由于依赖库代码一直更新,还请直接去官网查找。 在activity_main.xml文件中添加AppBarLayout <android.support.design.widget.AppBarLayout android:layout_width="match_parent" android:layout_height="wrap_content"> </android.support.design.widget.Coordinat.原创 2020-11-11 21:44:22 · 849 阅读 · 0 评论 -
ToolBar常用的功能的实现
属性方法 属性方法 描述 setNavigation() 设置左侧的导航栏图标 setTitle() 设置主题文字 setLogo() 设置工具栏图标 setSubtitle() 设置副标题文字 setNavigationOnClickListener() 设置导航图标的单击事件监听器 setOnMenuItemClickListener() 设置菜单项的点击事件 使用简介 打开styles.xml文件,将主题样式改为没有ActionBar 修改activity_m原创 2020-11-11 20:33:22 · 227 阅读 · 0 评论