Refactoring: rename android-compiler-plugin to android-extensions-compiler

This commit is contained in:
Natalia Ukhorskaya
2016-03-11 15:59:29 +03:00
parent 93161be199
commit 7e6fa8ef17
159 changed files with 84 additions and 84 deletions
@@ -0,0 +1,44 @@
package test
import android.app.Activity
import android.view.View
import android.widget.*
import kotlinx.android.synthetic.main.layout.*
import kotlinx.android.synthetic.main.layout.view.*
class R {
class id {
companion object {
const val container = 0
const val login = 1
}
}
}
class MyActivity(): Activity() {
val containerWidget = object : FrameLayout(this) {
val loginWidget = Button(this@MyActivity)
override fun findViewById(id: Int): View? {
return when (id) {
R.id.login -> loginWidget
else -> null
}
}
}
override fun findViewById(id: Int): View? {
return when (id) {
R.id.container -> containerWidget
else -> null
}
}
public fun box(): String{
return if (container.login.toString() == "Button") "OK" else ""
}
}
fun box(): String {
return MyActivity().box()
}
@@ -0,0 +1,34 @@
package test
import android.app.Activity
import android.view.View
import android.widget.*
import kotlinx.android.synthetic.main.layout.*
import kotlinx.android.synthetic.main.layout.view.*
class R {
class id {
companion object {
const val container = 0
const val login = 1
}
}
}
class MyActivity(): Activity() {
val containerWidget = object : FrameLayout(this) {
val loginWidget = Button(this@MyActivity)
}
override fun findViewById(id: Int): View? {
return when (id) {
R.id.container -> containerWidget
else -> null
}
}
}
fun box(): String {
return "OK"
}
@@ -0,0 +1,33 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="test"
android:versionCode="1"
android:versionName="1.0" >
<uses-permission android:name="android.permission.READ_CONTACTS"/>
<uses-sdk
android:minSdkVersion="18"
android:targetSdkVersion="18" />
<permission android:name="android"></permission>
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/Theme.Sample" >
<activity
android:name="com.example.android.basiccontactables.MainActivity"
android:label="@string/app_name"
android:launchMode="singleTop">
<meta-data
android:name="android.app.searchable"
android:resource="@xml/searchable" />
<intent-filter>
<action android:name="android.intent.action.SEARCH" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
@@ -0,0 +1,23 @@
<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" >
<FrameLayout
android:id="@+id/container"
android:layout_width="wrap_content"
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>
</FrameLayout>