A
A
Andrey K2018-06-18 20:56:37
Android
Andrey K, 2018-06-18 20:56:37

Is there a technology similar to Angular's visual components for Android?

In the Angular family of JavaScript frameworks, you can create "visual components" that combine logic and visual presentation. Such a component can be used repeatedly, and it "communicates" with the environment through the properties allocated for this.
Is there a similar technology for native Android programming?
Traditionally, you have to look for interface elements in an activity and set properties for them. Yes, and data preparation nearby. As the complexity of the program grows, you start to think ...
I know that you can extend the visual class, pass incoming parameters through xml attributes and process them in the constructor. Seems like a dirty hack.
There are fragments, working with them also does not seem easy (maybe not yet).
Is there a way, roughly speaking, to specify your tag in the markup like this:
and encapsulate all the logic for displaying this visual component in a separate ... program component?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Eugene, 2018-06-18
@aakumykov

it?

ngAndroid
The next library that I liked is ngAndroid, which is based on the ideas of the AngularJS JavaScript framework (but only ideas - no JavaScript here).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question