(一)布局 <android.support.v7.widget.Toolbar android:layout_width="match_parent" android:layout_height="?attr/actionBarSize" //高使用系统固定的 app:contentInsetStart="0dp" //使布局中文字居中 android:background="@color/colorAccent"> //布局中必须加上TextView-----(标题) <TextView android:layout_width="match_parent" android:layout_height="match_parent" android:gravity="center" android:text="首页" android:textColor="@android:color/white" android:textSize="22sp" /> </android.support.v7.widget.Toolbar>
Toolbar的简单使用--------(模拟器项目的标题)
最新推荐文章于 2022-08-09 15:45:32 发布