mirror of
https://github.com/FatttSnake/OxygenToolbox.git
synced 2026-04-06 11:21:27 +08:00
Dynamic add ToolButtons
Add Navigation menu Change home_fragment's padding Unified color management
This commit is contained in:
@@ -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>
|
||||
@@ -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"
|
||||
@@ -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>
|
||||
@@ -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"
|
||||
22
app/src/main/res/layout/fragment_theme.xml
Normal file
22
app/src/main/res/layout/fragment_theme.xml
Normal 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>
|
||||
@@ -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>
|
||||
8
app/src/main/res/layout/tool_button.xml
Normal file
8
app/src/main/res/layout/tool_button.xml
Normal 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>
|
||||
Reference in New Issue
Block a user