mirror of
https://github.com/FatttSnake/OxygenToolbox.git
synced 2026-04-06 14:11:29 +08:00
Add ToolsButtons
This commit is contained in:
10
app/src/main/res/drawable-v21/ripple_foreground.xml
Normal file
10
app/src/main/res/drawable-v21/ripple_foreground.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ripple xmlns:android="http://schemas.android.com/apk/res/android" android:color="#88cccccc">
|
||||
<item android:id="@android:id/mask">
|
||||
<shape>
|
||||
<!--<solid android:color="#FFFFFF" />-->
|
||||
<solid android:color="#88cccccc" />
|
||||
<corners android:radius="120dp" />
|
||||
</shape>
|
||||
</item>
|
||||
</ripple>
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 252 B |
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="@color/design_default_color_background" />
|
||||
<solid android:color="@color/fold_layout_background" />
|
||||
<corners
|
||||
android:bottomLeftRadius="10dp"
|
||||
android:bottomRightRadius="10dp"/>
|
||||
|
||||
5
app/src/main/res/drawable/button_radius_shape.xml
Normal file
5
app/src/main/res/drawable/button_radius_shape.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="#FFF5F5F5" />
|
||||
<corners android:radius="120dp" />
|
||||
</shape>
|
||||
@@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_pressed="false" android:drawable="@android:color/white"/>
|
||||
<item android:state_pressed="true" android:drawable="@android:color/darker_gray"/>
|
||||
<item android:drawable="@android:color/white"/>
|
||||
</selector>
|
||||
@@ -1,5 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
|
||||
<size android:width="1dp" android:height="1dp"/>
|
||||
<solid android:color="#e1e1e1" />
|
||||
</shape>
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.4 KiB |
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="@color/design_default_color_background" />
|
||||
<solid android:color="@color/fold_layout_background" />
|
||||
<corners
|
||||
android:topLeftRadius="10dp"
|
||||
android:topRightRadius="10dp"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="@color/design_default_color_background" />
|
||||
<solid android:color="@color/fold_layout_background" />
|
||||
<corners
|
||||
android:topLeftRadius="10dp"
|
||||
android:topRightRadius="10dp"/>
|
||||
|
||||
24
app/src/main/res/layout/basic_tool_list.xml
Normal file
24
app/src/main/res/layout/basic_tool_list.xml
Normal file
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:background="@android:color/transparent"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:background="@drawable/bottom_radius_background"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/basicToolsRecyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -8,8 +8,7 @@
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:background="@drawable/top_bottom_radius_background"
|
||||
android:gravity="center_vertical"
|
||||
>
|
||||
android:gravity="center_vertical" >
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView1"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:background="#80CCCCCC"
|
||||
android:background="@color/app_background"
|
||||
tools:context=".ui.home.HomeFragment">
|
||||
|
||||
<com.fatapp.oxygentoolbox.layout.FoldLayout
|
||||
@@ -16,5 +16,12 @@
|
||||
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" />
|
||||
|
||||
</LinearLayout>
|
||||
@@ -1,44 +1,60 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/layout_item_LinearLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@android:color/transparent"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center_vertical"
|
||||
>
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<LinearLayout
|
||||
<com.fatapp.oxygentoolbox.layout.AutoLinefeedLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="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">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView1"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_weight="1"
|
||||
app:srcCompat="@drawable/love" />
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView1"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_weight="6"
|
||||
android:gravity="center_vertical"
|
||||
android:text="工具"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="18sp" />
|
||||
<Button
|
||||
style="@style/ToolsButton"
|
||||
android:text="Button1"/>
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView2"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="15dp"
|
||||
android:layout_weight="1"
|
||||
app:srcCompat="@drawable/arrow" />
|
||||
</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>
|
||||
13
app/src/main/res/values-night/colors.xml
Normal file
13
app/src/main/res/values-night/colors.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="purple_200">#FFBB86FC</color>
|
||||
<color name="purple_500">#FF6200EE</color>
|
||||
<color name="purple_700">#FF3700B3</color>
|
||||
<color name="teal_200">#FF03DAC5</color>
|
||||
<color name="teal_700">#FF018786</color>
|
||||
<color name="black">#FF000000</color>
|
||||
<color name="white">#FFFFFFFF</color>
|
||||
<color name="app_background">#FF202020</color>
|
||||
<color name="fold_layout_background">#FF303030</color>
|
||||
<color name="button_text">#FFFAFAFA</color>
|
||||
</resources>
|
||||
15
app/src/main/res/values-night/styles.xml
Normal file
15
app/src/main/res/values-night/styles.xml
Normal file
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<style name="ToolsButton" parent="Widget.AppCompat.Button">
|
||||
<item name="android:layout_width">wrap_content</item>
|
||||
<item name="android:layout_height">35dp</item>
|
||||
<item name="android:layout_marginStart">5dp</item>
|
||||
<item name="android:layout_marginEnd">5dp</item>
|
||||
<item name="android:layout_marginTop">5dp</item>
|
||||
<item name="android:layout_marginBottom">5dp</item>
|
||||
<item name="android:background">@drawable/button_radius_shape</item>
|
||||
<item name="android:foreground">@drawable/ripple_foreground</item>
|
||||
<item name="android:stateListAnimator">@null</item>
|
||||
<item name="android:textColor">@color/button_text</item>
|
||||
</style>
|
||||
</resources>
|
||||
@@ -1,6 +1,6 @@
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
<!-- Base application theme. -->
|
||||
<style name="Theme.OxygenToolbox" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
|
||||
<style name="Theme.OxygenToolbox" parent="Theme.MaterialComponents.DayNight.DarkActionBar.Bridge">
|
||||
<!-- Primary brand color. -->
|
||||
<item name="colorPrimary">@color/purple_200</item>
|
||||
<item name="colorPrimaryVariant">@color/purple_700</item>
|
||||
|
||||
@@ -7,4 +7,7 @@
|
||||
<color name="teal_700">#FF018786</color>
|
||||
<color name="black">#FF000000</color>
|
||||
<color name="white">#FFFFFFFF</color>
|
||||
<color name="app_background">#FFF5F5F5</color>
|
||||
<color name="fold_layout_background">#FFFFFFFF</color>
|
||||
<color name="button_text">#FF434343</color>
|
||||
</resources>
|
||||
15
app/src/main/res/values/styles.xml
Normal file
15
app/src/main/res/values/styles.xml
Normal file
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<style name="ToolsButton" parent="Widget.AppCompat.Button">
|
||||
<item name="android:layout_width">wrap_content</item>
|
||||
<item name="android:layout_height">35dp</item>
|
||||
<item name="android:layout_marginStart">5dp</item>
|
||||
<item name="android:layout_marginEnd">5dp</item>
|
||||
<item name="android:layout_marginTop">5dp</item>
|
||||
<item name="android:layout_marginBottom">5dp</item>
|
||||
<item name="android:background">@drawable/button_radius_shape</item>
|
||||
<item name="android:foreground">@drawable/ripple_foreground</item>
|
||||
<item name="android:stateListAnimator">@null</item>
|
||||
<item name="android:textColor">@color/button_text</item>
|
||||
</style>
|
||||
</resources>
|
||||
@@ -1,6 +1,6 @@
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
<!-- Base application theme. -->
|
||||
<style name="Theme.OxygenToolbox" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
|
||||
<style name="Theme.OxygenToolbox" parent="Theme.MaterialComponents.DayNight.DarkActionBar.Bridge">
|
||||
<!-- Primary brand color. -->
|
||||
<item name="colorPrimary">@color/purple_500</item>
|
||||
<item name="colorPrimaryVariant">@color/purple_700</item>
|
||||
|
||||
@@ -7,10 +7,10 @@
|
||||
android:shortcutId="main"
|
||||
android:shortcutLongLabel="@string/shortcutLongLabel"
|
||||
android:shortcutShortLabel="@string/shortcutShortLabel">
|
||||
<intent
|
||||
android:action="android.intent.action.VIEW"
|
||||
android:targetClass="com.tencent.mm.ui.LauncherUI"
|
||||
android:targetPackage="com.tencent.mm" />
|
||||
<categories android:name="android.shortcut.conversation" />
|
||||
</shortcut>
|
||||
</shortcuts>
|
||||
<intent
|
||||
android:action="android.intent.action.VIEW"
|
||||
android:targetClass="com.fatapp.oxygentoolbox.MainActivity"
|
||||
android:targetPackage="com.oxygenfatapp.toolbox" />
|
||||
<categories android:name="android.shortcut.conversation" />
|
||||
</shortcut>
|
||||
</shortcuts>
|
||||
Reference in New Issue
Block a user