forked from zfdang/zSMTH-Android
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
在主页面用底部导航栏代替了浮动按钮,以充分利用日益增大的屏幕纵向空间;调整设置页面的初始值,使之更加适应当前实际情况;微调信箱页面;去掉了…
…多余模块
- Loading branch information
Showing
11 changed files
with
762 additions
and
953 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1,335 changes: 609 additions & 726 deletions
1,335
app/src/main/java/com/zfdang/zsmth_android/MainActivity.java
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,53 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:app="http://schemas.android.com/apk/res-auto" | ||
xmlns:tools="http://schemas.android.com/tools" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:fitsSystemWindows="true" | ||
tools:context="com.zfdang.zsmth_android.MainActivity" | ||
> | ||
tools:context="com.zfdang.zsmth_android.MainActivity"> | ||
|
||
<com.google.android.material.appbar.AppBarLayout | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:theme="@style/AppTheme.AppBarOverlay" | ||
> | ||
|
||
<!--https://guides.codepath.com/android/Using-the-App-ToolBar--> | ||
<!--http://developer.android.com/reference/android/support/v7/widget/Toolbar.html--> | ||
<androidx.appcompat.widget.Toolbar | ||
android:id="@+id/toolbar" | ||
<com.google.android.material.appbar.AppBarLayout | ||
android:id="@+id/appbarlayout" | ||
android:layout_width="match_parent" | ||
android:layout_height="@dimen/zsmth_actionbar_size" | ||
android:background="?attr/colorPrimary" | ||
android:padding="0dp" | ||
android:theme="@style/ThemeOverlay.ToolBar" | ||
app:popupTheme="@style/AppTheme.PopupOverlay" | ||
app:layout_scrollFlags="scroll|enterAlways" | ||
app:titleTextAppearance="@style/Toolbar.TitleText" | ||
/> | ||
android:layout_height="wrap_content" | ||
android:theme="@style/AppTheme.AppBarOverlay"> | ||
|
||
</com.google.android.material.appbar.AppBarLayout> | ||
<!--https://guides.codepath.com/android/Using-the-App-ToolBar--> | ||
<!--http://developer.android.com/reference/android/support/v7/widget/Toolbar.html--> | ||
<androidx.appcompat.widget.Toolbar | ||
android:id="@+id/toolbar" | ||
android:layout_width="match_parent" | ||
android:layout_height="@dimen/zsmth_actionbar_size" | ||
android:background="?attr/colorPrimary" | ||
android:padding="0dp" | ||
android:theme="@style/ThemeOverlay.ToolBar" | ||
app:layout_scrollFlags="scroll|enterAlways" | ||
app:popupTheme="@style/AppTheme.PopupOverlay" | ||
app:titleTextAppearance="@style/Toolbar.TitleText" /> | ||
|
||
<include layout="@layout/content_main"/> | ||
</com.google.android.material.appbar.AppBarLayout> | ||
|
||
<com.google.android.material.floatingactionbutton.FloatingActionButton | ||
android:id="@+id/fab" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_gravity="bottom|end" | ||
android:layout_margin="@dimen/fab_margin" | ||
app:fabSize="mini" | ||
android:src="@drawable/zpad" | ||
/> | ||
<include | ||
layout="@layout/content_main" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:layout_above="@+id/mainactivity_bottomNavigationView" | ||
android:layout_below="@+id/appbarlayout" /> | ||
|
||
</androidx.coordinatorlayout.widget.CoordinatorLayout> | ||
<com.google.android.material.bottomnavigation.BottomNavigationView | ||
android:id="@+id/mainactivity_bottomNavigationView" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_alignParentStart="true" | ||
android:layout_alignParentEnd="true" | ||
android:layout_alignParentBottom="true" | ||
android:layout_gravity="bottom" | ||
android:background="@color/colorPrimaryDark" | ||
app:itemBackground="@drawable/nav_item_background" | ||
app:itemIconTint="@color/white" | ||
app:itemTextColor="@color/white" | ||
app:menu="@menu/bottom_nav_menu" | ||
app:labelVisibilityMode="labeled" | ||
tools:targetApi="n" /> | ||
</RelativeLayout> |
Oops, something went wrong.