style: lots of changes
- move demo-app, demo-module to samples - rename yukihookapi to yukihookapi-core - optimize code - other small changes
132
samples/demo-app/src/main/res/layout/activity_main.xml
Normal file
@@ -0,0 +1,132 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fillViewport="true"
|
||||
android:scrollbars="none"
|
||||
tools:ignore="HardcodedText,ContentDescription">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:src="@mipmap/ic_face_unhappy" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="25dp"
|
||||
android:text="@string/test_string"
|
||||
android:textSize="17.5sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/app_demo_first_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:text="sample"
|
||||
android:textSize="17.5sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/app_demo_second_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:text="sample"
|
||||
android:textSize="17.5sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/app_demo_eleventh_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:text="sample"
|
||||
android:textSize="17.5sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/app_demo_third_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:text="sample"
|
||||
android:textSize="17.5sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/app_demo_fourth_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:text="sample"
|
||||
android:textSize="17.5sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/app_demo_seventh_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:text="sample"
|
||||
android:textSize="17.5sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/app_demo_eighth_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:text="sample"
|
||||
android:textSize="17.5sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/app_demo_ninth_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:text="sample"
|
||||
android:textSize="17.5sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/app_demo_tenth_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:text="sample"
|
||||
android:textSize="17.5sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/app_demo_sixth_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:text="sample"
|
||||
android:textSize="17.5sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/app_demo_fifth_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:text="sample"
|
||||
android:textSize="17.5sp" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:src="@android:mipmap/sym_def_app_icon" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/app_demo_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Click Me!"
|
||||
android:textAllCaps="false" />
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@color/ic_launcher_background"/>
|
||||
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
|
||||
</adaptive-icon>
|
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@color/ic_launcher_background"/>
|
||||
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
|
||||
</adaptive-icon>
|
BIN
samples/demo-app/src/main/res/mipmap-hdpi/ic_launcher.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 2.4 KiB |
BIN
samples/demo-app/src/main/res/mipmap-hdpi/ic_launcher_round.png
Normal file
After Width: | Height: | Size: 3.9 KiB |
BIN
samples/demo-app/src/main/res/mipmap-mdpi/ic_launcher.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.5 KiB |
BIN
samples/demo-app/src/main/res/mipmap-mdpi/ic_launcher_round.png
Normal file
After Width: | Height: | Size: 2.4 KiB |
BIN
samples/demo-app/src/main/res/mipmap-xhdpi/ic_launcher.png
Normal file
After Width: | Height: | Size: 2.7 KiB |
After Width: | Height: | Size: 3.3 KiB |
BIN
samples/demo-app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
Normal file
After Width: | Height: | Size: 5.7 KiB |
BIN
samples/demo-app/src/main/res/mipmap-xxhdpi/ic_face_unhappy.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
samples/demo-app/src/main/res/mipmap-xxhdpi/ic_icon.png
Normal file
After Width: | Height: | Size: 24 KiB |
BIN
samples/demo-app/src/main/res/mipmap-xxhdpi/ic_launcher.png
Normal file
After Width: | Height: | Size: 4.1 KiB |
After Width: | Height: | Size: 5.3 KiB |
After Width: | Height: | Size: 8.8 KiB |
BIN
samples/demo-app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
Normal file
After Width: | Height: | Size: 5.6 KiB |
After Width: | Height: | Size: 7.3 KiB |
After Width: | Height: | Size: 13 KiB |
19
samples/demo-app/src/main/res/values-night/themes.xml
Normal file
@@ -0,0 +1,19 @@
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
<!-- Base application theme. -->
|
||||
<style name="Theme.Default" parent="Theme.Material3.DayNight">
|
||||
<!-- Primary brand color. -->
|
||||
<item name="colorPrimary">@color/yuki_theme_color</item>
|
||||
<item name="colorPrimaryVariant">@color/yuki_theme_color</item>
|
||||
<item name="colorOnPrimary">@color/white</item>
|
||||
<!-- Secondary brand color. -->
|
||||
<item name="colorSecondary">@color/yuki_accent_color</item>
|
||||
<item name="colorSecondaryVariant">@color/yuki_accent_color</item>
|
||||
<item name="colorOnSecondary">@color/black</item>
|
||||
<!-- Status bar color. -->
|
||||
<item name="android:statusBarColor">@color/yuki_dark_color</item>
|
||||
<item name="android:navigationBarColor">@android:color/background_dark</item>
|
||||
<item name="android:windowLightStatusBar" tools:targetApi="m">false</item>
|
||||
<!-- Customize your theme here. -->
|
||||
<item name="android:windowSplashScreenAnimatedIcon" tools:targetApi="s">@mipmap/ic_launcher</item>
|
||||
</style>
|
||||
</resources>
|
9
samples/demo-app/src/main/res/values/colors.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="yuki_theme_color">#FFEBAD70</color>
|
||||
<color name="yuki_accent_color">#FF777777</color>
|
||||
<color name="yuki_light_color">#FFFDF5F3</color>
|
||||
<color name="yuki_dark_color">#FF2D2726</color>
|
||||
<color name="black">#FF000000</color>
|
||||
<color name="white">#FFFFFFFF</color>
|
||||
</resources>
|
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="ic_launcher_background">#F4B278</color>
|
||||
</resources>
|
4
samples/demo-app/src/main/res/values/strings.xml
Normal file
@@ -0,0 +1,4 @@
|
||||
<resources>
|
||||
<string name="app_name">YukiHookDemoApp</string>
|
||||
<string name="test_string">I am feel not good</string>
|
||||
</resources>
|
19
samples/demo-app/src/main/res/values/themes.xml
Normal file
@@ -0,0 +1,19 @@
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
<!-- Base application theme. -->
|
||||
<style name="Theme.Default" parent="Theme.Material3.DayNight">
|
||||
<!-- Primary brand color. -->
|
||||
<item name="colorPrimary">@color/yuki_theme_color</item>
|
||||
<item name="colorPrimaryVariant">@color/yuki_theme_color</item>
|
||||
<item name="colorOnPrimary">@color/white</item>
|
||||
<!-- Secondary brand color. -->
|
||||
<item name="colorSecondary">@color/yuki_accent_color</item>
|
||||
<item name="colorSecondaryVariant">@color/yuki_accent_color</item>
|
||||
<item name="colorOnSecondary">@color/black</item>
|
||||
<!-- Status bar color. -->
|
||||
<item name="android:statusBarColor">@color/yuki_light_color</item>
|
||||
<item name="android:navigationBarColor">@android:color/background_light</item>
|
||||
<item name="android:windowLightStatusBar" tools:targetApi="m">true</item>
|
||||
<!-- Customize your theme here. -->
|
||||
<item name="android:windowSplashScreenAnimatedIcon" tools:targetApi="s">@mipmap/ic_launcher</item>
|
||||
</style>
|
||||
</resources>
|