blob: 344b33086a2b1402ff7e9c6c6414869bed3d3413 [file] [log] [blame]
[comment encoding = UTF-8 /]
[comment]
Copyright (c) 2010, 2012 Obeo
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License 1.0
Any license can be applied to the files generated with this template
and Acceleo.
author <a href="mailto:jonathan.musset@obeo.fr">Jonathan Musset</a>
[/comment]
[module listrowXML('http://www.eclipse.org/acceleo/example/android')/]
[template public listrowXML(a : Activity)]
[file ('/res/layout/listrow.xml', false, 'UTF-8')]
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content" android:layout_height="wrap_content">
[for (w : Widget | widgets)]
[if (w.oclIsKindOf(Text))]
<TextView android:id="@+id/textRow[w.name.toUpperFirst()/]" xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="100px"
android:layout_height="40px"/>
[elseif (w.oclIsKindOf(Spinner))]
<TextView android:id="@+id/textRow[w.name.toUpperFirst()/]" xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="100px"
android:layout_height="40px"/>
[/if]
[/for]
</LinearLayout>
[/file]
[/template]