提交 dc492fbd 编写于 作者: L Lizhiqi

Description:support zIndex for view

IssueNo: https://gitee.com/openharmony/graphic_ui/issues/I5AD8G
Feature or Bugfix: Feature
Binary Source:No
Signed-off-by: Nlizhiqi <lizhiqi1@huawei.com>
上级 9202b145
......@@ -274,14 +274,14 @@ void RootView::RemoveViewFromInvalidMap(UIView* view)
/* delete node's children */
if (view->IsViewGroup() && stackCount < COMPONENT_NESTING_DEPTH) {
g_viewStack[stackCount++] = view;
view = static_cast<UIViewGroup*>(view)->GetChildrenHead();
view = static_cast<UIViewGroup*>(view)->GetChildrenRenderHead();
continue;
}
/* only go to child's sibling */
view = view->GetNextSibling();
/* only go to child's render sibling */
view = view->GetNextRenderSibling();
}
if (--stackCount >= 0) {
view = g_viewStack[stackCount]->GetNextSibling();
view = g_viewStack[stackCount]->GetNextRenderSibling();
}
} while (stackCount >= 0);
......@@ -349,7 +349,7 @@ void RootView::OptimizeInvalidMap()
}
g_viewStack[stackCount] = curview;
flags[stackCount++] = false;
curview = curview->GetNextSibling();
curview = curview->GetNextRenderSibling();
continue;
}
......@@ -374,7 +374,7 @@ void RootView::OptimizeInvalidMap()
return;
}
flags[stackCount++] = true;
curview = static_cast<UIViewGroup*>(curview)->GetChildrenHead();
curview = static_cast<UIViewGroup*>(curview)->GetChildrenRenderHead();
continue;
}
} else { // Back from child
......@@ -480,11 +480,11 @@ void RootView::Measure()
{
#if LOCAL_RENDER
if (!invalidateMap_.empty()) {
MeasureView(childrenHead_);
MeasureView(GetChildrenRenderHead());
}
#else
if (invalidateRects_.Size() > 0) {
MeasureView(childrenHead_);
MeasureView(GetChildrenRenderHead());
}
#endif
}
......@@ -499,14 +499,14 @@ void RootView::MeasureView(UIView* view)
curView->ReMeasure();
if (curView->IsViewGroup() && stackCount < COMPONENT_NESTING_DEPTH) {
g_viewStack[stackCount++] = curView;
curView = static_cast<UIViewGroup*>(curView)->GetChildrenHead();
curView = static_cast<UIViewGroup*>(curView)->GetChildrenRenderHead();
continue;
}
}
curView = curView->GetNextSibling();
curView = curView->GetNextRenderSibling();
}
if (--stackCount >= 0) {
curView = (g_viewStack[stackCount])->GetNextSibling();
curView = (g_viewStack[stackCount])->GetNextRenderSibling();
}
}
}
......@@ -670,7 +670,7 @@ void RootView::DrawTop(UIView* view, const Rect& rect)
g_viewStack[stackCount] = curView;
g_maskStack[stackCount] = mask;
stackCount++;
curView = static_cast<UIViewGroup*>(curView)->GetChildrenHead();
curView = static_cast<UIViewGroup*>(curView)->GetChildrenRenderHead();
mask = par->GetContentRect();
mask.Intersect(mask, curViewRect);
continue;
......@@ -695,7 +695,7 @@ void RootView::DrawTop(UIView* view, const Rect& rect)
}
}
}
curView = curView->GetNextSibling();
curView = curView->GetNextRenderSibling();
continue;
}
if (--stackCount >= 0) {
......@@ -719,12 +719,12 @@ void RootView::DrawTop(UIView* view, const Rect& rect)
relativeRect.GetY() - transViewGroup->GetStyle(STYLE_MARGIN_TOP));
transViewGroup = nullptr;
}
curView = g_viewStack[stackCount]->GetNextSibling();
curView = g_viewStack[stackCount]->GetNextRenderSibling();
par = par->GetParent();
continue;
}
stackCount = 0;
curView = par->GetNextSibling();
curView = par->GetNextRenderSibling();
if (enableAnimator) {
par->OnPostDraw(*dc_.mapBufferInfo, rect);
} else {
......@@ -749,14 +749,14 @@ UIView* RootView::GetTopUIView(const Rect& rect)
}
if (currentView->IsViewGroup() && stackCount < COMPONENT_NESTING_DEPTH) {
g_viewStack[stackCount++] = currentView;
currentView = static_cast<UIViewGroup*>(currentView)->GetChildrenHead();
currentView = static_cast<UIViewGroup*>(currentView)->GetChildrenRenderHead();
continue;
}
}
currentView = currentView->GetNextSibling();
currentView = currentView->GetNextRenderSibling();
}
if (--stackCount >= 0) {
currentView = (g_viewStack[stackCount])->GetNextSibling();
currentView = (g_viewStack[stackCount])->GetNextRenderSibling();
}
}
UIView* parentView = topView;
......@@ -779,7 +779,7 @@ bool RootView::FindSubView(const UIView& parentView, const UIView* subView)
return false;
}
UIView* currentView = static_cast<const UIViewGroup*>(root)->GetChildrenHead();
UIView* currentView = static_cast<const UIViewGroup*>(root)->GetChildrenRenderHead();
const UIView* parent = root;
int8_t deep = 1;
while (deep > 0) {
......@@ -787,15 +787,15 @@ bool RootView::FindSubView(const UIView& parentView, const UIView* subView)
return true;
}
if (currentView == nullptr) {
currentView = parent->GetNextSibling();
currentView = parent->GetNextRenderSibling();
parent = parent->GetParent();
deep--;
} else if (currentView->IsViewGroup()) {
parent = currentView;
currentView = static_cast<UIViewGroup*>(currentView)->GetChildrenHead();
currentView = static_cast<UIViewGroup*>(currentView)->GetChildrenRenderHead();
deep++;
} else {
currentView = currentView->GetNextSibling();
currentView = currentView->GetNextRenderSibling();
}
}
return false;
......
......@@ -16,6 +16,7 @@
#include "components/ui_view.h"
#include "components/root_view.h"
#include "components/ui_view_group.h"
#include "core/render_manager.h"
#include "dfx/ui_view_bounds.h"
#include "dock/focus_manager.h"
......@@ -41,9 +42,11 @@ UIView::UIView()
#endif
opaScale_(OPA_OPAQUE),
index_(0),
zIndex_(0),
id_(nullptr),
parent_(nullptr),
nextSibling_(nullptr),
nextRenderSibling_(nullptr),
style_(nullptr),
transMap_(nullptr),
onClickListener_(nullptr),
......@@ -607,6 +610,16 @@ UIView* UIView::GetNextSibling() const
return nextSibling_;
}
void UIView::SetNextRenderSibling(UIView* renderSibling)
{
nextRenderSibling_ = renderSibling;
}
UIView* UIView::GetNextRenderSibling() const
{
return nextRenderSibling_;
}
void UIView::SetVisible(bool visible)
{
if (visible_ != visible) {
......@@ -1263,11 +1276,11 @@ uint8_t UIView::GetMixOpaScale() const
bool UIView::GetBitmap(ImageInfo& bitmap)
{
UIView* tempSibling = nextSibling_;
UIView* tempRenderSibling = nextRenderSibling_;
UIView* tempParent = parent_;
int16_t tempX = rect_.GetX();
int16_t tempY = rect_.GetY();
nextSibling_ = nullptr;
nextRenderSibling_ = nullptr;
parent_ = nullptr;
rect_.SetPosition(0, 0);
......@@ -1283,7 +1296,7 @@ bool UIView::GetBitmap(ImageInfo& bitmap)
void* viewBitmapBuffer = ImageCacheMalloc(bitmap);
if (viewBitmapBuffer == nullptr) {
GRAPHIC_LOGE("GetBitmap buffer alloc failed.");
nextSibling_ = tempSibling;
nextRenderSibling_ = tempRenderSibling;
parent_ = tempParent;
rect_.SetPosition(tempX, tempY);
return false;
......@@ -1310,7 +1323,7 @@ bool UIView::GetBitmap(ImageInfo& bitmap)
RootView::GetInstance()->MeasureView(this);
RootView::GetInstance()->DrawTop(this, mask);
RootView::GetInstance()->RestoreDrawContext();
nextSibling_ = tempSibling;
nextRenderSibling_ = tempRenderSibling;
parent_ = tempParent;
rect_.SetPosition(tempX, tempY);
return true;
......@@ -1356,4 +1369,21 @@ void UIView::ResizeVisibleArea(int16_t x, int16_t y, int16_t width, int16_t heig
visibleRect_->SetHeight(height);
visibleRect_->SetPosition(x, y);
}
void UIView::SetZIndex(int16_t zIndex)
{
if (zIndex_ == zIndex) {
return;
}
zIndex_ = zIndex;
if (parent_ != nullptr) {
reinterpret_cast<UIViewGroup*>(parent_)->UpdateRenderView(this);
}
}
int16_t UIView::GetZIndex()
{
return zIndex_;
}
} // namespace OHOS
......@@ -23,6 +23,7 @@
namespace OHOS {
UIViewGroup::UIViewGroup()
: childrenHead_(nullptr),
childrenRenderHead_(nullptr),
childrenTail_(nullptr),
childrenNum_(0),
isDragging_(false),
......@@ -63,6 +64,7 @@ void UIViewGroup::Add(UIView* view)
if (isAutoSize_) {
AutoResize();
}
UpdateRenderView(view);
OnChildChanged();
}
......@@ -80,6 +82,7 @@ void UIViewGroup::Insert(UIView* prevView, UIView* insertView)
if (childrenHead_ == nullptr) {
Add(insertView);
UpdateRenderView(insertView);
return;
}
......@@ -100,6 +103,7 @@ void UIViewGroup::Insert(UIView* prevView, UIView* insertView)
if (isAutoSize_) {
AutoResize();
}
UpdateRenderView(insertView);
OnChildChanged();
}
......@@ -114,6 +118,7 @@ void UIViewGroup::Remove(UIView* view)
InvalidateRect(view->GetRect());
#endif
if (childrenHead_ == view) {
RemoveRenderView(view);
childrenHead_ = childrenHead_->GetNextSibling();
view->SetParent(nullptr);
view->SetNextSibling(nullptr);
......@@ -127,6 +132,7 @@ void UIViewGroup::Remove(UIView* view)
UIView* node = childrenHead_;
while (node->GetNextSibling() != nullptr) {
if (node->GetNextSibling() == view) {
RemoveRenderView(view);
node->SetNextSibling(view->GetNextSibling());
view->SetParent(nullptr);
view->SetNextSibling(nullptr);
......@@ -146,6 +152,7 @@ void UIViewGroup::RemoveAll()
UIView* node = childrenHead_;
childrenHead_ = nullptr;
childrenTail_ = nullptr;
childrenRenderHead_ = nullptr;
childrenNum_ = 0;
UIView* tmp = nullptr;
while (node != nullptr) {
......@@ -153,6 +160,7 @@ void UIViewGroup::RemoveAll()
node = node->GetNextSibling();
tmp->SetParent(nullptr);
tmp->SetNextSibling(nullptr);
tmp->SetNextRenderSibling(nullptr);
}
OnChildChanged();
}
......@@ -180,7 +188,7 @@ void UIViewGroup::GetTargetView(const Point& point, UIView** last)
if (isDragging_) {
return;
}
UIView* view = childrenHead_;
UIView* view = GetChildrenRenderHead();
while (view != nullptr) {
if (!view->IsViewGroup()) {
rect = view->GetRect();
......@@ -191,7 +199,7 @@ void UIViewGroup::GetTargetView(const Point& point, UIView** last)
UIViewGroup* viewGroup = static_cast<UIViewGroup*>(view);
viewGroup->GetTargetView(point, last);
}
view = view->GetNextSibling();
view = view->GetNextRenderSibling();
}
}
......@@ -220,7 +228,7 @@ void UIViewGroup::GetTargetView(const Point& point, UIView** current, UIView** t
if (isDragging_) {
return;
}
UIView* view = childrenHead_;
UIView* view = GetChildrenRenderHead();
while (view != nullptr) {
if (!view->IsViewGroup()) {
rect = view->GetRect();
......@@ -231,7 +239,7 @@ void UIViewGroup::GetTargetView(const Point& point, UIView** current, UIView** t
UIViewGroup* viewGroup = static_cast<UIViewGroup*>(view);
viewGroup->GetTargetView(point, current, target);
}
view = view->GetNextSibling();
view = view->GetNextRenderSibling();
}
}
......@@ -257,6 +265,20 @@ Rect UIViewGroup::GetAllChildRelativeRect() const
return rect;
}
UIView* UIViewGroup::GetChildrenRenderHead() const
{
return childrenRenderHead_;
}
void UIViewGroup::SetChildrenRenderHead(UIView* renderHead)
{
if ((renderHead != nullptr) && (renderHead->GetParent() != this)) {
GRAPHIC_LOGE("can not set as render head if it is not a child view");
return;
}
childrenRenderHead_ = renderHead;
}
UIView* UIViewGroup::GetChildById(const char* id) const
{
if (id == nullptr || childrenHead_ == nullptr) {
......@@ -304,4 +326,146 @@ void UIViewGroup::AutoResize()
SetWidth(rect.GetWidth() + rect.GetLeft());
SetHeight(rect.GetHeight() + rect.GetTop());
}
void UIViewGroup::RemoveRenderView(UIView* targetView)
{
if (targetView == nullptr) {
return;
}
if (targetView->GetParent() == nullptr) {
return;
}
UIViewGroup* viewGroup = reinterpret_cast<UIViewGroup*>(targetView->GetParent());
UIView* node = viewGroup->GetChildrenRenderHead();
if (node == nullptr) {
return;
}
if (node == targetView) {
viewGroup->SetChildrenRenderHead(node->GetNextRenderSibling());
targetView->SetNextRenderSibling(nullptr);
} else {
while (node->GetNextRenderSibling() != nullptr) {
if (node->GetNextRenderSibling() == targetView) {
node->SetNextRenderSibling(targetView->GetNextRenderSibling());
targetView->SetNextRenderSibling(nullptr);
break;
}
node = node->GetNextRenderSibling();
}
}
}
void UIViewGroup::UpdateRenderView(UIView* targetView)
{
if (targetView == nullptr) {
return;
}
if (targetView->GetParent() == nullptr) {
return;
}
RemoveRenderView(targetView);
UIViewGroup* viewGroup = reinterpret_cast<UIViewGroup*>(targetView->GetParent());
UIView* curView = viewGroup->GetChildrenRenderHead();
if (curView == nullptr) {
viewGroup->SetChildrenRenderHead(targetView);
targetView->SetNextRenderSibling(nullptr);
return;
}
int16_t curZIndex = curView->GetZIndex();
int16_t targetZIndex = targetView->GetZIndex();
int16_t nextZIndex;
UIView* nextView = curView->GetNextRenderSibling();
UIView* preView = nullptr;
if (curZIndex > targetZIndex) {
targetView->SetNextRenderSibling(curView);
viewGroup->SetChildrenRenderHead(targetView);
return;
}
if (nextView == nullptr) {
curView->SetNextRenderSibling(targetView);
targetView->SetNextRenderSibling(nullptr);
return;
}
while (nextView != nullptr) {
curZIndex = curView->GetZIndex();
nextZIndex = nextView->GetZIndex();
if (curZIndex == targetZIndex) {
InsertRenderView(curView, preView, targetView);
return;
}
if ((curZIndex < targetZIndex) && (targetZIndex < nextZIndex)) {
curView->SetNextRenderSibling(targetView);
targetView->SetNextRenderSibling(nextView);
return;
}
preView = curView;
curView = nextView;
nextView = nextView->GetNextRenderSibling();
}
curView->SetNextRenderSibling(targetView);
targetView->SetNextRenderSibling(nullptr);
}
void UIViewGroup::InsertRenderView(UIView* archorView, UIView* anchorPreView, UIView* targetView)
{
if ((targetView == nullptr) || (archorView == nullptr)) {
return;
}
if (archorView->GetParent() == nullptr) {
return;
}
UIViewGroup* viewGroup = reinterpret_cast<UIViewGroup*>(archorView->GetParent());
UIView* node = viewGroup->GetChildrenHead();
if (node == nullptr) {
return;
}
int16_t curZIndex = node->GetZIndex();
int16_t targetZIndex = targetView->GetZIndex();
UIView* newArchorView = nullptr;
if (node == targetView) {
targetView->SetNextRenderSibling(viewGroup->GetChildrenRenderHead());
viewGroup->SetChildrenRenderHead(targetView);
return;
}
while (node->GetNextSibling() != nullptr) {
curZIndex = node->GetNextSibling()->GetZIndex();
if (curZIndex == targetZIndex) {
if ((node->GetNextSibling() == targetView) && (newArchorView == nullptr)) {
targetView->SetNextRenderSibling(archorView);
if (viewGroup->GetChildrenRenderHead() == archorView) {
viewGroup->SetChildrenRenderHead(targetView);
}
if (anchorPreView != nullptr) {
anchorPreView->SetNextRenderSibling(targetView);
}
break;
}
if (node->GetNextSibling() != targetView) {
newArchorView = node->GetNextSibling();
}
}
if (node->GetNextSibling() == targetView) {
if (newArchorView != nullptr) {
targetView->SetNextRenderSibling(newArchorView->GetNextRenderSibling());
newArchorView->SetNextRenderSibling(targetView);
}
break;
}
node = node->GetNextSibling();
}
}
} // namespace OHOS
......@@ -1505,6 +1505,31 @@ public:
bool IsOnViewTree();
/**
* @brief Set view zIndex order
* @param zIndex specifies the stack order of an view. The default is zero.
* The greater order is in front of the lower order.
*/
void SetZIndex(int16_t zIndex);
/**
* @brief Get zIndex value of the view
* @return the zIndex order value
*/
int16_t GetZIndex();
/**
* @brief Sets the next render sibling view for the view.
* @param sibling Indicates the pointer to the next render sibling view to set.
*/
void SetNextRenderSibling(UIView* renderSibling);
/**
* @brief Obtains the next render sibling view of the view.
* @return Returns the pointer to the next render sibling view.
*/
UIView* GetNextRenderSibling() const;
protected:
bool touchable_ : 1;
bool visible_ : 1;
......@@ -1519,9 +1544,11 @@ protected:
#endif
uint8_t opaScale_;
int16_t index_;
int16_t zIndex_;
const char* id_;
UIView* parent_;
UIView* nextSibling_;
UIView* nextRenderSibling_;
Style* style_;
TransformMap* transMap_;
OnClickListener* onClickListener_;
......
......@@ -174,6 +174,20 @@ public:
return childrenTail_;
}
/**
* @brief Obtains the first render child view in this view group.
*
* @return Returns the first render child view.
*/
UIView* GetChildrenRenderHead() const;
/**
* @brief Set the first render child view in this view group.
*
* @param renderHead the first render child view.
*/
void SetChildrenRenderHead(UIView* renderHead);
/**
* @brief Sets whether this view group is intercepted upon touch events.
*
......@@ -236,6 +250,13 @@ public:
}
#endif
/**
* @brief Update the render tree
*
* @param targetView the view being added/removed or changed zIndex.
*/
void UpdateRenderView(UIView* targetView);
protected:
/**
* @brief Obtains the rectangle area of a new view group after being adaptive to the size of all child views.
......@@ -259,6 +280,11 @@ protected:
*/
UIView* childrenHead_;
/**
* @brief Indicates the pointer to the first render child view of this view group.
*/
UIView* childrenRenderHead_;
/**
* @brief Indicates the pointer to the last child view of this view group.
*/
......@@ -286,6 +312,8 @@ protected:
private:
void AutoResize();
void InsertRenderView(UIView* anchorView, UIView* anchorPreView, UIView* targetView);
void RemoveRenderView(UIView* targetView);
#if ENABLE_FOCUS_MANAGER
bool isInterceptFocus_ : 1;
#endif
......
......@@ -69,6 +69,7 @@ test_sources = [
"../uitest/test_view_group/ui_test_view_group.cpp",
"../uitest/test_view_percent/ui_test_view_percent.cpp",
"../uitest/test_view_scale_rotate/ui_test_view_scale_rotate.cpp",
"../uitest/test_view_zindex/ui_test_view_zindex.cpp",
"common/ui_text_language.cpp",
"src/test_ability.cpp",
"src/test_case_list_adapter.cpp",
......
......@@ -69,6 +69,7 @@
#include "test_view_bounds/ui_test_view_bounds.h"
#include "test_view_group/ui_test_view_group.h"
#include "test_view_percent/ui_test_view_percent.h"
#include "test_view_zindex/ui_test_view_zindex.h"
#include "test_view_scale_rotate/ui_test_view_scale_rotate.h"
#if ENABLE_VECTOR_FONT
#include "test_vector_font/ui_test_vector_font.h"
......@@ -87,6 +88,7 @@ void UITestGroup::AddTestCase(TestCaseInfo testCaseInfo)
void UITestGroup::SetUpTestCase()
{
testCaseList_.PushBack(TestCaseInfo{"View zIndex", new UITestViewZIndex()});
testCaseList_.PushBack(TestCaseInfo{"EditText", new UITestEditText()});
testCaseList_.PushBack(TestCaseInfo{"Clip", new UITestClip()});
#if ENABLE_ROTATE_INPUT
......
/*
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "ui_test_view_zindex.h"
#include "components/ui_label.h"
#include "components/ui_label_button.h"
namespace OHOS {
namespace {
constexpr int16_t BUTTON_OFFSET = 5;
constexpr int16_t BUTTON_GROUP_WIDTH = 150;
constexpr int16_t BUTTON_GROUP_HEIGHT = 600;
constexpr uint8_t ZINDEX_VIEW_NUM = 6;
constexpr uint8_t ZINDEX_BTN_NUM = 8;
constexpr uint8_t ZINDEX_MODIFY_NUM = 7;
constexpr uint8_t CHANGE_ZINDEX_VIEW_Y = 10;
constexpr uint8_t CHANGE_ZINDEX_VIEW_X = 100;
struct ZIndexView {
const char* text;
int16_t zIndex;
ColorType color;
};
struct ZIndexBtn {
const char* text;
int16_t zIndex;
};
const ZIndexBtn ZINDEX_BTN_GROUP[ZINDEX_BTN_NUM] = {{"zIndex->-1", -1}, {"zIndex->0", 0}, {"zIndex->1", 1},
{"zIndex->2", 2}, {"zIndex->3", 3}, {"zIndex->4", 4},
{"zIndex->5", 5}, {"zIndex->7", 7}};
const ZIndexView ZINDEX_VIEW_GROUP[ZINDEX_VIEW_NUM] = {
{"zIndex=6", 6, Color::Blue()}, {"zIndex=4", 4, Color::Blue()}, {"zIndex=2", 2, Color::Blue()},
{"A.zIndex=0", 0, Color::Magenta()}, {"B.zIndex=0", 0, Color::Magenta()}, {"C.zIndex=0", 0, Color::Magenta()}};
const char* MODIFY_INSERT_HEAD = "InsertHead";
const char* MODIFY_INSERT_TAIL = "InsertTail";
const char* MODIFY_AFTER_ZINDEX_4 = "AfterZIndex=4";
const char* MODIFY_AFTER_B_ZINDEX_0 = "AfterB.ZIndex=0";
const char* MODIFY_REMOVE = "Remove";
const char* MODIFY_RESET = "Reset";
const char* MODIFY_ANIMATE_IN = "AnimateIn";
const char* ZINDEX_MODIFY_GROUP[ZINDEX_MODIFY_NUM] = {
MODIFY_INSERT_HEAD, MODIFY_INSERT_TAIL, MODIFY_AFTER_ZINDEX_4, MODIFY_AFTER_B_ZINDEX_0,
MODIFY_REMOVE, MODIFY_RESET, MODIFY_ANIMATE_IN};
const char* ID_CHANGE_MY_ZINDEX = "Change zIndex";
const char* ID_CLICK_HINT = "clickHint";
const char* ID_ZINDEX_VIEW_VG = "zIndex_view_group1";
const char* ID_ZINDEX_BUTTON_VG = "zIndex_button_group";
const char* ID_CHILD_CHANGE_VG = "child_change_btn_group";
} // namespace
UITestViewZIndex::~UITestViewZIndex()
{
// todo
}
void UITestViewZIndex::SetUp()
{
if (container_ == nullptr) {
container_ = new UIScrollView();
container_->Resize(Screen::GetInstance().GetWidth(), Screen::GetInstance().GetHeight() - BACK_BUTTON_HEIGHT);
container_->SetHorizontalScrollState(false);
container_->SetThrowDrag(true);
}
}
void UITestViewZIndex::TearDown()
{
DeleteChildren(container_);
container_ = nullptr;
if (animator_ != nullptr) {
delete animator_;
animator_ = nullptr;
}
}
const UIView* UITestViewZIndex::GetTestView()
{
UIKitViewZIndex001();
return container_;
}
UILabel* UITestViewZIndex::CreateTitleLabel() const
{
UILabel* label = new UILabel();
label->SetHeight(TITLE_LABEL_DEFAULT_HEIGHT);
label->SetLineBreakMode(UILabel::LINE_BREAK_STRETCH);
label->SetPosition(TEXT_DISTANCE_TO_LEFT_SIDE, TEXT_DISTANCE_TO_TOP_SIDE);
label->SetFont(DEFAULT_VECTOR_FONT_FILENAME, FONT_DEFAULT_SIZE);
return label;
}
UILabel* UITestViewZIndex::CreateZIndexLabel(const char* text, int16_t zIndex, ColorType color)
{
UILabel* label = new UILabel();
label->Resize(300, 70); // 300: width 70:height
label->SetFont(DEFAULT_VECTOR_FONT_FILENAME, FONT_DEFAULT_SIZE);
label->SetZIndex(zIndex);
label->SetText(text);
label->SetViewId(text);
label->SetOnClickListener(this);
label->SetTouchable(true);
label->SetStyle(STYLE_BACKGROUND_COLOR, color.full);
label->SetStyle(STYLE_BACKGROUND_OPA, OPA_OPAQUE);
label->SetStyle(STYLE_BORDER_COLOR, Color::Red().full);
label->SetStyle(STYLE_BORDER_OPA, OPA_OPAQUE);
label->SetStyle(STYLE_BORDER_WIDTH, 2); // 2: border width
label->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);
return label;
}
UILabelButton* UITestViewZIndex::CreateZIndexBtn(const char* text)
{
UILabelButton* btn = new UILabelButton();
btn->Resize(120, 40); // 120: width 40:height
btn->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 15); // 15: font size
btn->SetText(text);
btn->SetViewId(text);
btn->SetOnClickListener(this);
return btn;
}
bool UITestViewZIndex::OnClick(UIView& view, const ClickEvent& event)
{
if (container_ == nullptr) {
return true;
}
ClickZIndexBtn(view);
ClickModifyBtn(view);
UpdateClickHint(view);
container_->Invalidate();
return true;
}
void UITestViewZIndex::ClickZIndexBtn(UIView& view)
{
UIView* zIndexView = container_->GetChildById(ID_CHANGE_MY_ZINDEX);
if (zIndexView == nullptr) {
return;
}
const char* id = view.GetViewId();
for (uint8_t i = 0; i < ZINDEX_BTN_NUM; i++) {
if (strcmp(id, ZINDEX_BTN_GROUP[i].text) == 0) {
zIndexView->SetZIndex(ZINDEX_BTN_GROUP[i].zIndex);
}
}
}
void UITestViewZIndex::ClickModifyBtn(UIView& view)
{
UIView* zIndexView = container_->GetChildById(ID_CHANGE_MY_ZINDEX);
if (zIndexView == nullptr) {
SetupChangeView();
zIndexView = container_->GetChildById(ID_CHANGE_MY_ZINDEX);
}
UIView* zIndexViewGroupTmp = container_->GetChildById(ID_ZINDEX_VIEW_VG);
if (zIndexViewGroupTmp == nullptr) {
return;
}
UIViewGroup* zIndexViewGroup = reinterpret_cast<UIViewGroup*>(zIndexViewGroupTmp);
const char* id = view.GetViewId();
if (strcmp(id, MODIFY_INSERT_HEAD) == 0) {
zIndexViewGroup->Remove(zIndexView);
zIndexViewGroup->Insert(zIndexViewGroup->GetChildrenHead(), zIndexView);
} else if (strcmp(id, MODIFY_INSERT_TAIL) == 0) {
zIndexViewGroup->Remove(zIndexView);
zIndexViewGroup->Add(zIndexView);
} else if (strcmp(id, MODIFY_AFTER_ZINDEX_4) == 0) {
zIndexViewGroup->Remove(zIndexView);
zIndexViewGroup->Insert(zIndexViewGroup->GetChildrenHead()->GetNextSibling(), zIndexView);
} else if (strcmp(id, MODIFY_AFTER_B_ZINDEX_0) == 0) {
zIndexViewGroup->Remove(zIndexView);
UIView* view5 = container_->GetChildById(ZINDEX_VIEW_GROUP[4].text); // 4 : the fifth view
if (view5 == nullptr) {
return;
}
zIndexViewGroup->Insert(view5, zIndexView);
} else if (strcmp(id, MODIFY_REMOVE) == 0) {
zIndexViewGroup->Remove(zIndexView);
} else if (strcmp(id, MODIFY_RESET) == 0) {
zIndexViewGroup->Remove(zIndexView);
SetupChangeView();
} else if (strcmp(id, MODIFY_ANIMATE_IN) == 0) {
if (animator_ != nullptr) {
animator_->Stop();
delete animator_;
}
zIndexView->SetY(container_->GetHeight());
animator_ = new Animator(this, zIndexView, 15, true); // 15: time millsec
animator_->Start();
}
}
void UITestViewZIndex::Callback(UIView* view)
{
if ((view == nullptr) || (container_ == nullptr)) {
return;
}
int16_t y = view->GetY();
int16_t step = 2;
if (y <= CHANGE_ZINDEX_VIEW_Y) {
animator_->Stop();
return;
}
if (y - step < CHANGE_ZINDEX_VIEW_Y) {
y = CHANGE_ZINDEX_VIEW_Y;
} else {
y -= step;
}
view->Invalidate();
view->SetY(y);
view->Invalidate();
}
void UITestViewZIndex::UpdateClickHint(UIView& view)
{
UIView* tmpView = container_->GetChildById(ID_CLICK_HINT);
if (tmpView == nullptr) {
return;
}
UILabel* clickHint = reinterpret_cast<UILabel*>(tmpView);
clickHint->SetText(view.GetViewId());
}
void UITestViewZIndex::UIKitViewZIndex001()
{
if (container_ == nullptr) {
return;
}
SetupZIndexView();
SetupZIndexBtn();
SetupChildModifyBtn();
}
void UITestViewZIndex::SetupZIndexView()
{
UIViewGroup* group = new UIViewGroup();
container_->Add(group);
group->SetOnClickListener(this);
group->SetTouchable(true);
group->SetViewId(ID_ZINDEX_VIEW_VG);
group->SetPosition(48, 5, 500, 500); // 48:position x 5: offset 500: width/height
int16_t alignBottom = -55;
int16_t alignLeft = 30;
for (uint8_t i = 0; i < ZINDEX_VIEW_NUM; i++) {
UILabel* zIndexView =
CreateZIndexLabel(ZINDEX_VIEW_GROUP[i].text, ZINDEX_VIEW_GROUP[i].zIndex, ZINDEX_VIEW_GROUP[i].color);
group->Add(zIndexView);
if (i == 0) {
zIndexView->SetPosition(0, 0);
} else {
if (i == 3) { // 3: for zindex 0 group
zIndexView->AlignBottomToSibling(ZINDEX_VIEW_GROUP[i - 1].text, alignBottom - 80); // 80: offset
zIndexView->AlignLeftToSibling(ZINDEX_VIEW_GROUP[0].text, alignLeft);
} else {
zIndexView->AlignBottomToSibling(ZINDEX_VIEW_GROUP[i - 1].text, alignBottom);
zIndexView->AlignLeftToSibling(ZINDEX_VIEW_GROUP[i - 1].text, alignLeft);
}
}
}
SetupChangeView();
}
void UITestViewZIndex::SetupChangeView()
{
UIView* zIndexViewGroupTmp = container_->GetChildById(ID_ZINDEX_VIEW_VG);
if (zIndexViewGroupTmp == nullptr) {
return;
}
UIViewGroup* group = reinterpret_cast<UIViewGroup*>(zIndexViewGroupTmp);
UILabel* target = CreateZIndexLabel(ID_CHANGE_MY_ZINDEX, 0, Color::Cyan());
target->SetTextColor(Color::Black());
UIView* tmpView = group->GetChildById(ZINDEX_VIEW_GROUP[2].text);
if (tmpView == nullptr) {
return;
}
group->Insert(tmpView, target);
target->SetPosition(CHANGE_ZINDEX_VIEW_X, CHANGE_ZINDEX_VIEW_Y);
target->Resize(200, 400); // 200:width 400:height
}
void UITestViewZIndex::SetupZIndexBtn()
{
UIViewGroup* group = new UIViewGroup();
container_->Add(group);
group->SetOnClickListener(this);
group->SetViewId(ID_ZINDEX_BUTTON_VG);
group->Resize(BUTTON_GROUP_WIDTH, BUTTON_GROUP_HEIGHT);
group->LayoutRightToSibling(ID_ZINDEX_VIEW_VG);
UILabel* clickHint = new UILabel();
clickHint->Resize(150, 30); // 150: width 30: height
clickHint->SetPosition(0, 10); // 10: offset y
clickHint->SetFont(DEFAULT_VECTOR_FONT_FILENAME, FONT_DEFAULT_SIZE);
clickHint->SetViewId(ID_CLICK_HINT);
clickHint->SetAlign(TEXT_ALIGNMENT_LEFT, TEXT_ALIGNMENT_CENTER);
group->Add(clickHint);
for (uint8_t i = 0; i < ZINDEX_BTN_NUM; i++) {
UILabelButton* zIndexBtn = CreateZIndexBtn(ZINDEX_BTN_GROUP[i].text);
group->Add(zIndexBtn);
if (i == 0) {
zIndexBtn->SetPosition(0, 50); // 50: offset y
} else {
zIndexBtn->LayoutBottomToSibling(ZINDEX_BTN_GROUP[i - 1].text, BUTTON_OFFSET);
zIndexBtn->AlignLeftToSibling(ZINDEX_BTN_GROUP[i - 1].text);
}
}
}
void UITestViewZIndex::SetupChildModifyBtn()
{
UIViewGroup* group = new UIViewGroup();
container_->Add(group);
group->SetOnClickListener(this);
group->SetViewId(ID_CHILD_CHANGE_VG);
group->Resize(BUTTON_GROUP_WIDTH, BUTTON_GROUP_HEIGHT);
group->LayoutRightToSibling(ID_ZINDEX_BUTTON_VG);
for (uint8_t i = 0; i < ZINDEX_MODIFY_NUM; i++) {
UILabelButton* zIndexModifyBtn = CreateZIndexBtn(ZINDEX_MODIFY_GROUP[i]);
zIndexModifyBtn->SetWidth(150); // 150: width
group->Add(zIndexModifyBtn);
if (i == 0) {
zIndexModifyBtn->SetPosition(0, 50); // 50: position y
} else {
zIndexModifyBtn->LayoutBottomToSibling(ZINDEX_MODIFY_GROUP[i - 1], BUTTON_OFFSET);
zIndexModifyBtn->AlignLeftToSibling(ZINDEX_MODIFY_GROUP[i - 1]);
}
}
}
} // namespace OHOS
/*
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef UI_TEST_VIEW_ZINDEX_H
#define UI_TEST_VIEW_ZINDEX_H
#include "components/ui_scroll_view.h"
#include "components/ui_label.h"
#include "components/ui_label_button.h"
#include "ui_test.h"
namespace OHOS {
class UITestViewZIndex : public UITest, public UIView::OnClickListener, public AnimatorCallback {
public:
UITestViewZIndex() {}
~UITestViewZIndex();
void SetUp() override;
void TearDown() override;
const UIView* GetTestView() override;
void UIKitViewZIndex001();
bool OnClick(UIView& view, const ClickEvent& event) override;
void Callback(UIView* view) override;
private:
UILabel* CreateTitleLabel() const;
UILabel* CreateZIndexLabel(const char* text, int16_t zIndex, ColorType color);
UILabelButton* CreateZIndexBtn(const char* text);
void SetupZIndexView();
void SetupZIndexBtn();
void SetupChildModifyBtn();
void SetupChangeView();
void ClickZIndexBtn(UIView& view);
void ClickModifyBtn(UIView& view);
void UpdateClickHint(UIView& view);
UIScrollView* container_ = nullptr;
Animator* animator_ = nullptr;
};
} // namespace OHOS
#endif // UI_TEST_VIEW_ZINDEX_H
......@@ -158,4 +158,204 @@ HWTEST_F(UIViewGroupTest, UIViewGroupGetViewType_001, TestSize.Level1)
}
EXPECT_EQ(viewGroup_->GetViewType(), UI_VIEW_GROUP);
}
/**
* @tc.name: Graphic_UIView_Test_GetChildrenRenderHead_001
* @tc.desc: Check the child render head
* @tc.type: FUNC
* @tc.require:issueI5AD8G
*/
HWTEST_F(UIViewGroupTest, Graphic_UIView_Test_GetChildrenRenderHead_001, TestSize.Level0)
{
UIViewGroup* viewGroup = new UIViewGroup();
UIView* sibling = viewGroup->GetChildrenRenderHead();
if (sibling != nullptr) {
EXPECT_NE(0, 0);
return;
}
EXPECT_EQ(0, 0);
delete viewGroup;
}
/**
* @tc.name: Graphic_UIView_Test_GetChildrenRenderHead_001
* @tc.desc: Check child render head
* @tc.type: FUNC
* @tc.require:issueI5AD8G
*/
HWTEST_F(UIViewGroupTest, Graphic_UIView_Test_GetChildrenRenderHead_002, TestSize.Level0)
{
UIView* view1 = new UIView();
UIView* view2 = new UIView();
UIView* view3 = new UIView();
UIViewGroup* viewGroup = new UIViewGroup();
viewGroup->Add(view1);
// check child head
EXPECT_EQ(viewGroup->GetChildrenRenderHead(), view1);
viewGroup->Add(view2);
// check child head with two child
EXPECT_EQ(viewGroup->GetChildrenRenderHead(), view1);
viewGroup->Remove(view1);
// check child head when remove head
EXPECT_EQ(viewGroup->GetChildrenRenderHead(), view2);
viewGroup->Remove(view2);
// check child head when remove all
EXPECT_EQ(viewGroup->GetChildrenRenderHead(), nullptr);
viewGroup->Add(view1);
viewGroup->Add(view2);
viewGroup->RemoveAll();
// check child head when remove all
EXPECT_EQ(viewGroup->GetChildrenRenderHead(), nullptr);
viewGroup->Add(view1);
viewGroup->Add(view2);
viewGroup->Insert(view1, view3);
viewGroup->Remove(view1);
// check child head when insert view
EXPECT_EQ(viewGroup->GetChildrenRenderHead(), view3);
delete view1;
delete view2;
delete view3;
delete viewGroup;
}
/**
* @tc.name: Graphic_UIView_Test_GetChildrenRenderHead_003
* @tc.desc: Check child render head when zIndex change
* @tc.type: FUNC
* @tc.require:issueI5AD8G
*/
HWTEST_F(UIViewGroupTest, Graphic_UIView_Test_GetChildrenRenderHead_003, TestSize.Level0)
{
UIView* view1 = new UIView();
UIView* view2 = new UIView();
UIView* view3 = new UIView();
UIView* view4 = new UIView();
UIViewGroup* viewGroup = new UIViewGroup();
viewGroup->Add(view1);
viewGroup->Add(view2);
viewGroup->Add(view3);
viewGroup->Add(view4);
// check child with zIndex = 0
EXPECT_EQ(viewGroup->GetChildrenRenderHead(), view1);
view1->SetZIndex(10); // 10: zindex
// check child when zIndex change
EXPECT_EQ(viewGroup->GetChildrenRenderHead(), view2);
view3->SetZIndex(-10); // -10: zindex
// check child when zIndex change
EXPECT_EQ(viewGroup->GetChildrenRenderHead(), view3);
delete view1;
delete view2;
delete view3;
delete view4;
delete viewGroup;
}
/**
* @tc.name: Graphic_UIView_Test_GetChildrenRenderHead_004
* @tc.desc: Check child render head when zIndex change
* @tc.type: FUNC
* @tc.require:issueI5AD8G
*/
HWTEST_F(UIViewGroupTest, Graphic_UIView_Test_GetChildrenRenderHead_004, TestSize.Level0)
{
UIView* view1 = new UIView();
UIView* view2 = new UIView();
UIView* view3 = new UIView();
UIView* view4 = new UIView();
UIViewGroup* viewGroup = new UIViewGroup();
viewGroup->Add(view1);
viewGroup->Add(view2);
viewGroup->Add(view3);
viewGroup->Add(view4);
// check child with zIndex = 0
EXPECT_EQ(viewGroup->GetChildrenRenderHead(), view1);
EXPECT_EQ(view1->GetNextRenderSibling(), view2);
EXPECT_EQ(view2->GetNextRenderSibling(), view3);
EXPECT_EQ(view3->GetNextRenderSibling(), view4);
view1->SetZIndex(10); // 10: zindex
// check child when zIndex change
EXPECT_EQ(viewGroup->GetChildrenRenderHead(), view2);
EXPECT_EQ(view2->GetNextRenderSibling(), view3);
EXPECT_EQ(view3->GetNextRenderSibling(), view4);
EXPECT_EQ(view4->GetNextRenderSibling(), view1);
view3->SetZIndex(-10); // -10: zindex
// check child when zIndex change
EXPECT_EQ(viewGroup->GetChildrenRenderHead(), view3);
EXPECT_EQ(view3->GetNextRenderSibling(), view2);
EXPECT_EQ(view2->GetNextRenderSibling(), view4);
EXPECT_EQ(view4->GetNextRenderSibling(), view1);
viewGroup->Remove(view3);
// check child when zIndex change
EXPECT_EQ(viewGroup->GetChildrenRenderHead(), view2);
EXPECT_EQ(view2->GetNextRenderSibling(), view4);
EXPECT_EQ(view4->GetNextRenderSibling(), view1);
delete view1;
delete view2;
delete view3;
delete view4;
delete viewGroup;
}
/**
* @tc.name: Graphic_UIView_Test_SetChildrenRenderHead_001
* @tc.desc: Check child render head
* @tc.type: FUNC
* @tc.require:issueI5AD8G
*/
HWTEST_F(UIViewGroupTest, Graphic_UIView_Test_SetChildrenRenderHead_001, TestSize.Level0)
{
UIView* view1 = new UIView();
UIViewGroup* viewGroup = new UIViewGroup();
// check default child head
EXPECT_EQ(viewGroup->GetChildrenRenderHead(), nullptr);
viewGroup->SetChildrenRenderHead(view1);
// can not set child head if it is not child
EXPECT_EQ(viewGroup->GetChildrenRenderHead(), nullptr);
viewGroup->Add(view1);
// check child head
EXPECT_EQ(viewGroup->GetChildrenRenderHead(), view1);
delete view1;
delete viewGroup;
}
/**
* @tc.name: Graphic_UIView_Test_UpdateRenderView_001
* @tc.desc: check update render view
* @tc.type: FUNC
* @tc.require:issueI5AD8G
*/
HWTEST_F(UIViewGroupTest, Graphic_UIView_Test_UpdateRenderView_001, TestSize.Level0)
{
UIView* view1 = new UIView();
UIView* view2 = new UIView();
UIViewGroup* viewGroup = new UIViewGroup();
viewGroup->Add(view1);
viewGroup->Add(view2);
viewGroup->UpdateRenderView(view2);
// check child head when remove all
EXPECT_EQ(viewGroup->GetChildrenRenderHead(), view1);
// check child head when insert view
EXPECT_EQ(view1->GetNextRenderSibling(), view2);
delete view1;
delete view2;
delete viewGroup;
}
} // namespace OHOS
......@@ -1122,4 +1122,113 @@ HWTEST_F(UIViewTest, Graphic_UIView_Test_Border_001, TestSize.Level0)
EXPECT_EQ(BORDER_WIDTH + BORDER_WIDTH + DEFAULE_WIDTH - 1, rect.GetRight());
EXPECT_EQ(BORDER_WIDTH + BORDER_WIDTH + DEFAULE_HEIGHT - 1, rect.GetBottom());
}
} // namespace OHOS
/**
* @tc.name: Graphic_UIView_Test_SetZIndex_001
* @tc.desc: Check zIndex equal
* @tc.type: FUNC
* @tc.require:issueI5AD8G
*/
HWTEST_F(UIViewTest, Graphic_UIView_Test_SetZIndex_001, TestSize.Level0)
{
UIView* view = new UIView();
// check 0
int16_t zIndex = 0;
view->SetZIndex(zIndex);
EXPECT_EQ(zIndex, view->GetZIndex());
// check negative
zIndex = 20;
view->SetZIndex(zIndex);
EXPECT_EQ(zIndex, view->GetZIndex());
// check big num
zIndex = 66666;
view->SetZIndex(zIndex);
EXPECT_EQ(zIndex, view->GetZIndex());
// check negative
zIndex = -1;
view->SetZIndex(zIndex);
EXPECT_EQ(zIndex, view->GetZIndex());
zIndex = -66666;
view->SetZIndex(zIndex);
EXPECT_EQ(zIndex, view->GetZIndex());
// check set multi times
zIndex = 20;
view->SetZIndex(zIndex);
view->SetZIndex(zIndex * 2);
EXPECT_EQ(zIndex * 2, view->GetZIndex());
}
/**
* @tc.name: Graphic_UIView_Test_GetZIndex_001
* @tc.desc: Check the default zIndex
* @tc.type: FUNC
* @tc.require:issueI5AD8G
*/
HWTEST_F(UIViewTest, Graphic_UIView_Test_GetZIndex_001, TestSize.Level0)
{
UIView* view = new UIView();
// check default zIndex value
EXPECT_EQ(0, view->GetZIndex());
UIViewGroup* viewGroup = new UIViewGroup();
// check default zIndex value
EXPECT_EQ(0, viewGroup->GetZIndex());
delete view;
delete viewGroup;
}
/**
* @tc.name: Graphic_UIView_Test_GetNextRenderSibling_001
* @tc.desc: Check the default zIndex
* @tc.type: FUNC
* @tc.require:issueI5AD8G
*/
HWTEST_F(UIViewTest, Graphic_UIView_Test_GetNextRenderSibling_001, TestSize.Level0)
{
UIView* view = new UIView();
UIView* sibling = view->GetNextRenderSibling();
if (sibling != nullptr) {
EXPECT_NE(0, 0);
return;
}
EXPECT_EQ(0, 0);
UIViewGroup* viewGroup = new UIViewGroup();
sibling = viewGroup->GetNextRenderSibling();
if (sibling != nullptr) {
EXPECT_NE(0, 0);
return;
}
EXPECT_EQ(0, 0);
delete view;
delete viewGroup;
}
/**
* @tc.name: Graphic_UIView_Test_SetNextRenderSibling_001
* @tc.desc: Check the default zIndex
* @tc.type: FUNC
* @tc.require:issueI5AD8G
*/
HWTEST_F(UIViewTest, Graphic_UIView_Test_SetNextRenderSibling_001, TestSize.Level0)
{
UIView* view = new UIView();
UIView* tempView = new UIView();
view->SetNextRenderSibling(tempView);
EXPECT_EQ(view->GetNextRenderSibling(), tempView);
UIViewGroup* viewGroup = new UIViewGroup();
viewGroup->SetNextRenderSibling(tempView);
EXPECT_EQ(viewGroup->GetNextRenderSibling(), tempView);
delete tempView;
delete view;
delete viewGroup;
}
} // namespace OHOS
\ No newline at end of file
......@@ -91,6 +91,7 @@ SOURCES += \
../../../../test/uitest/test_view_bounds/ui_test_view_bounds.cpp \
../../../../test/uitest/test_view_group/ui_test_view_group.cpp \
../../../../test/uitest/test_view_percent/ui_test_view_percent.cpp \
../../../../test/uitest/test_view_zindex/ui_test_view_zindex.cpp \
../../../../test/uitest/test_view_scale_rotate/ui_test_view_scale_rotate.cpp
SOURCES += \
......@@ -151,6 +152,7 @@ HEADERS += \
../../../../test/uitest/test_view_bitmap/ui_test_view_bitmap.h \
../../../../test/uitest/test_view_group/ui_test_view_group.h \
../../../../test/uitest/test_view_percent/ui_test_view_percent.h \
../../../../test/uitest/test_view_zindex/ui_test_view_zindex.h \
../../../../test/uitest/test_view_scale_rotate/ui_test_view_scale_rotate.h
HEADERS += \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册