Skip to content

Commit

Permalink
Merge commit '648da629d53fb2725039103458abddcd3e651fe3' into version-2
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubkinst committed Mar 8, 2017
2 parents 25c92ee + 648da62 commit fcde71b
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 6 deletions.
Expand Up @@ -19,10 +19,10 @@
to="${escapeXmlAttribute(resOut)}/layout/${layoutName}.xml" />

<instantiate from="root/src/app_package/Screen.java.ftl"
to="${escapeXmlAttribute(srcOut)}/${screenClass}.java" />
to="${escapeXmlAttribute(srcOut)}/${scrPackage}/${screenClass}.java" />

<instantiate from="root/src/app_package/ViewModel.java.ftl"
to="${escapeXmlAttribute(srcOut)}/${viewModelClass}.java" />
to="${escapeXmlAttribute(srcOut)}/${vmPackage}/${viewModelClass}.java" />

<open file="${escapeXmlAttribute(srcOut)}/${screenClass}.java" />
<open file="${escapeXmlAttribute(resOut)}/layout/${layoutName}.xml" />
Expand Down
@@ -1,7 +1,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" >

<application>
<activity android:name="${relativePackage}.${screenClass}"
<activity android:name="${relativePackage}.<#if scrPackage != "">${scrPackage}.</#if>${screenClass}"
<#if isNewProject>
android:label="@string/app_name"
<#else>
Expand Down
@@ -1,4 +1,4 @@
package ${packageName};
package ${packageName}<#if scrPackage != "">.${scrPackage}</#if>;

<#if screenType == "Fragment">
import android.os.Bundle;
Expand Down
@@ -1,4 +1,4 @@
package ${packageName};
package ${packageName}<#if vmPackage != "">.${vmPackage}</#if>;

import android.databinding.ObservableField;
import android.view.View;
Expand Down
Expand Up @@ -7,7 +7,7 @@

<variable
name="viewModel"
type="${packageName}.${viewModelClass}"/>
type="${packageName}.<#if vmPackage != "">${vmPackage}.</#if>${viewModelClass}"/>
</data>
<#if useStatefulLayout>
<cz.kinst.jakub.view.StatefulLayout
Expand Down
Expand Up @@ -69,6 +69,18 @@
constraints="package"
default="com.mycompany.myapp" />

<parameter
id="vmPackage"
name="View Model Package name"
type="string"
default="viewmodel" />

<parameter
id="scrPackage"
name="Screen Package name"
type="string"
default="activity" />

<!-- 128x128 thumbnails relative to template.xml -->
<thumbs>
<!-- default thumbnail is required -->
Expand Down

0 comments on commit fcde71b

Please sign in to comment.