android toolbar效果4
两个标题的,右边一个按钮
activity_main.xml:
<android.support.v7.widget.Toolbar
style="style/toolbarStyle"
android:id="@+id/my_toolbar"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:background="?attr/colorPrimary"
android:minHeight="?attr/actionBarSize"
app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"> <TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="微信(32)"
android:layout_gravity="left"
style="@style/TextAppearance.AppCompat.Widget.ActionBar.Title"
android:textSize="18sp"
android:id="@+id/toolbar_title2" /> <TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="事业部讨论群"
android:layout_gravity="center"
style="@style/TextAppearance.AppCompat.Widget.ActionBar.Title"
android:id="@+id/toolbar_title" /> <ImageView
android:id="@+id/bluetoothState"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/fm_detailitem_walk"
android:contentDescription="content_description_bluetooth_status"
android:padding="8dp"
android:layout_marginRight="10dp"
android:layout_gravity="right"/>
</android.support.v7.widget.Toolbar>
styles.xml
<resources> <!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item> <item name="toolbarStyle">@style/Widget.AppCompat.Toolbar</item>
</style> </resources>
android toolbar效果4的更多相关文章
- android toolbar效果3
Title居中,只有一个右边按钮 activity_main.xml: <?xml version="1.0" encoding="utf-8"?> ...
- android toolbar效果2
只有一个按钮的情况 <resources> <string name="app_name">照片</string></resources& ...
- android toolbar效果
layout下的layout_main.xml: <?xml version="1.0" encoding="utf-8"?> <Relati ...
- [置顶]
xamarin android toolbar(踩坑完全入门详解)
网上关于toolbar的教程有很多,很多新手,在使用toolbar的时候踩坑实在太多了,不好好总结一下,实在浪费.如果你想学习toolbar,你肯定会去去搜索androd toolbar,既然你能看到 ...
- Android Toolbar中的title居中问题
版权声明:本文为xing_star原创文章,转载请注明出处! 本文同步自http://javaexception.com/archives/167 Android Toolbar中的title居中问题 ...
- Android动画效果之自定义ViewGroup添加布局动画
前言: 前面几篇文章介绍了补间动画.逐帧动画.属性动画,大部分都是针对View来实现的动画,那么该如何为了一个ViewGroup添加动画呢?今天结合自定义ViewGroup来学习一下布局动画.本文将通 ...
- Android动画效果之Property Animation进阶(属性动画)
前言: 前面初步认识了Android的Property Animation(属性动画)Android动画效果之初识Property Animation(属性动画)(三),并且利用属性动画简单了补间动画 ...
- Android动画效果之初识Property Animation(属性动画)
前言: 前面两篇介绍了Android的Tween Animation(补间动画) Android动画效果之Tween Animation(补间动画).Frame Animation(逐帧动画)Andr ...
- Android动画效果之Frame Animation(逐帧动画)
前言: 上一篇介绍了Android的Tween Animation(补间动画) Android动画效果之Tween Animation(补间动画),今天来总结下Android的另外一种动画Frame ...
随机推荐
- SQL语句复制父子级表数据
原始表Book数据如下: id为自增长整数,text为内容,pid为上级IDid text pid1 第一层 02 数学 03 第二层 14 语文 15 第三层 36 英语 3…………………… 现要求 ...
- 微信小程序des加密、PHP des解密
最近在做对小程序传输数据进行加密,加密方法有很多,使用的是des对称加密 采用的是CBC模式, 引用的插件为tripledes.js,https://github.com/Favour1111in/h ...
- 马凯军201771010116《面向对象程序设计Java》第八周学习总结
一,理论知识学习部分 6.1.1 接口概念 两种含义:一,Java接口,Java语言中存在的结构,有特定的语法和结构:二,一个类所具有的方法的特征集合,是一种逻辑上的抽象.前者叫做“Java接口”,后 ...
- Linux 创建虚拟机,配置网卡,桥接,连接XShell
一.新建虚拟机 1.“root” 输入密码: 2.看虚拟机的IP地址 “ifconfig” 二.配置网卡 1.更改设置(打开vim编辑) “vim /etc/sysconfig/network- ...
- python爬虫出现的状态码
1.200 --- 一切正常访问 2.301 --- 重定向新的url,永久性的 3.302 --- 重定向到临时url 4.304 --- 请求的资源未更新 5.400 --- 非法请求 6.401 ...
- linux 内存使用情况详解
一:首先是先登录 二:查看当前目录 命令:df -h 三:查看具体文件夹占用情况 命令:du --max-depth=1 -h /data/ 或者:为了快算显示,同时也只是想查看目录整体占用大小 命 ...
- JAVA002标识符的命名规则、关键字
标志符命名规则: 1.标志符可以由字母.数字.下划线(_)和美元符号($)组成,不能以数字开头($sen.Void) 2.标志符严格区分大小写 3.标志符不能是Java的关键字和保留字(eg:publ ...
- java基础(3)java常用API
1 ArrayList集合 01 创建 import java.util.ArrayList; /* 泛型:装在集合中的元素,全都是统一的一种类型.泛型必须是引用类型,不能是基本数据类型 */ pub ...
- crontab 相关
修改编辑器 select-editor 查看服务状态 service cron status (linux下为crond ,ubuntu为cron) 1-59/2 1,10,12 * * * ...
- 一篇讲解如何调试pg 扩展的文章
以下链接这片关于pg 扩展调试的文章挺不错,记录下 http://big-elephants.com/2015-10/writing-postgres-extensions-part-iii/ ...