| 219 | bool WindowCore::handleBackPressed() { return false; } |
| 220 | |
| 221 | void WindowCore::updateContent(const std::shared_ptr<View> &view) |
| 222 | { |
| 223 | bdn::android::wrapper::NativeViewGroup parentGroup(getJView().getRef_()); |
| 224 | |
| 225 | parentGroup.removeAllViews(); |
| 226 | |
| 227 | if (view) { |
| 228 | if (auto childCore = view->core<android::ViewCore>()) { |
| 229 | parentGroup.addView(childCore->getJView()); |
| 230 | } else { |
| 231 | throw std::runtime_error("Cannot set this type of View as content"); |
| 232 | } |
| 233 | } |
| 234 | |
| 235 | updateChildren(); |
| 236 | } |
| 237 | |
| 238 | Rect WindowCore::getScreenWorkArea() const |
| 239 | { |