Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

Titanium Alloy: View folder structure

$
0
0

I am trying to arrange the code for better readability. I have multiple reusable views, may be more precise, predefined labels/buttons with specific properties. Following are questions

  1. Can I have single xml file, defining all views with defined properties and use require or some other tag to use specific view from xml file?
  2. 2nd approach I have, I define one xml for each view with predefined property and reuse it in all views. But here I will have multiple files one for each view. So I would like to keep it in a folder within view. Question is, if I keep respective tss and controller files, do I need to have in same hierarchy? I tried it but not working.

eg. Say I have file named topHeader.xml and respective files in respective folders. Following structure is not picking styles

./controllers/UIElements/topHeader.js
./styles/UIElements/topHeader.tss
./themes/nurse_theme/styles/UIElenents/topHeader.tss
./views/UIElements/topHeader.xml
However following structure works fine
./controllers/topHeader.js
./styles/topHeader.tss
./themes/nurse_theme/styles/topHeader.tss
./views/topHeader.xml

Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>