| 137 | } |
| 138 | |
| 139 | void ViewCore::updateGeometry() |
| 140 | { |
| 141 | bdn::JavaObject parent(_jView.getParent().getRef_()); |
| 142 | Rect rGeometry = geometry; |
| 143 | |
| 144 | if (parent.isNull_()) { |
| 145 | auto thisViewAsNativeGroup = getJViewAS<bdn::android::wrapper::NativeViewGroup>(); |
| 146 | if (thisViewAsNativeGroup.isInstanceOf_(bdn::android::wrapper::NativeViewGroup::javaClass())) { |
| 147 | thisViewAsNativeGroup.setSize((int)(rGeometry.width * _uiScaleFactor), |
| 148 | (int)(rGeometry.height * _uiScaleFactor)); |
| 149 | } |
| 150 | } else { |
| 151 | bdn::android::wrapper::NativeViewGroup parentView(parent.getRef_()); |
| 152 | if (parentView.isInstanceOf_(bdn::android::wrapper::NativeViewGroup::javaClass())) { |
| 153 | parentView.setChildBounds(getJView(), (int)(rGeometry.x * _uiScaleFactor), |
| 154 | (int)(rGeometry.y * _uiScaleFactor), (int)(rGeometry.width * _uiScaleFactor), |
| 155 | (int)(rGeometry.height * _uiScaleFactor)); |
| 156 | } else { |
| 157 | _jView.layout((int)(rGeometry.x * _uiScaleFactor), (int)(rGeometry.y * _uiScaleFactor), |
| 158 | (int)(rGeometry.width * _uiScaleFactor), (int)(rGeometry.height * _uiScaleFactor)); |
| 159 | } |
| 160 | } |
| 161 | } |
| 162 | |
| 163 | std::shared_ptr<ViewCore> viewCoreFromJavaViewRef(const java::Reference &javaViewRef) |
| 164 | { |
nothing calls this directly
no test coverage detected