mirror of
https://github.com/HighCapable/YukiHookAPI.git
synced 2025-09-06 02:35:40 +08:00
Fix allMethods hooking replace bug
This commit is contained in:
@@ -47,6 +47,10 @@ class MainActivity : AppCompatActivity() {
|
||||
appDemoFourthText.text = getRegularText(string = "Have fun day")
|
||||
appDemoFifthText.text = getDataText()
|
||||
appDemoSixthText.text = getArray(arrayOf("apple", "banana")).let { "${it[0]}, ${it[1]}" }
|
||||
appDemoSeventhText.text = Main().getTestResultFirst()
|
||||
appDemoEighthText.text = Main().getTestResultFirst(string = "Find something interesting")
|
||||
appDemoNinthText.text = Main().getTestResultLast()
|
||||
appDemoTenthText.text = Main().getTestResultLast(string = "This is the last sentence")
|
||||
appDemoButton.setOnClickListener { toast() }
|
||||
}
|
||||
}
|
||||
|
@@ -27,7 +27,15 @@
|
||||
*/
|
||||
package com.highcapable.yukihookapi.demo_app.utils
|
||||
|
||||
class Main(private val string: String) {
|
||||
class Main(private val string: String = "") {
|
||||
|
||||
fun getString() = string
|
||||
|
||||
fun getTestResultFirst() = "The world is beautiful"
|
||||
|
||||
fun getTestResultFirst(string: String) = string
|
||||
|
||||
fun getTestResultLast() = "The world is fantastic"
|
||||
|
||||
fun getTestResultLast(string: String) = string
|
||||
}
|
@@ -40,7 +40,31 @@
|
||||
android:textSize="20sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/app_demo_fifth_text"
|
||||
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="20sp" />
|
||||
|
||||
<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="20sp" />
|
||||
|
||||
<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="20sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/app_demo_tenth_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="15dp"
|
||||
@@ -55,6 +79,14 @@
|
||||
android:text="sample"
|
||||
android:textSize="20sp" />
|
||||
|
||||
<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="20sp" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/app_demo_button"
|
||||
android:layout_width="wrap_content"
|
||||
|
Reference in New Issue
Block a user