style: lots of changes
- move demo-app, demo-module to samples - rename yukihookapi to yukihookapi-core - optimize code - other small changes
@@ -0,0 +1,28 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportWidth="108"
|
||||
android:viewportHeight="108">
|
||||
<group
|
||||
android:scaleX="0.0030033707"
|
||||
android:scaleY="0.0030033707"
|
||||
android:translateX="23.132023"
|
||||
android:translateY="21.185392">
|
||||
<path
|
||||
android:fillColor="#FFDABC"
|
||||
android:pathData="m11443,12167c24,43 4,-38 25,72l8,695h856c0,-918 4,-1837 6,-2755 1,-435 60,-2522 -12,-2773h-846c-54,208 -15,1255 -14,1549 1,529 3,1057 4,1586 4,2028 -1973,2072 -2539,1286 -287,-398 -323,-668 -321,-1258 2,-454 60,-2931 -12,-3163l-846,0c-41,170 -11,2199 -10,2550 2,833 -73,1594 304,2256 514,901 1772,1112 2698,578 142,-82 259,-166 369,-269 53,-50 116,-114 161,-173 111,-143 43,-125 169,-181z"
|
||||
android:strokeWidth="0.843583" />
|
||||
<path
|
||||
android:fillColor="#D38055"
|
||||
android:pathData="m14543,10345 l213,1395 -2232,236 50,540c8,3 19,-2 23,7 4,8 17,5 22,6 34,5 24,7 68,7l2163,-234 262,1740 -2688,299c-22,137 34,400 48,546l2729,-297 312,2039 580,-66 -289,-2042 2626,-288 -47,-520c-87,-33 -203,-5 -310,7l-1004,110c-308,34 -1078,157 -1340,132l-266,-1732 2245,-239 -63,-555 -2250,231c-139,-305 -104,-1178 -251,-1413l-531,63c-75,22 -35,8 -70,29z"
|
||||
android:strokeWidth="0.843583" />
|
||||
<path
|
||||
android:fillColor="#FFE6D1"
|
||||
android:pathData="m4801,9789c75,105 48,257 48,399h821c-10,-103 -18,-224 40,-304 1,-142 537,-994 644,-1176l2019,-3481 -993,-15c-98,23 -239,355 -292,447 -314,546 -1731,3182 -1823,3262 -104,-48 -452,-754 -536,-906L3698,6154c-89,-156 -163,-310 -257,-467 -65,-110 -220,-371 -247,-475l-1055,0z"
|
||||
android:strokeWidth="0.843583" />
|
||||
<path
|
||||
android:fillColor="#FFDABC"
|
||||
android:pathData="m5710,9884c-59,79 -51,201 -40,304h-821c0,-142 27,-294 -48,-399l6,3133 899,12z"
|
||||
android:strokeWidth="0.843583" />
|
||||
</group>
|
||||
</vector>
|
||||
213
samples/demo-module/src/main/res/layout/activity_main.xml
Normal file
@@ -0,0 +1,213 @@
|
||||
<?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">
|
||||
|
||||
<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">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="50dp"
|
||||
android:layout_marginRight="50dp"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:gravity="center|start"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/module_demo_active_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center|start"
|
||||
android:singleLine="true"
|
||||
android:text="sample"
|
||||
android:textSize="18sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/module_demo_active_zh_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:alpha="0.85"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center|start"
|
||||
android:singleLine="true"
|
||||
android:text="sample"
|
||||
android:textSize="15sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/module_demo_framework_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center|start"
|
||||
android:singleLine="true"
|
||||
android:text="sample"
|
||||
android:textSize="18sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/module_demo_framework_zh_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:alpha="0.85"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center|start"
|
||||
android:singleLine="true"
|
||||
android:text="sample"
|
||||
android:textSize="15sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/module_demo_api_version_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center|start"
|
||||
android:singleLine="true"
|
||||
android:text="sample"
|
||||
android:textSize="18sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/module_demo_api_version_zh_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:alpha="0.85"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center|start"
|
||||
android:singleLine="true"
|
||||
android:text="sample"
|
||||
android:textSize="15sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/module_demo_yuki_hook_api_version_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center|start"
|
||||
android:singleLine="true"
|
||||
android:text="sample"
|
||||
android:textSize="18sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/module_demo_yuki_hook_api_version_zh_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:alpha="0.85"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center|start"
|
||||
android:singleLine="true"
|
||||
android:text="sample"
|
||||
android:textSize="15sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/module_demo_new_xshare_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center|start"
|
||||
android:singleLine="true"
|
||||
android:text="sample"
|
||||
android:textSize="18sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/module_demo_new_xshare_zh_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:alpha="0.85"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center|start"
|
||||
android:singleLine="true"
|
||||
android:text="sample"
|
||||
android:textSize="15sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/module_demo_res_hook_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center|start"
|
||||
android:singleLine="true"
|
||||
android:text="sample"
|
||||
android:textSize="18sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/module_demo_res_hook_zh_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="25dp"
|
||||
android:alpha="0.85"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center|start"
|
||||
android:singleLine="true"
|
||||
android:text="sample"
|
||||
android:textSize="15sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center|start"
|
||||
android:singleLine="true"
|
||||
android:text="Leave something in there"
|
||||
android:textSize="15sp" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/module_demo_edit_text"
|
||||
android:layout_width="250dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="Please enter the text"
|
||||
android:singleLine="true"
|
||||
android:textSize="18sp"
|
||||
tools:ignore="Autofill,LabelFor,TextFields" />
|
||||
</LinearLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/module_demo_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:text="Save Test Data"
|
||||
android:textAllCaps="false" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/module_demo_frg_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Open PreferenceFragment"
|
||||
android:textAllCaps="false" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/module_demo_com_time_stamp_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="25dp"
|
||||
android:alpha="0.45"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center|start"
|
||||
android:singleLine="true"
|
||||
android:text="placeholder"
|
||||
android:textSize="13sp" />
|
||||
</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-module/src/main/res/mipmap-hdpi/ic_launcher.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 2.4 KiB |
|
After Width: | Height: | Size: 3.9 KiB |
BIN
samples/demo-module/src/main/res/mipmap-mdpi/ic_launcher.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 2.4 KiB |
BIN
samples/demo-module/src/main/res/mipmap-xhdpi/ic_launcher.png
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 5.7 KiB |
BIN
samples/demo-module/src/main/res/mipmap-xxhdpi/ic_face_happy.png
Normal file
|
After Width: | Height: | Size: 4.5 KiB |
BIN
samples/demo-module/src/main/res/mipmap-xxhdpi/ic_icon.png
Normal file
|
After Width: | Height: | Size: 24 KiB |
BIN
samples/demo-module/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-module/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-module/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>
|
||||
6
samples/demo-module/src/main/res/values/array.xml
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string-array name="module_scope">
|
||||
<item>com.highcapable.yukihookapi.demo_app</item>
|
||||
</string-array>
|
||||
</resources>
|
||||
9
samples/demo-module/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>
|
||||
3
samples/demo-module/src/main/res/values/strings.xml
Normal file
@@ -0,0 +1,3 @@
|
||||
<resources>
|
||||
<string name="app_name">YukiHookDemoModule</string>
|
||||
</resources>
|
||||
19
samples/demo-module/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>
|
||||
@@ -0,0 +1,10 @@
|
||||
<PreferenceScreen xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<PreferenceCategory app:title="Normal Preference">
|
||||
<SwitchPreference
|
||||
app:defaultValue="false"
|
||||
app:key="show_dialog_when_demo_app_opend"
|
||||
app:summary="Open a dialog on start Demo App"
|
||||
app:title="Show Dialog" />
|
||||
</PreferenceCategory>
|
||||
</PreferenceScreen>
|
||||