Skip to content
This repository was archived by the owner on May 4, 2022. It is now read-only.
This repository was archived by the owner on May 4, 2022. It is now read-only.

Add manuel linking to ViewModel-like views #234

@smaugho

Description

@smaugho

Right now ViewModels are linked automatically by DecleX, but some times it could be useful (and informative) to link manually the ViewModel and the view, in the simple possible way.

A simple way to do this, is to make the populate methods or any view-linking (@click or similar annotation) to create a "linking" method, this will be used only in the "@export" behavior.

you can link the view model then to the view through methods, or assigns..

viewModel.linkGetUserName(R.id.userName);
viewModel.linkSomePopulatorMethodOrProperty(R.id.someId);

DecleX automatically could do this, but when the programmer do it, then it is not used the one done by DecleX.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions