Android extensions: Do not cache ViewStub widgets, do not cast it automatically
This commit is contained in:
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" >
|
||||
|
||||
<ViewStub
|
||||
android:id="@+id/stub"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
</FrameLayout>
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
package test
|
||||
|
||||
import android.app.Activity
|
||||
import android.os.Bundle
|
||||
import java.io.File
|
||||
import kotlinx.android.synthetic.main.layout.*
|
||||
|
||||
public class MyActivity : Activity() {
|
||||
fun test() {
|
||||
stub
|
||||
}
|
||||
}
|
||||
|
||||
// 1 GETSTATIC test/R\$id\.stub
|
||||
// 0 INVOKEVIRTUAL test/MyActivity\._\$_findCachedViewById
|
||||
// 1 INVOKEVIRTUAL android/app/Activity\.findViewById
|
||||
// 0 CHECKCAST android/view/ViewStub
|
||||
// 2 CHECKCAST android/view/View
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
<FrameLayout 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" >
|
||||
|
||||
<ViewStub
|
||||
android:id="@+id/stub"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
</FrameLayout>
|
||||
@@ -0,0 +1,35 @@
|
||||
kotlinx
|
||||
|
||||
|
||||
kotlinx.android
|
||||
|
||||
|
||||
kotlinx.android.synthetic
|
||||
|
||||
public fun android.app.Activity.clearFindViewByIdCache(): kotlin.Unit
|
||||
public fun android.app.Fragment.clearFindViewByIdCache(): kotlin.Unit
|
||||
|
||||
|
||||
kotlinx.android.synthetic.main
|
||||
|
||||
|
||||
kotlinx.android.synthetic.main.test
|
||||
|
||||
public val android.app.Activity.stub: android.view.View!
|
||||
public val android.app.Fragment.stub: android.view.View!
|
||||
|
||||
|
||||
kotlinx.android.synthetic.main.test.view
|
||||
|
||||
public val android.view.View.stub: android.view.View!
|
||||
|
||||
|
||||
kotlinx.android.synthetic.test
|
||||
|
||||
public val android.app.Activity.stub: android.view.View!
|
||||
public val android.app.Fragment.stub: android.view.View!
|
||||
|
||||
|
||||
kotlinx.android.synthetic.test.view
|
||||
|
||||
public val android.view.View.stub: android.view.View!
|
||||
Reference in New Issue
Block a user