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

Method CheckboxCore

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

Source from the content-addressed store, hash-verified

9{
10
11 CheckboxCore::CheckboxCore(const std::shared_ptr<ViewCoreFactory> &viewCoreFactory)
12 : ViewCore(viewCoreFactory, createAndroidViewClass<bdn::android::wrapper::CheckBox>(viewCoreFactory)),
13 _jCheckBox(getJViewAS<bdn::android::wrapper::CheckBox>())
14 {
15 _jCheckBox.setSingleLine(true);
16
17 label.onChange() += [=](auto &property) {
18 _jCheckBox.setText(property.get());
19 scheduleLayout();
20 };
21
22 state.onChange() += [=](auto &property) { _jCheckBox.setChecked(property.get() == TriState::On); };
23
24 bdn::android::wrapper::NativeViewCoreClickListener listener;
25 _jCheckBox.setOnClickListener(listener);
26 }
27
28 void CheckboxCore::clicked()
29 {

Callers

nothing calls this directly

Calls 3

setOnClickListenerMethod · 0.80
setTextMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected