mcu_hi3321_watch/tjd/ui/app/setting/TjdUiComponentList.h
2025-05-26 20:15:20 +08:00

33 lines
766 B
C++

#ifndef TJD_UI_COMPONENT_LIST_H
#define TJD_UI_COMPONENT_LIST_H
#include "components/ui_list.h"
namespace TJD {
class TjdUIListView : public OHOS::UIViewGroup
{
public:
OHOS::Vector2<float> GetScaleCenter() { return itemScaleCenter_; }
void SetScaleCenter(OHOS::Vector2<float> itemScaleCenter) { itemScaleCenter_ = itemScaleCenter; }
private:
OHOS::Vector2<float> itemScaleCenter_ = {0, 0};
};
class TjdUIList : public OHOS::UIList
{
public:
TjdUIList() {}
TjdUIList(int16_t scaleFactor) : scaleFactor_(scaleFactor) {}
void SetScaleFactor(int16_t value) { scaleFactor_ = value; }
void ReMeasure();
private:
int16_t scaleFactor_ = 360; // 480: default scale factor.
};
} // namespace TJD
#endif