RecyclerViewTemplate icon indicating copy to clipboard operation
RecyclerViewTemplate copied to clipboard

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

Open sonvp opened this issue 7 years ago • 1 comments

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

sonvp avatar Oct 05 '17 09:10 sonvp

@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.

ckdevrel avatar Oct 06 '17 05:10 ckdevrel