Update demo

This commit is contained in:
2023-04-16 00:39:55 +08:00
parent f516f2de52
commit b79547b9e7
2 changed files with 13 additions and 0 deletions

View File

@@ -31,6 +31,7 @@ package com.highcapable.yukireflection.demo_app.ui
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import com.highcapable.yukireflection.YukiReflection
import com.highcapable.yukireflection.demo_app.databinding.ActivityMainBinding
import com.highcapable.yukireflection.demo_app.test.Main
import com.highcapable.yukireflection.factory.*
@@ -42,6 +43,7 @@ class MainActivity : AppCompatActivity() {
super.onCreate(savedInstanceState)
ActivityMainBinding.inflate(layoutInflater).apply {
setContentView(root)
yukiReflectionVersionText.text = "YukiReflection Version${YukiReflection.API_VERSION_NAME}(${YukiReflection.API_VERSION_CODE})"
testObjectDirectlyButton.setOnClickListener {
tipText.text = Main("I am directly call of new object").getContent()
}

View File

@@ -56,4 +56,15 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Modified Static Field Using Reflection" />
<TextView
android:id="@+id/yuki_reflection_version_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="35dp"
android:alpha="0.55"
android:ellipsize="end"
android:gravity="center|start"
android:singleLine="true"
android:textSize="15sp" />
</LinearLayout>