1
votes

I am new to NativeScript and Javascript development in general. My background is Android.

Background:

As a test I try to replicate one of my old apps with NativeScript and have encountered a problem:

I use a RadListView with multiple templates. The correct template is chosen at runtime. The templateSelector uses a boolean variable to determine the correct one. (Imagine tapping a ListView item. When you do it expands and shows 2 buttons. You tap it again -> the buttons disappear.)

Now that works just fine.

Problem

My problem is that I cannot figure out how to animate the template switch. The new content just appears/disappear instantanously.

What I managed so far

I managed to animate the buttons when their template has just been chosen. I set their opacity to 0 and animated it to 1. Problem is: The necessery height for the buttons is reserved as soon as the template is chosen.

Question

Is this at all possible? If so how?

Sources

Expandable ListView items by manojdcoder: https://discourse.nativescript.org/t/expand-element-radlistview/4268/3

1

1 Answers

1
votes

There are few built-in animations you could find in the docs and working examples in Github.