cancel
Showing results for 
Search instead for 
Did you mean: 

View class inheritance

maciek
Associate II

Hello,

I am working now on project where screens have many things in common (slide menus, content etc). Is it possible to make a screen which will be the base class for further screens? Or I should make it a custom container?

2 REPLIES 2
cameronf
Senior

I think if you're not using the designer it might be reasonable to achieve with a base class, but with the auto-generated code scheme when using the designer I think making containers for any content you want on multiple screens is the way to go, that's what I've been doing so far.

Would like to hear if anyone has any different opinions on the best way to do this or found a way they like of maintaining inherited views alongside the designer even if it's a bit hacky.

EDIT: typo

maciek
Associate II

I am trying to not use the designer- I learn then more and I am becoming more fluent in touchgfx API. I tried to inherit it and it even compiled but when I add some trasitions between screens it yells that can not call bind() method.

Now ill try to make it in container way.