Support androidx packages
... in the IDE plugin and the Android extensions compiler. Change-Id: Iffd58351b0592e12ffc937c06d871d26958fe161
This commit is contained in:
committed by
Yan Zhulanow
parent
612baacc25
commit
89d61ee12d
+17
@@ -0,0 +1,17 @@
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/item_detail_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".ItemDetailActivity"
|
||||
tools:ignore="MergeRootFrame" >
|
||||
|
||||
|
||||
|
||||
<Button
|
||||
android:id="@+id/login"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Sign in" />
|
||||
|
||||
</FrameLayout>
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
package androidx.fragment.app
|
||||
|
||||
import android.app.Activity
|
||||
import android.view.View
|
||||
import android.os.Bundle
|
||||
import java.io.File
|
||||
import kotlinx.android.synthetic.main.layout.*
|
||||
|
||||
open class Fragment {
|
||||
open fun getActivity(): Activity = throw Exception("Function getActivity() is not overridden")
|
||||
open fun getView(): View = throw Exception("Function getView() is not overridden")
|
||||
}
|
||||
|
||||
public class MyFragment : Fragment()
|
||||
|
||||
fun MyFragment.b() {
|
||||
val x = login
|
||||
val y = this.login
|
||||
}
|
||||
|
||||
// 2 public _\$_findCachedViewById
|
||||
// 2 public _\$_clearFindViewByIdCache
|
||||
// 2 INVOKEVIRTUAL androidx/fragment/app/Fragment\.getView
|
||||
// 2 GETSTATIC test/R\$id\.login
|
||||
// 2 INVOKEVIRTUAL androidx/fragment/app/MyFragment\._\$_findCachedViewById
|
||||
// 2 CHECKCAST android/widget/Button
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/item_detail_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".ItemDetailActivity"
|
||||
tools:ignore="MergeRootFrame" >
|
||||
|
||||
|
||||
|
||||
<Button
|
||||
android:id="@+id/login"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Sign in" />
|
||||
|
||||
</FrameLayout>
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
package androidx.fragment.app
|
||||
|
||||
import android.app.Activity
|
||||
import android.view.View
|
||||
import java.io.File
|
||||
import kotlinx.android.synthetic.main.layout.*
|
||||
|
||||
open class Fragment {
|
||||
open fun getActivity(): Activity = throw Exception("Function getActivity() is not overridden")
|
||||
open fun getView(): View = throw Exception("Function getView() is not overridden")
|
||||
}
|
||||
|
||||
public class MyFragment : Fragment() {
|
||||
init {login}
|
||||
}
|
||||
|
||||
// 2 public _\$_findCachedViewById
|
||||
// 2 public _\$_clearFindViewByIdCache
|
||||
// 2 INVOKEVIRTUAL androidx/fragment/app/Fragment\.getView
|
||||
// 1 GETSTATIC test/R\$id\.login
|
||||
// 1 INVOKEVIRTUAL androidx/fragment/app/MyFragment\._\$_findCachedViewById
|
||||
// 1 CHECKCAST android/widget/Button
|
||||
+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>
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
package androidx.fragment.app
|
||||
|
||||
import android.app.Activity
|
||||
import android.os.Bundle
|
||||
import java.io.File
|
||||
import kotlinx.android.synthetic.main.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 androidx/fragment/app/FragmentActivity\.getSupportFragmentManager
|
||||
// 1 INVOKEVIRTUAL androidx/fragment/app/Fragment\.getFragmentManager
|
||||
// 2 GETSTATIC test/R\$id\.fragm
|
||||
// 2 INVOKEVIRTUAL androidx/fragment/app/FragmentManager\.findFragmentById
|
||||
Reference in New Issue
Block a user