ckdevrel / RecyclerViewTemplate

One Template which solves all frequently used RecyclerViews Code Snippets
https://medium.com/androidstarters/mastering-android-studio-templates-ed8fdd98cb78
Other
410 stars 83 forks source link

Visibility parameters support And(&&) operator in fremarker android studio #3

Open sonvp opened 7 years ago

sonvp commented 7 years ago

I am creating a template using freemarker. I want to check And (&&) operator with two checkbox. I check it with &&, it not working. The following is a sample template code:

<?xml version="1.0"?>
<template
    minApi="7"
    minBuildApi="8">

.......
<parameter 
   id="hasTabLayout" 
   name="Have Tab Layout" 
   type="boolean" 
   default="false"/>

<parameter 
   id="hasRecycleViewTabOne" 
   name="Tab one have recycleView" 
   type="boolean" 
   default="false"/>

<parameter
   id="adapterTabOneName"
   name="Adapter Tab One Name"
   type="string"
   constraints="class|unique|nonempty"
   default="BlankTabOneItem"
   **visibility="hasTabLayout && hasRecycleViewTabOne"** />
.......

Can you support me resolve it. Thank

ckdevrel commented 7 years ago

@sonvp Hey thanks for opening this issue. I am not sure why (AND) operator doesn't work with free marker. I was also facing the same issue, I guess there might be some limitation.