Support Fragment synthetic properties

This commit is contained in:
Yan Zhulanow
2015-04-08 21:12:42 +03:00
parent d7488023d2
commit 7a685b8c56
15 changed files with 322 additions and 21 deletions
@@ -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>
@@ -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