Support Fragment synthetic properties
This commit is contained in:
+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" >
|
||||
|
||||
<fragment
|
||||
android:id="@+id/fragm"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
</FrameLayout>
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
package android.support.v4.app
|
||||
|
||||
import android.app.Activity
|
||||
import android.os.Bundle
|
||||
import java.io.File
|
||||
import kotlinx.android.synthetic.layout.*
|
||||
|
||||
open class FragmentManager {
|
||||
open fun findFragmentById(id: Int): Fragment = throw Exception("Function getFragmentById() is not overriden")
|
||||
}
|
||||
|
||||
open class Fragment {
|
||||
open fun getFragmentManager(): FragmentManager = throw Exception("Function getFragmentManager() is not overriden")
|
||||
}
|
||||
|
||||
open class FragmentActivity : Activity() {
|
||||
open fun getSupportFragmentManager(): FragmentManager = throw Exception("Function getSupportFragmentManager() is not overriden")
|
||||
}
|
||||
|
||||
public class MyActivity : FragmentActivity() {
|
||||
init { fragm }
|
||||
}
|
||||
|
||||
public class MyFragment : Fragment() {
|
||||
init { fragm }
|
||||
}
|
||||
|
||||
// 1 INVOKEVIRTUAL android/support/v4/app/FragmentActivity\.getSupportFragmentManager
|
||||
// 1 INVOKEVIRTUAL android/support/v4/app/Fragment\.getFragmentManager
|
||||
// 2 GETSTATIC com/myapp/R\$id\.fragm
|
||||
// 2 INVOKEVIRTUAL android/support/v4/app/FragmentManager\.findFragmentById
|
||||
// 2 CHECKCAST android/support/v4/app/Fragment
|
||||
Reference in New Issue
Block a user