You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So what's happening here is that your inflatimg the xml on setcontentview and then mounting it onto anvil for the bindings. Have you tried calling anvil.render()? Cause it currently has a bug with xml views however thats with building the view through anvil renderable.
xml() works only inside Renderables (e.g. RenderableViews or lambdas). In the first snippet you first inflate the XML layout into the activity (or fragment?), so there is no need to use xml() anymore since it does the same.
I would write it as:
protectedvoidonCreate(Bundleb) {
super.onCreate(b);
setContentView(newMyView(this)); // I like to keep activities small and dumb
}
classMyViewextendsRenderableView {
...
publicvoidview() {
xml(R.layout.activity_git_list, () -> { // this will inflate the layout into the MyView view groupwithId(R.id.loading, () -> { // this will update the "loading" widget inside the given XML layoutvisibility(progressVisibility);
});
});
}
}
First I translate the kotlin code on readme sample
and how I make it works
I can fix it on readme if you approve...
The text was updated successfully, but these errors were encountered: