Android Extensions: Support smart-casted receivers (KT-18545)

This commit is contained in:
Yan Zhulanow
2017-06-27 19:52:21 +03:00
parent 9e9c4f79f5
commit bf2bc1fdc7
4 changed files with 52 additions and 1 deletions

View File

@@ -0,0 +1,11 @@
package test
import android.app.Activity
import android.os.Bundle
import java.io.File
import kotlinx.android.synthetic.main.layout.*
fun test(obj: Any?) {
obj as Activity
obj.login
}

View File

@@ -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>