I'm having trouble loading templates in my Android app. Right now I have added the template files in the res/raw folder. They cannot be found, so I have loaded the resource as a stream and complied the template using the stream. This works, but it can't find any partial templates. I tried compiling the used templates in the same factory, but that did not work either.
Where in the project structure am I supposed to store the templates?
Do I need to do anything special to load partial templates?
Here's an example of how I load templates now, which work for the base template, but not for partials.
Mustache getMessageTemplate() {
MustacheFactory factory = new DefaultMustacheFactory();
Mustache post = factory.compile(new InputStreamReader(getResources().openRawResource(R.raw.post)), "post");
factory.compile(new InputStreamReader(getResources().openRawResource(R.raw.message)), "message");
factory.compile(new InputStreamReader(getResources().openRawResource(R.raw.alarm)), "alarm");
factory.compile(new InputStreamReader(getResources().openRawResource(R.raw.groupapplicant)), "groupapplicant");
factory.compile(new InputStreamReader(getResources().openRawResource(R.raw.comment)), "comment");
return post;
}