Support several res/ directories

This commit is contained in:
Yan Zhulanow
2015-04-14 19:07:35 +03:00
parent 7a685b8c56
commit 3645dfc5af
22 changed files with 183 additions and 50 deletions
@@ -0,0 +1,33 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.myapp"
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,15 @@
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<Button
android:id="@+id/button"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<Button
android:id="@+id/button2"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</FrameLayout>
@@ -0,0 +1,15 @@
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<FrameLayout
android:id="@+id/button"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<Button
android:id="@+id/button3"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</FrameLayout>
@@ -0,0 +1,32 @@
package kotlinx.android.synthetic.test
import android.app.*
import android.view.*
import android.widget.*
import android.webkit.*
import android.inputmethodservice.*
import android.opengl.*
import android.appwidget.*
import android.support.v4.app.*
import android.support.v4.view.*
import android.support.v4.widget.*
import kotlin.internal.flexible.ft
val android.app.Activity.button: ft<View, View?>
get() = findViewById(0)
val android.app.Fragment.button: ft<View, View?>
get() = getView().findViewById(0)
val android.app.Activity.button2: ft<Button, Button?>
get() = findViewById(0) as? Button
val android.app.Fragment.button2: ft<Button, Button?>
get() = getView().findViewById(0) as? Button
val android.app.Activity.button3: ft<Button, Button?>
get() = findViewById(0) as? Button
val android.app.Fragment.button3: ft<Button, Button?>
get() = getView().findViewById(0) as? Button
@@ -0,0 +1,23 @@
package kotlinx.android.synthetic.test.view
import android.app.*
import android.view.*
import android.widget.*
import android.webkit.*
import android.inputmethodservice.*
import android.opengl.*
import android.appwidget.*
import android.support.v4.app.*
import android.support.v4.view.*
import android.support.v4.widget.*
import kotlin.internal.flexible.ft
val android.view.View.button: ft<View, View?>
get() = findViewById(0)
val android.view.View.button2: ft<Button, Button?>
get() = findViewById(0) as? Button
val android.view.View.button3: ft<Button, Button?>
get() = findViewById(0) as? Button