Fix WrongIdFormat exception on Android XML widgets with non-@+id/ format

This commit is contained in:
Yan Zhulanow
2015-03-10 22:01:03 +03:00
parent 07381b765f
commit be954f2c27
7 changed files with 51 additions and 7 deletions
@@ -0,0 +1,20 @@
<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="@android:id/text1"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<Button
android:id="@+id/login"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Sign in" />
</FrameLayout>
@@ -0,0 +1,14 @@
package com.myapp
import android.app.Activity
import android.os.Bundle
import java.io.File
import kotlinx.android.synthetic.layout.*
public class MyActivity : Activity() {
override fun onCreate(savedInstanceState: Bundle?) {}
val button = login<caret>
fun f() = login.toString()
}