Dynamic add ToolButtons

Add Navigation menu
Change home_fragment's padding
Unified color management
This commit is contained in:
2022-03-21 21:05:32 +08:00
parent e05806f335
commit 0cd76cf398
41 changed files with 322 additions and 174 deletions

View File

@@ -19,6 +19,5 @@
android:layout_height="match_parent"
android:layout_gravity="start"
android:fitsSystemWindows="true"
app:headerLayout="@layout/nav_header_main"
app:menu="@menu/activity_main_drawer" />
android:background="@color/app_background" />
</androidx.drawerlayout.widget.DrawerLayout>

View File

@@ -4,10 +4,10 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".ui.gallery.GalleryFragment">
tools:context=".ui.about.AboutFragment">
<TextView
android:id="@+id/text_gallery"
android:id="@+id/text_about"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"

View File

@@ -1,27 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<ScrollView 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:id="@+id/fragment_home"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@color/app_background"
android:orientation="vertical"
tools:context=".ui.home.HomeFragment">
<com.fatapp.oxygentoolbox.layout.FoldLayout
android:id="@+id/foldLayout"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layoutId="@layout/fold_layout" />
<com.fatapp.oxygentoolbox.layout.FoldLayout
android:id="@+id/foldLayout1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layoutId="@layout/fold_layout" />
android:paddingBottom="10dp"
android:orientation="vertical">
</LinearLayout>
<com.fatapp.oxygentoolbox.layout.FoldLayout
android:id="@+id/foldLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layoutId="@layout/fold_layout"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<com.fatapp.oxygentoolbox.layout.FoldLayout
android:id="@+id/foldLayout1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layoutId="@layout/fold_layout"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</LinearLayout>
</ScrollView>

View File

@@ -4,10 +4,10 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".ui.slideshow.SlideshowFragment">
tools:context=".ui.setting.SettingFragment">
<TextView
android:id="@+id/text_slideshow"
android:id="@+id/text_setting"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"

View File

@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout 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"
tools:context=".ui.theme.ThemeFragment">
<TextView
android:id="@+id/text_theme"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:textAlignment="center"
android:textSize="20sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -9,52 +9,13 @@
android:gravity="center_vertical">
<com.fatapp.oxygentoolbox.layout.AutoLinefeedLayout
android:id="@+id/layout_item_AutoLinefeedLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:background="@drawable/bottom_radius_background"
android:gravity="center_vertical">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<Button
style="@style/ToolsButton"
android:text="Button1"/>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<Button
style="@style/ToolsButton"
android:text="Button2"/>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<Button
style="@style/ToolsButton"
android:text="Button3"/>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<Button
style="@style/ToolsButton"
android:text="Button4"/>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<Button
style="@style/ToolsButton"
android:text="Button5"/>
</LinearLayout>
</com.fatapp.oxygentoolbox.layout.AutoLinefeedLayout>
<!--</LinearLayout>-->
</LinearLayout>

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:layout_height="wrap_content"
android:layout_width="wrap_content"
xmlns:android="http://schemas.android.com/apk/res/android">
<Button
android:id="@+id/toolButton"
style="@style/ToolsButton" />
</LinearLayout>