├── Xtendroid ├── .gitignore ├── .settings │ ├── org.eclipse.core.resources.prefs │ ├── org.eclipse.xtend.core.Xtend.prefs │ └── org.eclipse.jdt.core.prefs ├── libs-compile │ └── gson-2.6.2.jar ├── libs │ └── android-support-v13.jar ├── release │ └── xtendroid_v0.13.jar ├── res │ └── values │ │ └── strings.xml ├── src │ └── org │ │ └── xtendroid │ │ ├── app │ │ ├── OnCreate.xtend │ │ └── AndroidActivity.xtend │ │ ├── utils │ │ ├── Utils.xtend │ │ ├── SynchronizedUtil.java │ │ ├── XmlUtils.xtend │ │ ├── NamingUtils.xtend │ │ ├── BasePreferences.xtend │ │ ├── TimeUtils.xtend │ │ ├── ViewUtils.xtend │ │ ├── BgTask.xtend │ │ ├── AsyncBuilder.xtend │ │ └── AlertUtils.xtend │ │ ├── json │ │ └── JsonProperty.xtend │ │ ├── annotations │ │ ├── AddLogTag.xtend │ │ ├── CustomView.xtend │ │ └── AndroidView.xtend │ │ ├── widget │ │ └── AndroidUiBuilderExtensions.xtend │ │ ├── db │ │ └── AndroidDatabase.xtend │ │ └── adapter │ │ ├── BeanAdapter.xtend │ │ └── AndroidViewHolder.xtend ├── AndroidManifest.xml ├── .classpath ├── project.properties ├── proguard-project.txt ├── .project ├── build.gradle └── maven-push.gradle ├── XtendroidTest ├── libs │ └── .gitignore ├── XtendroidTestCasesTest │ ├── .gitignore │ ├── libs │ │ └── gson-2.6.2.jar │ ├── res │ │ ├── drawable-hdpi │ │ │ └── ic_launcher.png │ │ ├── drawable-ldpi │ │ │ └── ic_launcher.png │ │ ├── drawable-mdpi │ │ │ └── ic_launcher.png │ │ ├── drawable-xhdpi │ │ │ └── ic_launcher.png │ │ └── values │ │ │ └── strings.xml │ ├── settings.gradle │ ├── project.properties │ ├── src │ │ └── org │ │ │ └── xtendroid │ │ │ └── xtendroidtest │ │ │ └── test │ │ │ ├── TimeUtils.xtend │ │ │ ├── EnumPropertyTest.xtend │ │ │ ├── ActivityAnnotation.xtend │ │ │ ├── AndroidPreferenceAnnotation.xtend │ │ │ ├── DbLazyList.xtend │ │ │ └── DatabaseTest.xtend │ ├── AndroidManifest.xml │ ├── .classpath │ ├── proguard-project.txt │ ├── .project │ └── build.gradle ├── ic_launcher-web.png ├── settings.gradle ├── res │ ├── drawable-hdpi │ │ └── ic_launcher.png │ ├── drawable-mdpi │ │ └── ic_launcher.png │ ├── drawable-xhdpi │ │ └── ic_launcher.png │ ├── drawable-xxhdpi │ │ └── ic_launcher.png │ ├── values-sw600dp │ │ └── dimens.xml │ ├── values │ │ ├── dimens.xml │ │ ├── sqlmaps.xml │ │ ├── strings.xml │ │ └── styles.xml │ ├── layout │ │ ├── activity_fragment.xml │ │ ├── activity_loader.xml │ │ ├── activity_parcelable.xml │ │ ├── main_list_row.xml │ │ ├── activity_bundle.xml │ │ ├── activity_beanadapter.xml │ │ ├── activity_recyclerview.xml │ │ ├── activity_dialog_fragment.xml │ │ ├── fragment_test.xml │ │ ├── list_row_demo.xml │ │ ├── custom_adapter_view.xml │ │ ├── include_custom_adapter_view3.xml │ │ ├── list_row_user.xml │ │ ├── custom_adapter_view2.xml │ │ ├── fragment_dialog.xml │ │ ├── activity_main.xml │ │ └── list_and_text.xml │ ├── menu │ │ └── main.xml │ ├── values-sw720dp-land │ │ └── dimens.xml │ ├── values-v11 │ │ └── styles.xml │ ├── values-v14 │ │ └── styles.xml │ └── xml │ │ └── settings.xml ├── .settings │ ├── org.eclipse.jdt.core.prefs │ └── org.eclipse.xtend.core.Xtend.prefs ├── src │ └── org │ │ └── xtendroid │ │ └── xtendroidtest │ │ ├── models │ │ ├── NewsItem.xtend │ │ ├── ManyItem.xtend │ │ └── User.xtend │ │ ├── db │ │ └── DbService.xtend │ │ ├── activities │ │ ├── FragmentActivity.xtend │ │ ├── SettingsActivity.xtend │ │ ├── DialogFragmentActivity.xtend │ │ ├── LoaderActivity.xtend │ │ ├── AndroidAdapterActivity.xtend │ │ ├── BundleActivity.xtend │ │ ├── BeanAdapterActivity.xtend │ │ ├── RecyclerViewActivity.xtend │ │ ├── AndroidResourcesActivity.xtend │ │ ├── ParcelableActivity.xtend │ │ ├── DbTestActivity.xtend │ │ ├── MainActivity.xtend │ │ └── BgTaskActivity.xtend │ │ ├── Settings.xtend │ │ ├── fragments │ │ ├── TestFragment.xtend │ │ ├── BundleFragment.xtend │ │ ├── CustomDialog.xtend │ │ └── FragmentWithLoader.xtend │ │ ├── json │ │ └── AndroidJsonTest.xtend │ │ └── adapter │ │ ├── TestAdapter.xtend │ │ ├── AdapterWithViewHolder.xtend │ │ └── RVAdapter.xtend ├── .classpath ├── project.properties ├── proguard-project.txt ├── .project ├── AndroidManifest.xml └── build.gradle ├── repositories.gradle ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── examples ├── Sample1 │ ├── ic_launcher-web.png │ ├── settings.gradle │ ├── res │ │ ├── drawable-hdpi │ │ │ └── ic_launcher.png │ │ ├── drawable-mdpi │ │ │ └── ic_launcher.png │ │ ├── drawable-xhdpi │ │ │ └── ic_launcher.png │ │ ├── drawable-xxhdpi │ │ │ └── ic_launcher.png │ │ ├── values-sw600dp │ │ │ └── dimens.xml │ │ ├── values │ │ │ ├── dimens.xml │ │ │ ├── strings.xml │ │ │ └── styles.xml │ │ ├── menu │ │ │ └── main.xml │ │ ├── values-sw720dp-land │ │ │ └── dimens.xml │ │ ├── values-v11 │ │ │ └── styles.xml │ │ ├── values-v14 │ │ │ └── styles.xml │ │ └── layout │ │ │ └── activity_main.xml │ ├── .settings │ │ ├── org.eclipse.jdt.core.prefs │ │ └── org.eclipse.xtend.core.Xtend.prefs │ ├── .classpath │ ├── project.properties │ ├── proguard-project.txt │ ├── AndroidManifest.xml │ ├── .project │ ├── build.gradle │ └── src │ │ └── com │ │ └── example │ │ └── xtendroid │ │ └── sample1 │ │ └── MainActivity.xtend ├── HelloWorld │ ├── ic_launcher-web.png │ ├── settings.gradle │ ├── res │ │ ├── drawable-hdpi │ │ │ └── ic_launcher.png │ │ ├── drawable-mdpi │ │ │ └── ic_launcher.png │ │ ├── values │ │ │ ├── dimens.xml │ │ │ ├── strings.xml │ │ │ └── styles.xml │ │ ├── drawable-xhdpi │ │ │ └── ic_launcher.png │ │ ├── drawable-xxhdpi │ │ │ └── ic_launcher.png │ │ ├── values-sw600dp │ │ │ └── dimens.xml │ │ ├── values-sw720dp-land │ │ │ └── dimens.xml │ │ ├── values-v11 │ │ │ └── styles.xml │ │ ├── values-v14 │ │ │ └── styles.xml │ │ └── layout │ │ │ └── main.xml │ ├── .settings │ │ ├── org.eclipse.jdt.core.prefs │ │ └── org.eclipse.xtend.core.Xtend.prefs │ ├── .classpath │ ├── project.properties │ ├── proguard-project.txt │ ├── AndroidManifest.xml │ ├── .project │ ├── build.gradle │ └── src │ │ └── com │ │ └── example │ │ └── helloworld │ │ └── HelloWorldActivity.xtend ├── HandlerExample │ ├── ic_launcher-web.png │ ├── settings.gradle │ ├── res │ │ ├── drawable-hdpi │ │ │ └── ic_launcher.png │ │ ├── drawable-mdpi │ │ │ └── ic_launcher.png │ │ ├── drawable-xhdpi │ │ │ └── ic_launcher.png │ │ ├── drawable-xxhdpi │ │ │ └── ic_launcher.png │ │ ├── values-sw600dp │ │ │ └── dimens.xml │ │ ├── values │ │ │ ├── dimens.xml │ │ │ ├── strings.xml │ │ │ └── styles.xml │ │ ├── menu │ │ │ └── progress_test.xml │ │ ├── values-sw720dp-land │ │ │ └── dimens.xml │ │ ├── values-v11 │ │ │ └── styles.xml │ │ ├── values-v14 │ │ │ └── styles.xml │ │ └── layout │ │ │ └── main.xml │ ├── .settings │ │ ├── org.eclipse.jdt.core.prefs │ │ └── org.eclipse.xtend.core.Xtend.prefs │ ├── .classpath │ ├── project.properties │ ├── proguard-project.txt │ ├── AndroidManifest.xml │ ├── .project │ ├── build.gradle │ └── src │ │ └── org │ │ └── xtendroid │ │ └── example │ │ └── handlerexample │ │ └── ProgressTestActivity.xtend ├── MovieSearchApp │ ├── ic_launcher-web.png │ ├── settings.gradle │ ├── res │ │ ├── drawable-hdpi │ │ │ └── ic_launcher.png │ │ ├── drawable-mdpi │ │ │ └── ic_launcher.png │ │ ├── drawable-xhdpi │ │ │ └── ic_launcher.png │ │ ├── drawable-xxhdpi │ │ │ └── ic_launcher.png │ │ ├── values-sw600dp │ │ │ └── dimens.xml │ │ ├── values │ │ │ ├── dimens.xml │ │ │ ├── strings.xml │ │ │ └── styles.xml │ │ ├── values-sw720dp-land │ │ │ └── dimens.xml │ │ ├── values-v11 │ │ │ └── styles.xml │ │ ├── values-v14 │ │ │ └── styles.xml │ │ └── layout │ │ │ └── main.xml │ ├── src │ │ └── org │ │ │ └── xtendroid │ │ │ └── example │ │ │ └── moviesearchapp │ │ │ ├── Strings.xtend │ │ │ └── MovieSearchAppActivity.xtend │ ├── .settings │ │ ├── org.eclipse.jdt.core.prefs │ │ └── org.eclipse.xtend.core.Xtend.prefs │ ├── .classpath │ ├── project.properties │ ├── proguard-project.txt │ ├── AndroidManifest.xml │ ├── .project │ └── build.gradle └── settings.gradle ├── .gitignore ├── project.properties ├── settings.gradle ├── dependencies.gradle ├── LICENSE ├── Xtendroid.iml ├── xtendroid.iml └── gradlew.bat /Xtendroid/.gitignore: -------------------------------------------------------------------------------- 1 | /.settings 2 | -------------------------------------------------------------------------------- /XtendroidTest/libs/.gitignore: -------------------------------------------------------------------------------- 1 | /xtendroid.jar 2 | -------------------------------------------------------------------------------- /XtendroidTest/XtendroidTestCasesTest/.gitignore: -------------------------------------------------------------------------------- 1 | /.settings/ 2 | -------------------------------------------------------------------------------- /repositories.gradle: -------------------------------------------------------------------------------- 1 | repositories { 2 | jcenter() 3 | mavenCentral() 4 | } -------------------------------------------------------------------------------- /Xtendroid/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding/=UTF-8 3 | -------------------------------------------------------------------------------- /XtendroidTest/ic_launcher-web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobykurien/Xtendroid/HEAD/XtendroidTest/ic_launcher-web.png -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobykurien/Xtendroid/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /examples/Sample1/ic_launcher-web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobykurien/Xtendroid/HEAD/examples/Sample1/ic_launcher-web.png -------------------------------------------------------------------------------- /Xtendroid/libs-compile/gson-2.6.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobykurien/Xtendroid/HEAD/Xtendroid/libs-compile/gson-2.6.2.jar -------------------------------------------------------------------------------- /Xtendroid/libs/android-support-v13.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobykurien/Xtendroid/HEAD/Xtendroid/libs/android-support-v13.jar -------------------------------------------------------------------------------- /Xtendroid/release/xtendroid_v0.13.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobykurien/Xtendroid/HEAD/Xtendroid/release/xtendroid_v0.13.jar -------------------------------------------------------------------------------- /Xtendroid/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Xtendroid 4 | 5 | -------------------------------------------------------------------------------- /XtendroidTest/settings.gradle: -------------------------------------------------------------------------------- 1 | include(':Xtendroid') 2 | project(':Xtendroid').projectDir = new File(settingsDir, '../Xtendroid') 3 | -------------------------------------------------------------------------------- /examples/HelloWorld/ic_launcher-web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobykurien/Xtendroid/HEAD/examples/HelloWorld/ic_launcher-web.png -------------------------------------------------------------------------------- /examples/Sample1/settings.gradle: -------------------------------------------------------------------------------- 1 | include(':Xtendroid') 2 | project(':Xtendroid').projectDir = new File(settingsDir, '../../Xtendroid') 3 | -------------------------------------------------------------------------------- /examples/HandlerExample/ic_launcher-web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobykurien/Xtendroid/HEAD/examples/HandlerExample/ic_launcher-web.png -------------------------------------------------------------------------------- /examples/HelloWorld/settings.gradle: -------------------------------------------------------------------------------- 1 | include(':Xtendroid') 2 | project(':Xtendroid').projectDir = new File(settingsDir, '../../Xtendroid') 3 | -------------------------------------------------------------------------------- /examples/MovieSearchApp/ic_launcher-web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobykurien/Xtendroid/HEAD/examples/MovieSearchApp/ic_launcher-web.png -------------------------------------------------------------------------------- /examples/HandlerExample/settings.gradle: -------------------------------------------------------------------------------- 1 | include(':Xtendroid') 2 | project(':Xtendroid').projectDir = new File(settingsDir, '../../Xtendroid') 3 | -------------------------------------------------------------------------------- /examples/MovieSearchApp/settings.gradle: -------------------------------------------------------------------------------- 1 | include(':Xtendroid') 2 | project(':Xtendroid').projectDir = new File(settingsDir, '../../Xtendroid') 3 | -------------------------------------------------------------------------------- /XtendroidTest/res/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobykurien/Xtendroid/HEAD/XtendroidTest/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /XtendroidTest/res/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobykurien/Xtendroid/HEAD/XtendroidTest/res/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /XtendroidTest/res/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobykurien/Xtendroid/HEAD/XtendroidTest/res/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /XtendroidTest/res/drawable-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobykurien/Xtendroid/HEAD/XtendroidTest/res/drawable-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /examples/Sample1/res/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobykurien/Xtendroid/HEAD/examples/Sample1/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /examples/Sample1/res/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobykurien/Xtendroid/HEAD/examples/Sample1/res/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /examples/Sample1/res/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobykurien/Xtendroid/HEAD/examples/Sample1/res/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /examples/HelloWorld/res/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobykurien/Xtendroid/HEAD/examples/HelloWorld/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /examples/HelloWorld/res/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobykurien/Xtendroid/HEAD/examples/HelloWorld/res/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /examples/HelloWorld/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /examples/Sample1/res/drawable-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobykurien/Xtendroid/HEAD/examples/Sample1/res/drawable-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /XtendroidTest/XtendroidTestCasesTest/libs/gson-2.6.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobykurien/Xtendroid/HEAD/XtendroidTest/XtendroidTestCasesTest/libs/gson-2.6.2.jar -------------------------------------------------------------------------------- /examples/HelloWorld/res/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobykurien/Xtendroid/HEAD/examples/HelloWorld/res/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /examples/HelloWorld/res/drawable-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobykurien/Xtendroid/HEAD/examples/HelloWorld/res/drawable-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /examples/HandlerExample/res/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobykurien/Xtendroid/HEAD/examples/HandlerExample/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /examples/HandlerExample/res/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobykurien/Xtendroid/HEAD/examples/HandlerExample/res/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /examples/HandlerExample/res/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobykurien/Xtendroid/HEAD/examples/HandlerExample/res/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /examples/MovieSearchApp/res/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobykurien/Xtendroid/HEAD/examples/MovieSearchApp/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /examples/MovieSearchApp/res/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobykurien/Xtendroid/HEAD/examples/MovieSearchApp/res/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /examples/MovieSearchApp/res/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobykurien/Xtendroid/HEAD/examples/MovieSearchApp/res/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /examples/HandlerExample/res/drawable-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobykurien/Xtendroid/HEAD/examples/HandlerExample/res/drawable-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /examples/MovieSearchApp/res/drawable-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobykurien/Xtendroid/HEAD/examples/MovieSearchApp/res/drawable-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /XtendroidTest/XtendroidTestCasesTest/res/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobykurien/Xtendroid/HEAD/XtendroidTest/XtendroidTestCasesTest/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /XtendroidTest/XtendroidTestCasesTest/res/drawable-ldpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobykurien/Xtendroid/HEAD/XtendroidTest/XtendroidTestCasesTest/res/drawable-ldpi/ic_launcher.png -------------------------------------------------------------------------------- /XtendroidTest/XtendroidTestCasesTest/res/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobykurien/Xtendroid/HEAD/XtendroidTest/XtendroidTestCasesTest/res/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /XtendroidTest/XtendroidTestCasesTest/res/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobykurien/Xtendroid/HEAD/XtendroidTest/XtendroidTestCasesTest/res/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /examples/settings.gradle: -------------------------------------------------------------------------------- 1 | include(':Xtendroid') 2 | project(':Xtendroid').projectDir = new File(settingsDir, '../Xtendroid') 3 | include ':Sample1', ':HandlerExample', ':HelloWorld', ':MovieSearchApp' 4 | 5 | -------------------------------------------------------------------------------- /XtendroidTest/XtendroidTestCasesTest/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | XtendroidTestCasesTest 5 | 6 | 7 | -------------------------------------------------------------------------------- /Xtendroid/src/org/xtendroid/app/OnCreate.xtend: -------------------------------------------------------------------------------- 1 | package org.xtendroid.app 2 | 3 | import java.lang.annotation.Target 4 | import java.lang.annotation.ElementType 5 | 6 | @Target(ElementType.METHOD) 7 | annotation OnCreate {} -------------------------------------------------------------------------------- /examples/MovieSearchApp/src/org/xtendroid/example/moviesearchapp/Strings.xtend: -------------------------------------------------------------------------------- 1 | package org.xtendroid.example.moviesearchapp 2 | 3 | import org.xtendroid.content.res.AndroidResources 4 | 5 | @AndroidResources class Strings { 6 | } -------------------------------------------------------------------------------- /examples/HelloWorld/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Hello World 5 | Hello world! 6 | 7 | 8 | -------------------------------------------------------------------------------- /XtendroidTest/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 3 | org.eclipse.jdt.core.compiler.compliance=1.6 4 | org.eclipse.jdt.core.compiler.source=1.6 5 | -------------------------------------------------------------------------------- /examples/Sample1/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 3 | org.eclipse.jdt.core.compiler.compliance=1.6 4 | org.eclipse.jdt.core.compiler.source=1.6 5 | -------------------------------------------------------------------------------- /XtendroidTest/XtendroidTestCasesTest/settings.gradle: -------------------------------------------------------------------------------- 1 | include(':Xtendroid', ':XtendroidTest') 2 | project(':Xtendroid').projectDir = new File(settingsDir, '../../Xtendroid') 3 | project(':XtendroidTest').projectDir = new File(settingsDir, '../') 4 | -------------------------------------------------------------------------------- /examples/HelloWorld/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 3 | org.eclipse.jdt.core.compiler.compliance=1.6 4 | org.eclipse.jdt.core.compiler.source=1.6 5 | -------------------------------------------------------------------------------- /examples/HandlerExample/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 3 | org.eclipse.jdt.core.compiler.compliance=1.6 4 | org.eclipse.jdt.core.compiler.source=1.6 5 | -------------------------------------------------------------------------------- /examples/MovieSearchApp/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 3 | org.eclipse.jdt.core.compiler.compliance=1.6 4 | org.eclipse.jdt.core.compiler.source=1.6 5 | -------------------------------------------------------------------------------- /XtendroidTest/res/values-sw600dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /XtendroidTest/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 16dp 5 | 16dp 6 | 7 | 8 | -------------------------------------------------------------------------------- /examples/HelloWorld/res/values-sw600dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /examples/Sample1/res/values-sw600dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /XtendroidTest/src/org/xtendroid/xtendroidtest/models/NewsItem.xtend: -------------------------------------------------------------------------------- 1 | package org.xtendroid.xtendroidtest.models 2 | 3 | import org.xtendroid.json.AndroidJson 4 | 5 | @AndroidJson class NewsItem { 6 | String url 7 | String title 8 | long id 9 | boolean published 10 | } -------------------------------------------------------------------------------- /examples/HandlerExample/res/values-sw600dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /examples/MovieSearchApp/res/values-sw600dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /examples/Sample1/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 16dp 5 | 16dp 6 | 7 | 8 | -------------------------------------------------------------------------------- /examples/HandlerExample/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 16dp 5 | 16dp 6 | 7 | 8 | -------------------------------------------------------------------------------- /examples/MovieSearchApp/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 16dp 5 | 16dp 6 | 7 | 8 | -------------------------------------------------------------------------------- /examples/HelloWorld/res/values-sw720dp-land/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /examples/Sample1/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | XtendroidSample1 5 | Settings 6 | Hello world! 7 | 8 | 9 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Sat Feb 11 16:03:20 SAST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip 7 | -------------------------------------------------------------------------------- /XtendroidTest/res/layout/activity_fragment.xml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /XtendroidTest/res/layout/activity_loader.xml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /XtendroidTest/src/org/xtendroid/xtendroidtest/models/ManyItem.xtend: -------------------------------------------------------------------------------- 1 | package org.xtendroid.xtendroidtest.models 2 | 3 | import java.util.Date 4 | import org.eclipse.xtend.lib.annotations.Accessors 5 | 6 | @Accessors class ManyItem { 7 | long id 8 | Date createdAt 9 | String itemName 10 | long itemOrder 11 | } -------------------------------------------------------------------------------- /XtendroidTest/res/menu/main.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /examples/Sample1/res/menu/main.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /XtendroidTest/src/org/xtendroid/xtendroidtest/db/DbService.xtend: -------------------------------------------------------------------------------- 1 | package org.xtendroid.xtendroidtest.db 2 | 3 | import android.content.Context 4 | import org.xtendroid.db.AndroidDatabase 5 | 6 | @AndroidDatabase class DbService { 7 | 8 | new(Context context) { 9 | super(context, "xtendroid_test", 1) 10 | } 11 | 12 | } -------------------------------------------------------------------------------- /examples/HandlerExample/res/menu/progress_test.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /XtendroidTest/res/values-sw720dp-land/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 128dp 8 | 9 | 10 | -------------------------------------------------------------------------------- /examples/Sample1/res/values-sw720dp-land/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 128dp 8 | 9 | 10 | -------------------------------------------------------------------------------- /examples/HandlerExample/res/values-sw720dp-land/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 128dp 8 | 9 | 10 | -------------------------------------------------------------------------------- /examples/MovieSearchApp/res/values-sw720dp-land/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 128dp 8 | 9 | 10 | -------------------------------------------------------------------------------- /XtendroidTest/res/layout/activity_parcelable.xml: -------------------------------------------------------------------------------- 1 | 8 | 9 | -------------------------------------------------------------------------------- /examples/HandlerExample/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | HandlerExample 5 | Settings 6 | Hello world! 7 | Start Progress 8 | 9 | 10 | -------------------------------------------------------------------------------- /XtendroidTest/src/org/xtendroid/xtendroidtest/activities/FragmentActivity.xtend: -------------------------------------------------------------------------------- 1 | package org.xtendroid.xtendroidtest.activities 2 | 3 | import org.xtendroid.app.AndroidActivity 4 | import org.xtendroid.xtendroidtest.R 5 | 6 | @AndroidActivity(R.layout.activity_fragment) class FragmentActivity { 7 | // doesn't need to do anything as the fragment is loaded from the layout 8 | } -------------------------------------------------------------------------------- /Xtendroid/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /Xtendroid/src/org/xtendroid/utils/Utils.xtend: -------------------------------------------------------------------------------- 1 | package org.xtendroid.utils 2 | 3 | /** 4 | * @deprecated Use NamingUtils instead 5 | */ 6 | @Deprecated 7 | class Utils extends NamingUtils { 8 | 9 | /** 10 | * @deprecated use StringExtensions.toFirstUpper instead 11 | */ 12 | @Deprecated 13 | def static upperCaseFirst(String s) { 14 | s.toFirstUpper 15 | } 16 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # built application files 2 | *.apk 3 | *.ap_ 4 | 5 | # files for the dex VM 6 | *.dex 7 | 8 | # Java class files 9 | *.class 10 | 11 | # generated files 12 | bin 13 | gen 14 | xtend-gen 15 | build 16 | 17 | # Local configuration file (sdk path, etc) 18 | local.properties 19 | 20 | *~ 21 | .gradle 22 | build 23 | gradle.properties 24 | 25 | # IDEA 26 | ./out 27 | .DS_Store 28 | .idea 29 | -------------------------------------------------------------------------------- /XtendroidTest/res/values-v11/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /examples/Sample1/res/values-v11/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /examples/HelloWorld/res/values-v11/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /examples/HandlerExample/res/values-v11/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /examples/MovieSearchApp/res/values-v11/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /examples/MovieSearchApp/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Hello World, MovieSearchAppActivity! 6 | MovieSearchApp 7 | 8 | Search 9 | Movies 10 | People 11 | 12 | 13 | -------------------------------------------------------------------------------- /XtendroidTest/res/layout/main_list_row.xml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 10 | 11 | -------------------------------------------------------------------------------- /XtendroidTest/res/layout/activity_bundle.xml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 10 | 11 | -------------------------------------------------------------------------------- /XtendroidTest/src/org/xtendroid/xtendroidtest/Settings.xtend: -------------------------------------------------------------------------------- 1 | package org.xtendroid.xtendroidtest 2 | 3 | import org.xtendroid.annotations.AndroidPreference 4 | 5 | /** 6 | * Storage of settings, for use in testing. 7 | */ 8 | @AndroidPreference class Settings { 9 | boolean enabled = true 10 | String url = "" 11 | 12 | // this value not shown in preference screen 13 | long maxTimeout = 0 // long values not supported in pref screen 14 | } -------------------------------------------------------------------------------- /XtendroidTest/res/values-v14/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /examples/HelloWorld/res/values-v14/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /examples/Sample1/res/values-v14/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /XtendroidTest/res/layout/activity_beanadapter.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 10 | 11 | -------------------------------------------------------------------------------- /examples/HandlerExample/res/values-v14/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /examples/MovieSearchApp/res/values-v14/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /XtendroidTest/res/xml/settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 13 | 14 | -------------------------------------------------------------------------------- /XtendroidTest/src/org/xtendroid/xtendroidtest/activities/SettingsActivity.xtend: -------------------------------------------------------------------------------- 1 | package org.xtendroid.xtendroidtest.activities 2 | 3 | import android.os.Bundle 4 | import android.preference.PreferenceActivity 5 | import org.xtendroid.xtendroidtest.R 6 | 7 | class SettingsActivity extends PreferenceActivity { 8 | 9 | override protected onCreate(Bundle savedInstanceState) { 10 | super.onCreate(savedInstanceState) 11 | addPreferencesFromResource(R.xml.settings) 12 | } 13 | } -------------------------------------------------------------------------------- /examples/HelloWorld/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /XtendroidTest/res/layout/activity_recyclerview.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 11 | 12 | -------------------------------------------------------------------------------- /XtendroidTest/src/org/xtendroid/xtendroidtest/fragments/TestFragment.xtend: -------------------------------------------------------------------------------- 1 | package org.xtendroid.xtendroidtest.fragments 2 | 3 | import org.xtendroid.annotations.AndroidFragment 4 | import org.xtendroid.app.OnCreate 5 | import org.xtendroid.xtendroidtest.R 6 | 7 | /** 8 | * Fragment to test the @AndroidFragment annotation 9 | */ 10 | @AndroidFragment(R.layout.fragment_test) class TestFragment { 11 | 12 | @OnCreate 13 | def init() { 14 | fragText.text = "Hello, from Fragment!" 15 | } 16 | 17 | } -------------------------------------------------------------------------------- /examples/HandlerExample/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /examples/MovieSearchApp/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /Xtendroid/.settings/org.eclipse.xtend.core.Xtend.prefs: -------------------------------------------------------------------------------- 1 | autobuilding=true 2 | eclipse.preferences.version=1 3 | is_project_specific=true 4 | outlet.DEFAULT_OUTPUT.cleanDirectory=true 5 | outlet.DEFAULT_OUTPUT.cleanupDerived=true 6 | outlet.DEFAULT_OUTPUT.createDirectory=true 7 | outlet.DEFAULT_OUTPUT.derived=true 8 | outlet.DEFAULT_OUTPUT.directory=gen 9 | outlet.DEFAULT_OUTPUT.hideLocalSyntheticVariables=true 10 | outlet.DEFAULT_OUTPUT.installDslAsPrimarySource=true 11 | outlet.DEFAULT_OUTPUT.override=true 12 | -------------------------------------------------------------------------------- /XtendroidTest/src/org/xtendroid/xtendroidtest/json/AndroidJsonTest.xtend: -------------------------------------------------------------------------------- 1 | package org.xtendroid.xtendroidtest.json 2 | 3 | import org.xtendroid.json.AndroidJson 4 | import java.util.Date 5 | import java.util.List 6 | 7 | @AndroidJson 8 | class AndroidJsonTest1 { 9 | Date date 10 | 11 | Date[] dateArray 12 | 13 | List dateList 14 | } 15 | 16 | class AndroidJsonTest2 { 17 | @AndroidJson 18 | Date date 19 | 20 | @AndroidJson 21 | Date[] dateArray 22 | 23 | @AndroidJson 24 | List dateList 25 | } -------------------------------------------------------------------------------- /examples/HelloWorld/.settings/org.eclipse.xtend.core.Xtend.prefs: -------------------------------------------------------------------------------- 1 | autobuilding=true 2 | eclipse.preferences.version=1 3 | is_project_specific=true 4 | outlet.DEFAULT_OUTPUT.cleanDirectory=false 5 | outlet.DEFAULT_OUTPUT.cleanupDerived=true 6 | outlet.DEFAULT_OUTPUT.createDirectory=true 7 | outlet.DEFAULT_OUTPUT.derived=true 8 | outlet.DEFAULT_OUTPUT.directory=gen 9 | outlet.DEFAULT_OUTPUT.hideLocalSyntheticVariables=true 10 | outlet.DEFAULT_OUTPUT.installDslAsPrimarySource=true 11 | outlet.DEFAULT_OUTPUT.override=true 12 | -------------------------------------------------------------------------------- /examples/HandlerExample/.settings/org.eclipse.xtend.core.Xtend.prefs: -------------------------------------------------------------------------------- 1 | autobuilding=true 2 | eclipse.preferences.version=1 3 | is_project_specific=true 4 | outlet.DEFAULT_OUTPUT.cleanDirectory=false 5 | outlet.DEFAULT_OUTPUT.cleanupDerived=true 6 | outlet.DEFAULT_OUTPUT.createDirectory=true 7 | outlet.DEFAULT_OUTPUT.derived=true 8 | outlet.DEFAULT_OUTPUT.directory=gen 9 | outlet.DEFAULT_OUTPUT.hideLocalSyntheticVariables=true 10 | outlet.DEFAULT_OUTPUT.installDslAsPrimarySource=true 11 | outlet.DEFAULT_OUTPUT.override=true 12 | -------------------------------------------------------------------------------- /examples/MovieSearchApp/.settings/org.eclipse.xtend.core.Xtend.prefs: -------------------------------------------------------------------------------- 1 | autobuilding=true 2 | eclipse.preferences.version=1 3 | is_project_specific=true 4 | outlet.DEFAULT_OUTPUT.cleanDirectory=false 5 | outlet.DEFAULT_OUTPUT.cleanupDerived=true 6 | outlet.DEFAULT_OUTPUT.createDirectory=true 7 | outlet.DEFAULT_OUTPUT.derived=true 8 | outlet.DEFAULT_OUTPUT.directory=gen 9 | outlet.DEFAULT_OUTPUT.hideLocalSyntheticVariables=true 10 | outlet.DEFAULT_OUTPUT.installDslAsPrimarySource=true 11 | outlet.DEFAULT_OUTPUT.override=true 12 | -------------------------------------------------------------------------------- /XtendroidTest/res/layout/activity_dialog_fragment.xml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 19 | 20 | -------------------------------------------------------------------------------- /XtendroidTest/XtendroidTestCasesTest/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /XtendroidTest/XtendroidTestCasesTest/src/org/xtendroid/xtendroidtest/test/EnumPropertyTest.xtend: -------------------------------------------------------------------------------- 1 | package org.xtendroid.xtendroidtest.test 2 | 3 | import android.test.AndroidTestCase 4 | import org.xtendroid.annotations.EnumProperty 5 | 6 | enum AbcEnum { 7 | a, b, c 8 | } 9 | 10 | class EnumPropertyTest extends AndroidTestCase { 11 | 12 | @EnumProperty(enumType=AbcEnum) 13 | String alpha 14 | 15 | @EnumProperty(name="GroupEnum", values=#["Baby", "Toddler", "Child", "Adult", "Senior"]) 16 | String group 17 | 18 | def testEnum() { 19 | group = GroupEnum.Baby.toString 20 | assertEquals(group, "Baby") 21 | assertEquals(GroupEnum.Baby, GroupEnum.toGroupEnumValue(group)) 22 | assertNotNull(GroupEnum.toGroupEnumValue("Juvenile")) 23 | } 24 | } -------------------------------------------------------------------------------- /XtendroidTest/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 14 | 15 | 16 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /examples/HelloWorld/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 14 | 15 | 16 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /examples/Sample1/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 14 | 15 | 16 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /examples/HandlerExample/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 14 | 15 | 16 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /examples/MovieSearchApp/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 14 | 15 | 16 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /XtendroidTest/res/layout/list_row_user.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 14 | 15 | 21 | 22 | -------------------------------------------------------------------------------- /XtendroidTest/proguard-project.txt: -------------------------------------------------------------------------------- 1 | # To enable ProGuard in your project, edit project.properties 2 | # to define the proguard.config property as described in that file. 3 | # 4 | # Add project specific ProGuard rules here. 5 | # By default, the flags in this file are appended to flags specified 6 | # in ${sdk.dir}/tools/proguard/proguard-android.txt 7 | # You can edit the include path and order by changing the ProGuard 8 | # include property in project.properties. 9 | # 10 | # For more details, see 11 | # http://developer.android.com/guide/developing/tools/proguard.html 12 | 13 | # Add any project specific keep options here: 14 | 15 | # If your project uses WebView with JS, uncomment the following 16 | # and specify the fully qualified class name to the JavaScript interface 17 | # class: 18 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 19 | # public *; 20 | #} 21 | -------------------------------------------------------------------------------- /XtendroidTest/src/org/xtendroid/xtendroidtest/activities/AndroidAdapterActivity.xtend: -------------------------------------------------------------------------------- 1 | package org.xtendroid.xtendroidtest.activities 2 | 3 | import java.util.ArrayList 4 | import org.xtendroid.app.AndroidActivity 5 | import org.xtendroid.app.OnCreate 6 | import org.xtendroid.xtendroidtest.R 7 | import org.xtendroid.xtendroidtest.adapter.AdapterWithViewHolder 8 | import org.xtendroid.xtendroidtest.models.User 9 | 10 | /** 11 | * Test usage of @AndroidAdapter annotation 12 | */ 13 | @AndroidActivity(R.layout.activity_main) class AndroidAdapterActivity { 14 | 15 | @OnCreate 16 | def init() { 17 | val users = new ArrayList; 18 | (1..10).forEach [i| 19 | var u = new User 20 | u.firstName = "User" + i 21 | u.lastName = "Surname" + i 22 | u.age = i 23 | users.add(u) 24 | ] 25 | 26 | mainList.adapter = new AdapterWithViewHolder(this, users) 27 | } 28 | 29 | } -------------------------------------------------------------------------------- /examples/HelloWorld/proguard-project.txt: -------------------------------------------------------------------------------- 1 | # To enable ProGuard in your project, edit project.properties 2 | # to define the proguard.config property as described in that file. 3 | # 4 | # Add project specific ProGuard rules here. 5 | # By default, the flags in this file are appended to flags specified 6 | # in ${sdk.dir}/tools/proguard/proguard-android.txt 7 | # You can edit the include path and order by changing the ProGuard 8 | # include property in project.properties. 9 | # 10 | # For more details, see 11 | # http://developer.android.com/guide/developing/tools/proguard.html 12 | 13 | # Add any project specific keep options here: 14 | 15 | # If your project uses WebView with JS, uncomment the following 16 | # and specify the fully qualified class name to the JavaScript interface 17 | # class: 18 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 19 | # public *; 20 | #} 21 | -------------------------------------------------------------------------------- /examples/Sample1/proguard-project.txt: -------------------------------------------------------------------------------- 1 | # To enable ProGuard in your project, edit project.properties 2 | # to define the proguard.config property as described in that file. 3 | # 4 | # Add project specific ProGuard rules here. 5 | # By default, the flags in this file are appended to flags specified 6 | # in ${sdk.dir}/tools/proguard/proguard-android.txt 7 | # You can edit the include path and order by changing the ProGuard 8 | # include property in project.properties. 9 | # 10 | # For more details, see 11 | # http://developer.android.com/guide/developing/tools/proguard.html 12 | 13 | # Add any project specific keep options here: 14 | 15 | # If your project uses WebView with JS, uncomment the following 16 | # and specify the fully qualified class name to the JavaScript interface 17 | # class: 18 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 19 | # public *; 20 | #} 21 | -------------------------------------------------------------------------------- /examples/HandlerExample/proguard-project.txt: -------------------------------------------------------------------------------- 1 | # To enable ProGuard in your project, edit project.properties 2 | # to define the proguard.config property as described in that file. 3 | # 4 | # Add project specific ProGuard rules here. 5 | # By default, the flags in this file are appended to flags specified 6 | # in ${sdk.dir}/tools/proguard/proguard-android.txt 7 | # You can edit the include path and order by changing the ProGuard 8 | # include property in project.properties. 9 | # 10 | # For more details, see 11 | # http://developer.android.com/guide/developing/tools/proguard.html 12 | 13 | # Add any project specific keep options here: 14 | 15 | # If your project uses WebView with JS, uncomment the following 16 | # and specify the fully qualified class name to the JavaScript interface 17 | # class: 18 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 19 | # public *; 20 | #} 21 | -------------------------------------------------------------------------------- /examples/MovieSearchApp/proguard-project.txt: -------------------------------------------------------------------------------- 1 | # To enable ProGuard in your project, edit project.properties 2 | # to define the proguard.config property as described in that file. 3 | # 4 | # Add project specific ProGuard rules here. 5 | # By default, the flags in this file are appended to flags specified 6 | # in ${sdk.dir}/tools/proguard/proguard-android.txt 7 | # You can edit the include path and order by changing the ProGuard 8 | # include property in project.properties. 9 | # 10 | # For more details, see 11 | # http://developer.android.com/guide/developing/tools/proguard.html 12 | 13 | # Add any project specific keep options here: 14 | 15 | # If your project uses WebView with JS, uncomment the following 16 | # and specify the fully qualified class name to the JavaScript interface 17 | # class: 18 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 19 | # public *; 20 | #} 21 | -------------------------------------------------------------------------------- /XtendroidTest/res/layout/custom_adapter_view2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /Xtendroid/src/org/xtendroid/utils/SynchronizedUtil.java: -------------------------------------------------------------------------------- 1 | package org.xtendroid.utils; 2 | 3 | import org.eclipse.xtext.xbase.lib.Inline; 4 | import org.eclipse.xtext.xbase.lib.Procedures; 5 | 6 | /** 7 | * Helper for synchronizing on an object. Use as follows: 8 | * 9 | * import static org.xtendroid.utils.SynchonizedUtil.* 10 | * 11 | * sync(obj) [ 12 | * // do stuff 13 | * ] 14 | * 15 | * @see https://bugs.eclipse.org/bugs/show_bug.cgi?id=418753 16 | */ 17 | public class SynchronizedUtil { 18 | /** 19 | * @deprecated synchronized expression is supported natively since Xtend 2.6 20 | */ 21 | @Deprecated 22 | @Inline(value = "synchronized($1) { $2.apply($1);}", statementExpression = true) 23 | public static void sync(T obj, Procedures.Procedure1 proc) { 24 | synchronized (obj) { 25 | proc.apply(obj); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /XtendroidTest/XtendroidTestCasesTest/proguard-project.txt: -------------------------------------------------------------------------------- 1 | # To enable ProGuard in your project, edit project.properties 2 | # to define the proguard.config property as described in that file. 3 | # 4 | # Add project specific ProGuard rules here. 5 | # By default, the flags in this file are appended to flags specified 6 | # in ${sdk.dir}/tools/proguard/proguard-android.txt 7 | # You can edit the include path and order by changing the ProGuard 8 | # include property in project.properties. 9 | # 10 | # For more details, see 11 | # http://developer.android.com/guide/developing/tools/proguard.html 12 | 13 | # Add any project specific keep options here: 14 | 15 | # If your project uses WebView with JS, uncomment the following 16 | # and specify the fully qualified class name to the JavaScript interface 17 | # class: 18 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 19 | # public *; 20 | #} 21 | -------------------------------------------------------------------------------- /XtendroidTest/XtendroidTestCasesTest/src/org/xtendroid/xtendroidtest/test/ActivityAnnotation.xtend: -------------------------------------------------------------------------------- 1 | package org.xtendroid.xtendroidtest.test 2 | 3 | import android.test.ActivityInstrumentationTestCase2 4 | import android.widget.TextView 5 | import org.xtendroid.xtendroidtest.R 6 | import org.xtendroid.xtendroidtest.activities.MainActivity 7 | 8 | class ActivityAnnotation extends ActivityInstrumentationTestCase2 { 9 | 10 | new() { 11 | super(MainActivity) 12 | } 13 | 14 | def void testAnnotation() { 15 | val annotationTv = (activity as MainActivity).mainHello 16 | val tv = activity.findViewById(R.id.main_hello) as TextView 17 | assertEquals(activity.getString(R.string.welcome), tv.text) 18 | 19 | activity.runOnUiThread [| 20 | annotationTv.text = "Testing" 21 | assertEquals(annotationTv.text, tv.text) 22 | ] 23 | 24 | Thread.sleep(1000) // wait for above thread to run 25 | } 26 | } -------------------------------------------------------------------------------- /Xtendroid/proguard-project.txt: -------------------------------------------------------------------------------- 1 | # To enable ProGuard in your project, edit project.properties 2 | # to define the proguard.config property as described in that file. 3 | # 4 | # Add project specific ProGuard rules here. 5 | # By default, the flags in this file are appended to flags specified 6 | # in ${sdk.dir}/tools/proguard/proguard-android.txt 7 | # You can edit the include path and order by changing the ProGuard 8 | # include property in project.properties. 9 | # 10 | # For more details, see 11 | # http://developer.android.com/guide/developing/tools/proguard.html 12 | 13 | # Add any project specific keep options here: 14 | 15 | # If your project uses WebView with JS, uncomment the following 16 | # and specify the fully qualified class name to the JavaScript interface 17 | # class: 18 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 19 | # public *; 20 | #} 21 | 22 | -keepattributes Signature 23 | 24 | -------------------------------------------------------------------------------- /XtendroidTest/res/layout/fragment_dialog.xml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 13 | 14 | 22 | 23 | -------------------------------------------------------------------------------- /XtendroidTest/.settings/org.eclipse.xtend.core.Xtend.prefs: -------------------------------------------------------------------------------- 1 | autobuilding=true 2 | eclipse.preferences.version=1 3 | is_project_specific=true 4 | outlet.DEFAULT_OUTPUT.cleanDirectory=false 5 | outlet.DEFAULT_OUTPUT.cleanupDerived=true 6 | outlet.DEFAULT_OUTPUT.createDirectory=true 7 | outlet.DEFAULT_OUTPUT.derived=true 8 | outlet.DEFAULT_OUTPUT.directory=gen 9 | outlet.DEFAULT_OUTPUT.hideLocalSyntheticVariables=true 10 | outlet.DEFAULT_OUTPUT.installDslAsPrimarySource=true 11 | outlet.DEFAULT_OUTPUT.keepLocalHistory=false 12 | outlet.DEFAULT_OUTPUT.override=true 13 | outlet.DEFAULT_OUTPUT.sourceFolder.gen.directory= 14 | outlet.DEFAULT_OUTPUT.sourceFolder.gen.ignore= 15 | outlet.DEFAULT_OUTPUT.sourceFolder.src.directory= 16 | outlet.DEFAULT_OUTPUT.sourceFolder.src.ignore= 17 | outlet.DEFAULT_OUTPUT.sourceFolder.xtend-gen.directory= 18 | outlet.DEFAULT_OUTPUT.sourceFolder.xtend-gen.ignore= 19 | outlet.DEFAULT_OUTPUT.userOutputPerSourceFolder= 20 | -------------------------------------------------------------------------------- /examples/Sample1/.settings/org.eclipse.xtend.core.Xtend.prefs: -------------------------------------------------------------------------------- 1 | autobuilding=true 2 | eclipse.preferences.version=1 3 | is_project_specific=true 4 | outlet.DEFAULT_OUTPUT.cleanDirectory=false 5 | outlet.DEFAULT_OUTPUT.cleanupDerived=true 6 | outlet.DEFAULT_OUTPUT.createDirectory=true 7 | outlet.DEFAULT_OUTPUT.derived=true 8 | outlet.DEFAULT_OUTPUT.directory=gen 9 | outlet.DEFAULT_OUTPUT.hideLocalSyntheticVariables=true 10 | outlet.DEFAULT_OUTPUT.installDslAsPrimarySource=true 11 | outlet.DEFAULT_OUTPUT.keepLocalHistory=false 12 | outlet.DEFAULT_OUTPUT.override=true 13 | outlet.DEFAULT_OUTPUT.sourceFolder.gen.directory= 14 | outlet.DEFAULT_OUTPUT.sourceFolder.gen.ignore= 15 | outlet.DEFAULT_OUTPUT.sourceFolder.src.directory= 16 | outlet.DEFAULT_OUTPUT.sourceFolder.src.ignore= 17 | outlet.DEFAULT_OUTPUT.sourceFolder.xtend-gen.directory= 18 | outlet.DEFAULT_OUTPUT.sourceFolder.xtend-gen.ignore= 19 | outlet.DEFAULT_OUTPUT.userOutputPerSourceFolder= 20 | -------------------------------------------------------------------------------- /XtendroidTest/src/org/xtendroid/xtendroidtest/activities/BundleActivity.xtend: -------------------------------------------------------------------------------- 1 | package org.xtendroid.xtendroidtest.activities 2 | 3 | import android.app.Activity 4 | import android.os.Bundle 5 | import org.xtendroid.annotations.BundleProperty 6 | import org.xtendroid.xtendroidtest.R 7 | import org.xtendroid.xtendroidtest.fragments.BundleFragment 8 | import org.xtendroid.xtendroidtest.models.User 9 | 10 | class BundleActivity extends Activity { 11 | override protected onCreate(Bundle savedInstanceState) { 12 | super.onCreate(savedInstanceState) 13 | setContentView(R.layout.activity_bundle) 14 | 15 | // let's pass our data into a Fragment 16 | var frag = new BundleFragment 17 | frag.putCategory("New category") 18 | frag.putCountry("South Africa") 19 | frag.putUser(new User("John", "Smith")) 20 | fragmentManager.beginTransaction 21 | .add(R.id.bundleFragment, frag) 22 | .commit 23 | } 24 | } -------------------------------------------------------------------------------- /XtendroidTest/src/org/xtendroid/xtendroidtest/fragments/CustomDialog.xtend: -------------------------------------------------------------------------------- 1 | package org.xtendroid.xtendroidtest.fragments 2 | 3 | import android.app.AlertDialog 4 | import android.app.DialogFragment 5 | import android.os.Bundle 6 | import org.xtendroid.annotations.AndroidDialogFragment 7 | import org.xtendroid.app.OnCreate 8 | import org.xtendroid.xtendroidtest.R 9 | 10 | @AndroidDialogFragment(R.layout.fragment_dialog) class CustomDialog extends DialogFragment { 11 | 12 | override onCreateDialog(Bundle savedInstanceState) { 13 | new AlertDialog.Builder(activity) 14 | .setView(contentView) // contentView is inflated by the @AndroidDialogFragment annotation 15 | .setPositiveButton("Ok", [ dismiss ]) 16 | .create 17 | } 18 | 19 | @OnCreate 20 | def init() { 21 | title.text = "Hello, Dialog!" 22 | message.text = "This is a dialog fragment, created using an AlertDialog.Builder, and managed using a regular DialogFragment" 23 | } 24 | } -------------------------------------------------------------------------------- /Xtendroid/src/org/xtendroid/utils/XmlUtils.xtend: -------------------------------------------------------------------------------- 1 | package org.xtendroid.utils 2 | 3 | import java.io.InputStream 4 | import javax.xml.parsers.DocumentBuilderFactory 5 | import org.w3c.dom.Element 6 | import org.w3c.dom.Document 7 | 8 | /** 9 | * XML utilities 10 | */ 11 | class XmlUtils { 12 | 13 | def static Document getDocument(InputStream stream) { 14 | val dbFactory = DocumentBuilderFactory.newInstance 15 | val dBuilder = dbFactory.newDocumentBuilder 16 | return dBuilder.parse(stream) 17 | } 18 | 19 | def static void traverseAllNodes(Document doc, (Element)=>void acceptor) { 20 | traverseAllNodes(doc.documentElement, acceptor) 21 | } 22 | 23 | def static void traverseAllNodes(Element node, (Element)=>void acceptor) { 24 | acceptor.apply(node) 25 | for (i : 0.. 2 | 6 | 7 | 10 | 11 | 16 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /examples/HandlerExample/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 10 | 11 | 16 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /examples/MovieSearchApp/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 10 | 11 | 16 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /XtendroidTest/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 11 | 12 | 18 | 19 | 24 | 25 | -------------------------------------------------------------------------------- /XtendroidTest/res/layout/list_and_text.xml: -------------------------------------------------------------------------------- 1 | 11 | 12 | 18 | 19 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /examples/Sample1/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 10 | 11 | 12 | 17 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /examples/HandlerExample/res/layout/main.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 15 | 16 | 17 | 22 | 23 | 29 | 30 | -------------------------------------------------------------------------------- /dependencies.gradle: -------------------------------------------------------------------------------- 1 | ext { 2 | compileSdkVersion = 23 3 | minSdkVersion = 15 4 | buildToolsVersion = '23.0.3' 5 | 6 | android_gradle_ver = '2.0.+' 7 | xtend_android_gradle_ver = '1.0.+' 8 | xtend_gradle_ver = '0.4.+' 9 | xtext_gradle_ver = '1.0.+' 10 | 11 | build = [ 12 | android_gradle : "com.android.tools.build:gradle:${android_gradle_ver}", 13 | xtend_android_gradle : "org.xtext:xtext-android-gradle-plugin:${xtend_android_gradle_ver}", 14 | xtend_gradle : "org.xtend:xtend-gradle-plugin:${xtend_gradle_ver}", // will be deprecated 15 | xtext_gradle : "org.xtext:xtext-gradle-plugin:${xtext_gradle_ver}" 16 | ] 17 | 18 | xtend_lib_ver = '2.9.2' 19 | android_sdk_support_ver = '23.1.1' 20 | 21 | lib = [ 22 | xtend : "org.eclipse.xtend:org.eclipse.xtend.lib:${xtend_lib_ver}", 23 | android : [ 24 | support_v4 : "com.android.support:support-v4:${android_sdk_support_ver}", 25 | appcompat_v7 : "com.android.support:appcompat-v7:${android_sdk_support_ver}" 26 | ] 27 | ] 28 | } 29 | 30 | -------------------------------------------------------------------------------- /XtendroidTest/src/org/xtendroid/xtendroidtest/activities/BeanAdapterActivity.xtend: -------------------------------------------------------------------------------- 1 | package org.xtendroid.xtendroidtest.activities 2 | 3 | import org.xtendroid.app.AndroidActivity 4 | import org.xtendroid.app.OnCreate 5 | import org.xtendroid.xtendroidtest.R 6 | import org.xtendroid.xtendroidtest.models.User 7 | import org.xtendroid.adapter.BeanAdapter 8 | import java.util.ArrayList 9 | import android.support.v7.app.AppCompatActivity 10 | 11 | /** 12 | * Use the BeanAdapter 13 | */ 14 | @AndroidActivity(R.layout.activity_beanadapter) class BeanAdapterActivity extends AppCompatActivity { 15 | 16 | @OnCreate def init() { 17 | // generate a bunch of users 18 | var users = new ArrayList 19 | for (i : 1 .. 100) { 20 | val user = new User() 21 | user.userName = "User " + i 22 | user.age = i 23 | users.add(user) 24 | } 25 | 26 | // The rediculously simple code to display the users in a list 27 | var adapter = new BeanAdapter(this, R.layout.list_row_user, users) 28 | userList.adapter = adapter 29 | } 30 | } -------------------------------------------------------------------------------- /Xtendroid/src/org/xtendroid/annotations/AddLogTag.xtend: -------------------------------------------------------------------------------- 1 | package org.xtendroid.annotations 2 | 3 | import org.eclipse.xtend.lib.macro.Active 4 | import org.eclipse.xtend.lib.macro.AbstractClassProcessor 5 | import org.eclipse.xtend.lib.macro.declaration.MutableClassDeclaration 6 | import org.eclipse.xtend.lib.macro.TransformationContext 7 | import java.lang.annotation.Target 8 | import java.lang.annotation.ElementType 9 | 10 | @Active(typeof(LogTagProcessor)) 11 | @Target(ElementType.TYPE) 12 | annotation AddLogTag { 13 | String value = "" 14 | } 15 | 16 | class LogTagProcessor extends AbstractClassProcessor { 17 | override doTransform(MutableClassDeclaration clazz, extension TransformationContext context) { 18 | 19 | val annotationValue = clazz.annotations.filter[a| "AddLogTag".equals(a.annotationTypeDeclaration.simpleName)].head.getStringValue("value") 20 | val String tag = if( annotationValue.nullOrEmpty ) clazz.simpleName else annotationValue 21 | 22 | clazz.addField("TAG") [ 23 | final = true 24 | static = true 25 | type=String.newTypeReference() 26 | initializer = ['''"«tag»"'''] 27 | ] 28 | } 29 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2013 Toby Kurien 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /XtendroidTest/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | XtendroidTest 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.xtext.ui.shared.xtextBuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.andmore.ResourceManagerBuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.andmore.PreCompilerBuilder 20 | 21 | 22 | 23 | 24 | org.eclipse.jdt.core.javabuilder 25 | 26 | 27 | 28 | 29 | org.eclipse.andmore.ApkBuilder 30 | 31 | 32 | 33 | 34 | 35 | org.eclipse.andmore.AndroidNature 36 | org.eclipse.jdt.core.javanature 37 | org.eclipse.xtext.ui.shared.xtextNature 38 | 39 | 40 | -------------------------------------------------------------------------------- /XtendroidTest/src/org/xtendroid/xtendroidtest/activities/RecyclerViewActivity.xtend: -------------------------------------------------------------------------------- 1 | package org.xtendroid.xtendroidtest.activities 2 | 3 | import java.util.ArrayList 4 | import org.xtendroid.app.AndroidActivity 5 | import org.xtendroid.app.OnCreate 6 | import org.xtendroid.xtendroidtest.R 7 | import org.xtendroid.xtendroidtest.adapter.AdapterWithViewHolder 8 | import org.xtendroid.xtendroidtest.models.User 9 | import org.xtendroid.xtendroidtest.adapter.RVAdapter 10 | import android.support.v7.widget.LinearLayoutManager 11 | 12 | /** 13 | * Test usage of @AndroidAdapter annotation 14 | */ 15 | @AndroidActivity(R.layout.activity_recyclerview) class RecyclerViewActivity { 16 | 17 | @OnCreate 18 | def init() { 19 | val users = new ArrayList; 20 | (1..10).forEach [i| 21 | var u = new User 22 | u.firstName = "User" + i 23 | u.lastName = "Surname" + i 24 | u.age = i 25 | users.add(u) 26 | ] 27 | 28 | rv.adapter = new RVAdapter(this, users) 29 | rv.setHasFixedSize(true); 30 | var llm = new LinearLayoutManager(this); 31 | llm.setOrientation(LinearLayoutManager.VERTICAL); 32 | rv.setLayoutManager(llm); 33 | } 34 | 35 | } -------------------------------------------------------------------------------- /examples/HelloWorld/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | XtendHelloWorld 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.xtext.ui.shared.xtextBuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.andmore.ResourceManagerBuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.andmore.PreCompilerBuilder 20 | 21 | 22 | 23 | 24 | org.eclipse.jdt.core.javabuilder 25 | 26 | 27 | 28 | 29 | org.eclipse.andmore.ApkBuilder 30 | 31 | 32 | 33 | 34 | 35 | org.eclipse.andmore.AndroidNature 36 | org.eclipse.jdt.core.javanature 37 | org.eclipse.xtext.ui.shared.xtextNature 38 | 39 | 40 | -------------------------------------------------------------------------------- /examples/Sample1/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | XtendroidSample1 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.xtext.ui.shared.xtextBuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.andmore.ResourceManagerBuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.andmore.PreCompilerBuilder 20 | 21 | 22 | 23 | 24 | org.eclipse.jdt.core.javabuilder 25 | 26 | 27 | 28 | 29 | org.eclipse.andmore.ApkBuilder 30 | 31 | 32 | 33 | 34 | 35 | org.eclipse.andmore.AndroidNature 36 | org.eclipse.jdt.core.javanature 37 | org.eclipse.xtext.ui.shared.xtextNature 38 | 39 | 40 | -------------------------------------------------------------------------------- /examples/Sample1/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 11 | 12 | 19 | 20 |