Support variants in Android Extensions (compiler plugin)
This commit is contained in:
+1
-1
@@ -1,7 +1,7 @@
|
||||
package com.myapp
|
||||
|
||||
import android.app.Activity
|
||||
import kotlinx.android.synthetic.layout.*
|
||||
import kotlinx.android.synthetic.main.layout.*
|
||||
|
||||
fun Activity.a() {
|
||||
val x = login
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
package com.myapp
|
||||
|
||||
import android.app.Fragment
|
||||
import kotlinx.android.synthetic.layout.*
|
||||
import kotlinx.android.synthetic.main.layout.*
|
||||
|
||||
fun Fragment.a() {
|
||||
val x = login
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ package com.myapp
|
||||
import android.app.Activity
|
||||
import android.os.Bundle
|
||||
import java.io.File
|
||||
import kotlinx.android.synthetic.layout.*
|
||||
import kotlinx.android.synthetic.main.layout.*
|
||||
|
||||
public class MyActivity : Activity() {
|
||||
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ package com.myapp
|
||||
import android.app.Fragment
|
||||
import android.os.Bundle
|
||||
import java.io.File
|
||||
import kotlinx.android.synthetic.layout.*
|
||||
import kotlinx.android.synthetic.main.layout.*
|
||||
|
||||
public class MyFragment : Fragment()
|
||||
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
package com.myapp
|
||||
|
||||
import android.view.View
|
||||
import kotlinx.android.synthetic.layout.view.*
|
||||
import kotlinx.android.synthetic.main.layout.view.*
|
||||
|
||||
fun View.a() {
|
||||
val x = login
|
||||
|
||||
Vendored
+1
-1
@@ -1,7 +1,7 @@
|
||||
package com.myapp
|
||||
|
||||
import android.app.Activity
|
||||
import kotlinx.android.synthetic.layout.*
|
||||
import kotlinx.android.synthetic.main.layout.*
|
||||
|
||||
class MyActivity: Activity() {
|
||||
val button = this.MyButton
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
package com.myapp
|
||||
|
||||
import android.app.Fragment
|
||||
import kotlinx.android.synthetic.layout.*
|
||||
import kotlinx.android.synthetic.main.layout.*
|
||||
|
||||
class MyFragment: Fragment() {
|
||||
val button = this.MyButton
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
package com.myapp
|
||||
|
||||
import android.app.Activity
|
||||
import kotlinx.android.synthetic.layout.*
|
||||
import kotlinx.android.synthetic.main.layout.*
|
||||
|
||||
class MyActivity: Activity() {
|
||||
val button = this.MyButton
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
package com.myapp
|
||||
|
||||
import android.app.Fragment
|
||||
import kotlinx.android.synthetic.layout.*
|
||||
import kotlinx.android.synthetic.main.layout.*
|
||||
|
||||
class MyFragment: Fragment() {
|
||||
val button = this.MyButton
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
package com.myapp
|
||||
|
||||
import android.app.Activity
|
||||
import kotlinx.android.synthetic.layout.*
|
||||
import kotlinx.android.synthetic.layout1.*
|
||||
import kotlinx.android.synthetic.main.layout.*
|
||||
import kotlinx.android.synthetic.main.layout1.*
|
||||
|
||||
class MyActivity: Activity() {
|
||||
val button = this.login
|
||||
|
||||
+2
-2
@@ -2,8 +2,8 @@ package com.myapp
|
||||
|
||||
import android.app.Activity
|
||||
import android.app.Fragment
|
||||
import kotlinx.android.synthetic.layout.*
|
||||
import kotlinx.android.synthetic.layout1.*
|
||||
import kotlinx.android.synthetic.main.layout.*
|
||||
import kotlinx.android.synthetic.main.layout1.*
|
||||
|
||||
class MyActivity: Activity() {
|
||||
val button = this.login
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@ package com.myapp
|
||||
|
||||
import android.app.Fragment
|
||||
import java.io.File
|
||||
import kotlinx.android.synthetic.layout.*
|
||||
import kotlinx.android.synthetic.main.layout.*
|
||||
|
||||
public class MyFragment : Fragment() {
|
||||
init {login}
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ package com.myapp
|
||||
import android.app.Activity
|
||||
import android.os.Bundle
|
||||
import java.io.File
|
||||
import kotlinx.android.synthetic.layout.*
|
||||
import kotlinx.android.synthetic.main.layout.*
|
||||
|
||||
public class MyActivity : Activity() {
|
||||
init {login}
|
||||
|
||||
Vendored
+1
-1
@@ -2,7 +2,7 @@ package com.myapp
|
||||
|
||||
import android.app.Fragment
|
||||
import java.io.File
|
||||
import kotlinx.android.synthetic.layout.*
|
||||
import kotlinx.android.synthetic.main.layout.*
|
||||
|
||||
public class MyFragment : Fragment() {
|
||||
init {login}
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ import android.app.Activity
|
||||
import android.app.Fragment
|
||||
import android.os.Bundle
|
||||
import java.io.File
|
||||
import kotlinx.android.synthetic.layout.*
|
||||
import kotlinx.android.synthetic.main.layout.*
|
||||
|
||||
public class MyActivity : Activity() {
|
||||
init { fragm }
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@ package com.myapp
|
||||
|
||||
import android.view.View
|
||||
import android.app.Activity
|
||||
import kotlinx.android.synthetic.layout.view.*
|
||||
import kotlinx.android.synthetic.main.layout.view.*
|
||||
|
||||
public class MyActivity : Activity() {
|
||||
init { View(this).login }
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ import android.app.Activity
|
||||
import android.view.View
|
||||
import android.os.Bundle
|
||||
import java.io.File
|
||||
import kotlinx.android.synthetic.layout.*
|
||||
import kotlinx.android.synthetic.main.layout.*
|
||||
|
||||
open class Fragment {
|
||||
open fun getActivity(): Activity = throw Exception("Function getActivity() is not overridden")
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ package android.support.v4.app
|
||||
import android.app.Activity
|
||||
import android.view.View
|
||||
import java.io.File
|
||||
import kotlinx.android.synthetic.layout.*
|
||||
import kotlinx.android.synthetic.main.layout.*
|
||||
|
||||
open class Fragment {
|
||||
open fun getActivity(): Activity = throw Exception("Function getActivity() is not overridden")
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ package android.support.v4.app
|
||||
import android.app.Activity
|
||||
import android.os.Bundle
|
||||
import java.io.File
|
||||
import kotlinx.android.synthetic.layout.*
|
||||
import kotlinx.android.synthetic.main.layout.*
|
||||
|
||||
open class FragmentManager {
|
||||
open fun findFragmentById(id: Int): Fragment = throw Exception("Function getFragmentById() is not overriden")
|
||||
|
||||
Reference in New Issue
Block a user