feat: 添加 MyTermuxActivity 菜单及工具栏功能
- MainActivity 添加 MyTermuxActivity 菜单项 - 配置 MyTermuxActivity 注册到 AndroidManifest.xml - 添加 Toolbar 布局并初始化工具栏 - 设置一级标题应用名称、二级标题活动名称 - 添加返回按钮导航逻辑 修改文件:MainActivity.java, MyTermuxActivity.java, activity_my_termux.xml, toolbar_main.xml, strings.xml, AndroidManifest.xml, gradlew
This commit is contained in:
@@ -1,9 +1,24 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout
|
||||
<FrameLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="?attr/colorPrimary"
|
||||
app:title="@string/app_name"
|
||||
app:subtitle="@string/my_termux_activity"
|
||||
app:titleTextColor="@android:color/white"
|
||||
app:subtitleTextColor="@android:color/white"/>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="bottom"
|
||||
android:layout_weight="1"/>
|
||||
|
||||
</FrameLayout>
|
||||
@@ -5,6 +5,9 @@
|
||||
android:id="@+id/item_home"
|
||||
android:title="HOME"/>
|
||||
<item
|
||||
android:id="@+id/item_mytermux"
|
||||
android:title="MyTermuxActivity"/>
|
||||
<item
|
||||
android:id="@+id/item_settings"
|
||||
android:title="Settings"/>
|
||||
<item
|
||||
|
||||
@@ -11,4 +11,5 @@
|
||||
<string name="cn2_switch_disabled">金抖云 X</string>
|
||||
<string name="tileservice_name">WinBoLL</string>
|
||||
<string name="toolbar_icon_description">WinBoLL APP</string>
|
||||
<string name="my_termux_activity">MyTermuxActivity</string>
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user