#include <cstdint>
#include <map>
#include "AppViewIDs.h"
-#include "components/ui_label_ext.h"
-#include"language/font/ui_resource_string.h"
#include "UiConfig.h"
#include "UISamplePresenter.h"
UISampleModel(const UISampleModel &);
UISampleModel &operator=(const UISampleModel &);
virtual ~UISampleModel();
-
};
}
public UIView::OnDragListener {
public:
UISamplePresenter();
- virtual ~UISamplePresenter();
+ ~UISamplePresenter() override;
- virtual void OnStart() override;
- virtual void OnResume() override;
- virtual void OnStop() override;
+ void OnStart() override;
+ void OnResume() override;
+ void OnStop() override;
bool OnClick(UIView &view, const ClickEvent &event) override;
- virtual bool OnDrag(UIView& view, const DragEvent& event) override;
+ bool OnDrag(UIView& view, const DragEvent& event) override;
private:
UISampleModel *uisampleModel;
-
};
}
#include "components/ui_view_group.h"
#include "components/ui_scroll_view.h"
#include "components/ui_label.h"
-#include "components/ui_label_ext.h"
#include "components/ui_list.h"
#include "window/window.h"
#include "BaseView.h"
class UISampleOnDragListener : public UIView::OnDragListener {
public:
UISampleOnDragListener() {}
- virtual ~UISampleOnDragListener() {}
+ ~UISampleOnDragListener() override {}
- bool OnDrag(UIView& view, const DragEvent& event)
+ bool OnDrag(UIView& view, const DragEvent& event) override
{
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "UISampleOnDragListener::OnDrag");
UNUSED(view);
class UISampleView : public View<UISamplePresenter> {
public:
UISampleView();
- virtual ~UISampleView();
+ ~UISampleView();
static UISampleView *GetInstance()
{
return &instance;
}
- virtual void OnStart() override;
- virtual void OnSetUpView() override;
- virtual void OnTearDownView() override;
- virtual void OnStop() override;
+ void OnStart() override;
+ void OnSetUpView() override;
+ void OnTearDownView() override;
+ void OnStop() override;
void InitView();
private:
#include "UISampleView.h"
#include "UISampleModel.h"
#include "UISamplePresenter.h"
-#if defined(SUPPORT_POWER_MANAGER)
-#include "power_display_service.h"
-#endif
+#include "ui_service.h"
namespace OHOS {
UISamplePresenter::UISamplePresenter()
void UISamplePresenter::OnStart()
{
-#if defined(SUPPORT_POWER_MANAGER)
- const power_display_svr_api_t *display_api = power_display_svr_get_api();
- if (display_api->get_screen_state() != SCREEN_ON) {
- display_api->turn_on_screen();
- }
- display_api->set_screen_set_keepon_timeout(-1);
-#endif
Presenter<UISampleView>::OnStart();
+ SendMsgToUIService(UI_ADD_SLEEP_VETO, 0, nullptr, 0);
}
void UISamplePresenter::OnResume(void)
{
- if (view_ == nullptr) {
- return;
- }
}
void UISamplePresenter::OnStop(void)
{
-#if defined(SUPPORT_POWER_MANAGER)
- const power_display_svr_api_t *display_api = power_display_svr_get_api();
- display_api->set_screen_set_keepon_timeout(0);
-#endif
+ SendMsgToUIService(UI_RM_SLEEP_VETO, 0, nullptr, 0);
return;
}
{
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "UISamplePresenter::OnDrag");
UNUSED(view);
- UNUSED(event);
+ UNUSED(event);
return false;
}
{
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "UISamplePresenter::OnDrag");
UNUSED(view);
- UNUSED(event);
- return true;
+ UNUSED(event);
+ return true;
}
}
mainList_->SetThrowDrag(true);
mainList_->SetReboundSize(100); // 100: rebound size
mainList_->SetElastic(true);
+ mainList_->SetYScrollBarVisible(true);
adapter_ = new TestCaseListAdapter();
UITestGroup::GetInstance()->SetUpTestCase();
mainList_->SetAdapter(adapter_);
View<UISamplePresenter>::OnStop();
return;
}
-
}
#include "components/abstract_adapter.h"
#include "components/root_view.h"
#include "components/ui_label.h"
-#include "components/ui_label_ext.h"
#include "components/ui_label_button.h"
namespace OHOS {
#define UI_TEST_H
#include "components/ui_label.h"
-#include "components/ui_label_ext.h"
#include "components/ui_view_group.h"
#include "common/screen.h"
#include "gfx_utils/style.h"
#include "ui_test_countdown/ui_test_countdown.h"
#include "ui_test_running_ball/ui_test_running_ball.h"
#endif
+#if ENABLE_SOFT_KEYBOARD
+#include "ui_test_keyboard/ui_test_keyboard.h"
+#endif
#include "ui_test_tiger/ui_test_tiger.h"
+#include "ui_test_hexagons_list/ui_test_hexagons_list.h"
#include "ui_test_video_play/ui_test_video_play.h"
+#include "ui_test_coverflow/ui_test_coverflow.h"
+#include "ui_test_kaleidoscope/ui_test_kaleidoscope.h"
namespace OHOS {
void UITestGroup::AddTestCase(TestCaseInfo testCaseInfo)
}
testCaseList_->Clear();
testCaseList_->PushBack(TestCaseInfo{"老虎头", new UITestTiger()});
+ testCaseList_->PushBack(TestCaseInfo{"蜂窝表盘", new UITestHexagonsList()});
testCaseList_->PushBack(TestCaseInfo{"滑动列表", new UITestListFPS()});
testCaseList_->PushBack(TestCaseInfo{"卡片切换", new UITestCardSwitch()});
testCaseList_->PushBack(TestCaseInfo{"立方体旋转", new UITestCubeRotate()});
testCaseList_->PushBack(TestCaseInfo{"消息", new UITestMessage()});
testCaseList_->PushBack(TestCaseInfo{"呼吸效果", new UITestBreath()});
+ testCaseList_->PushBack(TestCaseInfo{"覆盖流", new UITestCoverflow()});
+ testCaseList_->PushBack(TestCaseInfo{"万花筒", new UITestKaleidoscope()});
#if ENABLE_VGU_ENGINE && CAPABILITY_HWDRAW_PATH
testCaseList_->PushBack(TestCaseInfo{"倒计时", new UITestCountdown()});
testCaseList_->PushBack(TestCaseInfo{"动画曲线", new UITestRunningBall()});
#endif
- //testCaseList_->PushBack(TestCaseInfo{"视频播放", new UITestVideoPlay()});
+#if ENABLE_SOFT_KEYBOARD
+ testCaseList_->PushBack(TestCaseInfo{"软键盘", new UITestKeyboard()});
+#endif
+ testCaseList_->PushBack(TestCaseInfo{"视频播放", new UITestVideoPlay()});
}
List<TestCaseInfo>& UITestGroup::GetTestCase()