MCPcopy Create free account
hub / github.com/AshampooSystems/boden / ButtonCore

Method ButtonCore

framework/ui/platforms/android/src/ButtonCore.cpp:13–26  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11namespace bdn::ui::android
12{
13 ButtonCore::ButtonCore(const std::shared_ptr<ViewCoreFactory> &viewCoreFactory)
14 : ViewCore(viewCoreFactory, createAndroidViewClass<bdn::android::wrapper::NativeButton>(viewCoreFactory)),
15 _jButton(getJViewAS<bdn::android::wrapper::NativeButton>())
16 {
17 label.onChange() += [=](auto &property) {
18 textChanged(property.get());
19 scheduleLayout();
20 };
21
22 imageURL.onChange() += [=](auto &property) { imageChanged(property.get()); };
23
24 bdn::android::wrapper::NativeViewCoreClickListener listener;
25 _jButton.setOnClickListener(listener.cast<bdn::android::wrapper::OnClickListener>());
26 }
27
28 bdn::android::wrapper::NativeButton &ButtonCore::getJButton() { return _jButton; }
29

Callers

nothing calls this directly

Calls 2

setOnClickListenerMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected