File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
harmony/spring_scrollview/src/main/cpp Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -226,8 +226,13 @@ void SpringScrollViewComponentInstance::onStateChanged(SharedConcreteState const
226
226
: stateData.getContentSize ().height ;
227
227
this ->getLocalRootArkUINode ().setContentSize (
228
228
{static_cast <float >(stateData.getContentSize ().width ), static_cast <float >(tempHeight)});
229
- DLOG (INFO) << " SpringScrollViewComponentInstance onStateChanged h:" << tempHeight
230
- << " w:" << m_layoutMetrics.frame .size .width ;
229
+ DLOG (INFO) << " SpringScrollViewComponentInstance onStateChanged content_h:" << stateData.getContentSize ().height
230
+ << " content_w:" << stateData.getContentSize ().width << " h:" <<m_layoutMetrics.frame .size .height << " w:" << m_layoutMetrics.frame .size .width ;
231
+ if (!this ->firstShowUI ){
232
+ this ->getLocalRootArkUINode ().setChildHeight (m_layoutMetrics.frame .size .height );
233
+ this ->getLocalRootArkUINode ().setChildWidth (m_layoutMetrics.frame .size .width );
234
+ }
235
+ this ->firstShowUI = false ;
231
236
}
232
237
233
238
bool SpringScrollViewComponentInstance::isHandlingTouches () const { return this ->swiperStatus ; }
Original file line number Diff line number Diff line change @@ -56,6 +56,7 @@ class SpringScrollViewComponentInstance : public CppComponentInstance<facebook::
56
56
facebook::react::Size m_containerSize;
57
57
facebook::react::Size m_contentSize;
58
58
std::weak_ptr<NativeAnimatedTurboModule> m_springNativeAnimatedTurboModule{};
59
+ bool firstShowUI = true ;
59
60
public:
60
61
SpringScrollViewComponentInstance (Context context);
61
62
void onChildInserted (ComponentInstance::Shared const &childComponentInstance, std::size_t index) override ;
You can’t perform that action at this time.
0 commit comments