原生标题栏示例代码
简要描述
主要协助云上越秀App设置标题栏;
UI标注及切图参考
带WebView的页面导航设计图
返回按钮切图:
布局xml文件代码
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
android:orientation="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="34dp">
<ImageView
android:id="@+id/img_tool_back"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginLeft="15dp"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:src="@drawable/back_black" />
<TextView
android:id="@+id/tv_title"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_centerInParent="true"
android:gravity="center"
android:textColor="@color/ui_dialog_title"
android:textSize="18sp"
tools:text="test"
/>
</RelativeLayout>
<WebView
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" />
</LinearLayout>