标签:sources display rac match hid images popup roi closed
两个标题的,右边一个按钮
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>
标签:sources display rac match hid images popup roi closed
原文地址:http://www.cnblogs.com/yansc/p/7607565.html