From e5e19892045c1e61393d42f3500f0d71315a68ae Mon Sep 17 00:00:00 2001 From: tongkai0808fh Date: Tue, 30 Apr 2024 08:38:13 +0000 Subject: [PATCH 01/18] =?UTF-8?q?=E4=BF=AE=E6=94=B9launcher/launcher/src/m?= =?UTF-8?q?ain/cpp/swipe=5Fview.cpp=E6=96=87=E4=BB=B6=EF=BC=8C=E6=B6=88?= =?UTF-8?q?=E9=99=A4=E9=83=A8=E4=BB=B6=E7=BC=96=E8=AF=91=E4=B8=BB=E5=B9=B2?= =?UTF-8?q?=E5=91=8A=E8=AD=A6G.FUN.01-CPP=20=E6=8B=86=E5=88=86SwipeView::O?= =?UTF-8?q?nSetUpView()=E5=87=BD=E6=95=B0=EF=BC=8C=E5=B0=86=E5=A4=9A?= =?UTF-8?q?=E5=B1=82for=E5=BE=AA=E7=8E=AF=E5=8D=95=E7=8B=AC=E6=8F=90?= =?UTF-8?q?=E5=8F=96=E5=86=99=E6=88=90=E5=87=BD=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: tongkai0808fh --- launcher/launcher/src/main/cpp/swipe_view.cpp | 71 ++++++++++--------- 1 file changed, 38 insertions(+), 33 deletions(-) diff --git a/launcher/launcher/src/main/cpp/swipe_view.cpp b/launcher/launcher/src/main/cpp/swipe_view.cpp index 0b50dcb..5431853 100755 --- a/launcher/launcher/src/main/cpp/swipe_view.cpp +++ b/launcher/launcher/src/main/cpp/swipe_view.cpp @@ -125,42 +125,47 @@ void SwipeView::OnSetUpView() BundleInfo* pBundleInfos = nullptr; int count = 0; if (appManage_->LauncherApp(&pBundleInfos, count)) { - for (int j = 0; j < count; j++) { - for (int i = 0; i < groupCount_; i++) { - if (memcmp(LAUNCHER_BUNDLE_NAME, pBundleInfos[j].bundleName, strlen(pBundleInfos[j].bundleName)) == 0) { - break; - } - if (memcmp(SCREENSAVER_BUNDLE_NAME, pBundleInfos[j].bundleName, strlen(pBundleInfos[j].bundleName)) == 0) { - break; - } - if (pBundleInfos[j].abilityInfos->abilityType == SERVICE) { - break; - } - AppInfo* app = new AppInfo(); - app->funcclick_ = AppEvent::ClickEvent; - app->funclPress_ = AppEvent::LongPressEvent; - if (pBundleInfos[j].bundleName) { - (void)memcpy_s(app->appName_, sizeof(app->appName_), pBundleInfos[j].bundleName, - strlen(pBundleInfos[j].bundleName)); - app->appName_[strlen(pBundleInfos[j].bundleName)] = 0; - } - if (pBundleInfos[j].abilityInfos[0].name) { - (void)memcpy_s(app->abilityName_, sizeof(app->abilityName_), pBundleInfos[j].abilityInfos[0].name, - strlen(pBundleInfos[j].abilityInfos[0].name)); - app->abilityName_[strlen(pBundleInfos[j].abilityInfos[0].name)] = 0; - } - if (pBundleInfos[j].bigIconPath) { - (void)memcpy_s(app->appIconDir_, sizeof(app->appIconDir_), pBundleInfos[j].bigIconPath, - strlen(pBundleInfos[j].bigIconPath)); - app->appIconDir_[strlen(pBundleInfos[j].bigIconPath)] = 0; - } - if (arrPage_[i]->AddApp(app)) { - break; - } + BundleInfoScan(pBundleInfos, count, groupCount_) + } + swipe_->SetCurrentPage(0); +} + +void BundleInfoScan(BundleInfo* pBundleInfos, int count, int groupCount) +{ + for (int j = 0; j < count; j++) { + for (int i = 0; i < groupCount; i++) { + if (memcmp(LAUNCHER_BUNDLE_NAME, pBundleInfos[j].bundleName, strlen(pBundleInfos[j].bundleName)) == 0) { + break; + } + if (memcmp(SCREENSAVER_BUNDLE_NAME, pBundleInfos[j].bundleName, strlen(pBundleInfos[j].bundleName)) == 0) { + break; + } + if (pBundleInfos[j].abilityInfos->abilityType == SERVICE) { + break; + } + AppInfo* app = new AppInfo(); + app->funcclick_ = AppEvent::ClickEvent; + app->funclPress_ = AppEvent::LongPressEvent; + if (pBundleInfos[j].bundleName) { + (void)memcpy_s(app->appName_, sizeof(app->appName_), pBundleInfos[j].bundleName, + strlen(pBundleInfos[j].bundleName)); + app->appName_[strlen(pBundleInfos[j].bundleName)] = 0; + } + if (pBundleInfos[j].abilityInfos[0].name) { + (void)memcpy_s(app->abilityName_, sizeof(app->abilityName_), pBundleInfos[j].abilityInfos[0].name, + strlen(pBundleInfos[j].abilityInfos[0].name)); + app->abilityName_[strlen(pBundleInfos[j].abilityInfos[0].name)] = 0; + } + if (pBundleInfos[j].bigIconPath) { + (void)memcpy_s(app->appIconDir_, sizeof(app->appIconDir_), pBundleInfos[j].bigIconPath, + strlen(pBundleInfos[j].bigIconPath)); + app->appIconDir_[strlen(pBundleInfos[j].bigIconPath)] = 0; + } + if (arrPage_[i]->AddApp(app)) { + break; } } } - swipe_->SetCurrentPage(0); } void SwipeView::StartApp(AppInfo* app) -- Gitee From 6c3b687b30b7518db68eaaf8b2b55f03f474c34e Mon Sep 17 00:00:00 2001 From: tongkai0808fh Date: Tue, 30 Apr 2024 08:56:42 +0000 Subject: [PATCH 02/18] =?UTF-8?q?update=20launcher/launcher/src/main/cpp/s?= =?UTF-8?q?wipe=5Fview.cpp.=20128=E8=A1=8C=E5=8A=A0=E5=85=A5=E5=88=86?= =?UTF-8?q?=E5=8F=B7;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: tongkai0808fh --- launcher/launcher/src/main/cpp/swipe_view.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/launcher/launcher/src/main/cpp/swipe_view.cpp b/launcher/launcher/src/main/cpp/swipe_view.cpp index 5431853..a499692 100755 --- a/launcher/launcher/src/main/cpp/swipe_view.cpp +++ b/launcher/launcher/src/main/cpp/swipe_view.cpp @@ -125,7 +125,7 @@ void SwipeView::OnSetUpView() BundleInfo* pBundleInfos = nullptr; int count = 0; if (appManage_->LauncherApp(&pBundleInfos, count)) { - BundleInfoScan(pBundleInfos, count, groupCount_) + BundleInfoScan(pBundleInfos, count, groupCount_); } swipe_->SetCurrentPage(0); } -- Gitee From 194c0bde76765c3dc25a032c142d17283b04a857 Mon Sep 17 00:00:00 2001 From: tongkai0808fh Date: Sun, 5 May 2024 10:50:02 +0000 Subject: [PATCH 03/18] =?UTF-8?q?=E4=BF=AE=E6=94=B9launcher/launcher/src/m?= =?UTF-8?q?ain/cpp/swipe=5Fview.cpp=E6=96=87=E4=BB=B6=EF=BC=8C=E6=B6=88?= =?UTF-8?q?=E9=99=A4pr=E9=97=A8=E7=A6=81=E6=B5=8B=E8=AF=95=E6=8A=A5?= =?UTF-8?q?=E9=94=99=20=E5=88=9D=E5=A7=8B=E5=8C=96arrPage=5F=E5=8F=82?= =?UTF-8?q?=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: tongkai0808fh --- launcher/launcher/src/main/cpp/swipe_view.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/launcher/launcher/src/main/cpp/swipe_view.cpp b/launcher/launcher/src/main/cpp/swipe_view.cpp index a499692..5c99b27 100755 --- a/launcher/launcher/src/main/cpp/swipe_view.cpp +++ b/launcher/launcher/src/main/cpp/swipe_view.cpp @@ -114,8 +114,8 @@ void SwipeView::OnSetUpView() AddViewGroup(); AddViewGroup(); // Reserved. Touch and hold to add a page. - arrPage_[0]->SetMatrix(APP_ROW_COUNT, APP_COL_COUNT); - arrPage_[0]->SetScale(0.6); // 0.6 blank/icon width + //arrPage_[0]->SetMatrix(APP_ROW_COUNT, APP_COL_COUNT); + //arrPage_[0]->SetScale(0.6); // 0.6 blank/icon width for (int16_t i = 1; i < groupCount_; i++) { arrPage_[i]->SetMatrix(APP_ROW_COUNT, 2 * APP_COL_COUNT); // 2 scale of first view's col count arrPage_[i]->SetScale(0.69); // 0.69 blank/icon width @@ -132,6 +132,8 @@ void SwipeView::OnSetUpView() void BundleInfoScan(BundleInfo* pBundleInfos, int count, int groupCount) { + arrPage_[0]->SetMatrix(APP_ROW_COUNT, APP_COL_COUNT); + arrPage_[0]->SetScale(0.6); for (int j = 0; j < count; j++) { for (int i = 0; i < groupCount; i++) { if (memcmp(LAUNCHER_BUNDLE_NAME, pBundleInfos[j].bundleName, strlen(pBundleInfos[j].bundleName)) == 0) { -- Gitee From 0edc06349329bf5be2d4ed3bc6d13204c5509222 Mon Sep 17 00:00:00 2001 From: tongkai0808fh Date: Mon, 6 May 2024 01:35:29 +0000 Subject: [PATCH 04/18] =?UTF-8?q?=E5=88=A0=E9=99=A4launcher/launcher/src/m?= =?UTF-8?q?ain/cpp/swipe=5Fview.cpp=E6=96=87=E4=BB=B6=E5=86=97=E4=BD=99?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: tongkai0808fh --- launcher/launcher/src/main/cpp/swipe_view.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/launcher/launcher/src/main/cpp/swipe_view.cpp b/launcher/launcher/src/main/cpp/swipe_view.cpp index 5c99b27..5dc2a1e 100755 --- a/launcher/launcher/src/main/cpp/swipe_view.cpp +++ b/launcher/launcher/src/main/cpp/swipe_view.cpp @@ -114,8 +114,6 @@ void SwipeView::OnSetUpView() AddViewGroup(); AddViewGroup(); // Reserved. Touch and hold to add a page. - //arrPage_[0]->SetMatrix(APP_ROW_COUNT, APP_COL_COUNT); - //arrPage_[0]->SetScale(0.6); // 0.6 blank/icon width for (int16_t i = 1; i < groupCount_; i++) { arrPage_[i]->SetMatrix(APP_ROW_COUNT, 2 * APP_COL_COUNT); // 2 scale of first view's col count arrPage_[i]->SetScale(0.69); // 0.69 blank/icon width -- Gitee From f25397204d404abab75dc06179af40e830a002f8 Mon Sep 17 00:00:00 2001 From: tongkai0808fh Date: Mon, 6 May 2024 01:56:11 +0000 Subject: [PATCH 05/18] =?UTF-8?q?=E4=BF=AE=E6=94=B9launcher/launcher/src/m?= =?UTF-8?q?ain/cpp/swipe=5Fview.cpp=E6=96=87=E4=BB=B6=EF=BC=8C=E6=B6=88?= =?UTF-8?q?=E9=99=A4arrPage=5F=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: tongkai0808fh --- launcher/launcher/src/main/cpp/swipe_view.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/launcher/launcher/src/main/cpp/swipe_view.cpp b/launcher/launcher/src/main/cpp/swipe_view.cpp index 5dc2a1e..4556c1c 100755 --- a/launcher/launcher/src/main/cpp/swipe_view.cpp +++ b/launcher/launcher/src/main/cpp/swipe_view.cpp @@ -113,11 +113,7 @@ void SwipeView::OnSetUpView() AddFirstViewGroup(); AddViewGroup(); AddViewGroup(); - // Reserved. Touch and hold to add a page. - for (int16_t i = 1; i < groupCount_; i++) { - arrPage_[i]->SetMatrix(APP_ROW_COUNT, 2 * APP_COL_COUNT); // 2 scale of first view's col count - arrPage_[i]->SetScale(0.69); // 0.69 blank/icon width - } + AppEvent::GetInstance(this); AppManage::SetViewGroup(AppEvent::ClickEvent, AppEvent::LongPressEvent, arrPage_, groupCount_); BundleInfo* pBundleInfos = nullptr; @@ -132,6 +128,11 @@ void BundleInfoScan(BundleInfo* pBundleInfos, int count, int groupCount) { arrPage_[0]->SetMatrix(APP_ROW_COUNT, APP_COL_COUNT); arrPage_[0]->SetScale(0.6); + // Reserved. Touch and hold to add a page. + for (int16_t i = 1; i < groupCount_; i++) { + arrPage_[i]->SetMatrix(APP_ROW_COUNT, 2 * APP_COL_COUNT); // 2 scale of first view's col count + arrPage_[i]->SetScale(0.69); // 0.69 blank/icon width + } for (int j = 0; j < count; j++) { for (int i = 0; i < groupCount; i++) { if (memcmp(LAUNCHER_BUNDLE_NAME, pBundleInfos[j].bundleName, strlen(pBundleInfos[j].bundleName)) == 0) { -- Gitee From ccf8c24b13c647ddadea16cf968163031804e283 Mon Sep 17 00:00:00 2001 From: tongkai0808fh Date: Mon, 6 May 2024 02:18:18 +0000 Subject: [PATCH 06/18] =?UTF-8?q?groupCount=5F=E6=94=B9=E6=88=90groupCount?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: tongkai0808fh --- launcher/launcher/src/main/cpp/swipe_view.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/launcher/launcher/src/main/cpp/swipe_view.cpp b/launcher/launcher/src/main/cpp/swipe_view.cpp index 4556c1c..9443204 100755 --- a/launcher/launcher/src/main/cpp/swipe_view.cpp +++ b/launcher/launcher/src/main/cpp/swipe_view.cpp @@ -129,7 +129,7 @@ void BundleInfoScan(BundleInfo* pBundleInfos, int count, int groupCount) arrPage_[0]->SetMatrix(APP_ROW_COUNT, APP_COL_COUNT); arrPage_[0]->SetScale(0.6); // Reserved. Touch and hold to add a page. - for (int16_t i = 1; i < groupCount_; i++) { + for (int16_t i = 1; i < groupCount; i++) { arrPage_[i]->SetMatrix(APP_ROW_COUNT, 2 * APP_COL_COUNT); // 2 scale of first view's col count arrPage_[i]->SetScale(0.69); // 0.69 blank/icon width } -- Gitee From cf2e7a3f01f2b9cbb6759ab4f5fa2c4e118bc9c6 Mon Sep 17 00:00:00 2001 From: tongkai0808fh Date: Mon, 6 May 2024 02:42:07 +0000 Subject: [PATCH 07/18] =?UTF-8?q?=E6=9B=B4=E6=94=B9launcher/launcher/src/m?= =?UTF-8?q?ain/cpp/swipe=5Fview.cpp=E6=96=87=E4=BB=B6=EF=BC=8C=E5=8A=A0?= =?UTF-8?q?=E5=85=A5arrPage=E5=8F=82=E6=95=B0=20=E6=9B=B4=E6=94=B9?= =?UTF-8?q?=E6=96=87=E4=BB=B6127=E8=A1=8C=EF=BC=8C=E5=8A=A0=E5=85=A5ViewGr?= =?UTF-8?q?oupPage*=20arrPage=5F[MAX=5FVIEWGROUP]=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: tongkai0808fh --- launcher/launcher/src/main/cpp/swipe_view.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/launcher/launcher/src/main/cpp/swipe_view.cpp b/launcher/launcher/src/main/cpp/swipe_view.cpp index 9443204..2b39e52 100755 --- a/launcher/launcher/src/main/cpp/swipe_view.cpp +++ b/launcher/launcher/src/main/cpp/swipe_view.cpp @@ -124,7 +124,7 @@ void SwipeView::OnSetUpView() swipe_->SetCurrentPage(0); } -void BundleInfoScan(BundleInfo* pBundleInfos, int count, int groupCount) +void BundleInfoScan(BundleInfo* pBundleInfos, int count, int groupCount, ViewGroupPage* arrPage_[MAX_VIEWGROUP]) { arrPage_[0]->SetMatrix(APP_ROW_COUNT, APP_COL_COUNT); arrPage_[0]->SetScale(0.6); -- Gitee From 5e88de27cb50ff09d6baf14731d48167b0d13705 Mon Sep 17 00:00:00 2001 From: tongkai0808fh Date: Mon, 6 May 2024 03:05:32 +0000 Subject: [PATCH 08/18] =?UTF-8?q?=E4=BF=AE=E6=94=B9launcher/launcher/src/m?= =?UTF-8?q?ain/cpp/swipe=5Fview.h=E6=96=87=E4=BB=B6=EF=BC=8CSwipeView?= =?UTF-8?q?=E7=B1=BB=E5=8A=A0=E5=85=A5BundleInfoScan=E5=87=BD=E6=95=B0=20?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=96=87=E4=BB=B678=E8=A1=8C=EF=BC=8CSwipeVi?= =?UTF-8?q?ew=E7=B1=BB=E5=8A=A0=E5=85=A5BundleInfoScan=E5=87=BD=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: tongkai0808fh --- launcher/launcher/src/main/cpp/swipe_view.h | 1 + 1 file changed, 1 insertion(+) diff --git a/launcher/launcher/src/main/cpp/swipe_view.h b/launcher/launcher/src/main/cpp/swipe_view.h index 03147d2..c923da4 100755 --- a/launcher/launcher/src/main/cpp/swipe_view.h +++ b/launcher/launcher/src/main/cpp/swipe_view.h @@ -75,6 +75,7 @@ public: SwipeView(UILabel* titlellable, UILabel* taillable); virtual ~SwipeView(); void OnSetUpView(); + void BundleInfoScan(BundleInfo* pBundleInfos, int count, int groupCount, ViewGroupPage* arrPage_[MAX_VIEWGROUP]); void StartApp(AppInfo* app); void ShowLongPressView(AppInfo* app); void UninstallApp(AppInfo* app); -- Gitee From bd004813e29f8e7ddff2d63d7dee950e36388658 Mon Sep 17 00:00:00 2001 From: tongkai0808fh Date: Mon, 6 May 2024 03:26:37 +0000 Subject: [PATCH 09/18] =?UTF-8?q?=E8=A7=A3=E5=86=B3launcher/launcher/src/m?= =?UTF-8?q?ain/cpp/swipe=5Fview.cpp=E6=96=87=E4=BB=B6=E4=B8=ADBundleInfoSc?= =?UTF-8?q?an=E5=87=BD=E6=95=B0=E6=97=A0=E6=B3=95=E8=B0=83=E7=94=A8=20?= =?UTF-8?q?=E8=A7=A3=E5=86=B3SwipeView=E7=B1=BB=E6=97=A0=E6=B3=95=E8=B0=83?= =?UTF-8?q?=E7=94=A8BundleInfoScan=E5=87=BD=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: tongkai0808fh --- launcher/launcher/src/main/cpp/swipe_view.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/launcher/launcher/src/main/cpp/swipe_view.cpp b/launcher/launcher/src/main/cpp/swipe_view.cpp index 2b39e52..904fa3e 100755 --- a/launcher/launcher/src/main/cpp/swipe_view.cpp +++ b/launcher/launcher/src/main/cpp/swipe_view.cpp @@ -119,12 +119,12 @@ void SwipeView::OnSetUpView() BundleInfo* pBundleInfos = nullptr; int count = 0; if (appManage_->LauncherApp(&pBundleInfos, count)) { - BundleInfoScan(pBundleInfos, count, groupCount_); + BundleInfoScan(pBundleInfos, count, groupCount_, arrPage_[MAX_VIEWGROUP]); } swipe_->SetCurrentPage(0); } -void BundleInfoScan(BundleInfo* pBundleInfos, int count, int groupCount, ViewGroupPage* arrPage_[MAX_VIEWGROUP]) +void SwipeView::BundleInfoScan(BundleInfo* pBundleInfos, int count, int groupCount, ViewGroupPage* arrPage_[MAX_VIEWGROUP]) { arrPage_[0]->SetMatrix(APP_ROW_COUNT, APP_COL_COUNT); arrPage_[0]->SetScale(0.6); -- Gitee From a692f86145eae74b044a6627b977a17827e771a4 Mon Sep 17 00:00:00 2001 From: tongkai0808fh Date: Mon, 6 May 2024 03:48:06 +0000 Subject: [PATCH 10/18] =?UTF-8?q?=E4=BF=AE=E6=94=B9launcher/launcher/src/m?= =?UTF-8?q?ain/cpp/swipe=5Fview.cpp=E6=96=87=E4=BB=B6=EF=BC=8C=E5=88=9D?= =?UTF-8?q?=E5=A7=8B=E5=8C=96arrPage=E5=8F=82=E6=95=B0=20SwipeView::OnSetU?= =?UTF-8?q?pView()=E5=8A=A0=E5=85=A5=E5=88=9D=E5=A7=8B=E5=8C=96arrPage?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: tongkai0808fh --- launcher/launcher/src/main/cpp/swipe_view.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/launcher/launcher/src/main/cpp/swipe_view.cpp b/launcher/launcher/src/main/cpp/swipe_view.cpp index 904fa3e..bbb82a2 100755 --- a/launcher/launcher/src/main/cpp/swipe_view.cpp +++ b/launcher/launcher/src/main/cpp/swipe_view.cpp @@ -113,7 +113,13 @@ void SwipeView::OnSetUpView() AddFirstViewGroup(); AddViewGroup(); AddViewGroup(); - + // Reserved. Touch and hold to add a page. + arrPage_[0]->SetMatrix(APP_ROW_COUNT, APP_COL_COUNT); + arrPage_[0]->SetScale(0.6); + for (int16_t i = 1; i < groupCount; i++) { + arrPage_[i]->SetMatrix(APP_ROW_COUNT, 2 * APP_COL_COUNT); // 2 scale of first view's col count + arrPage_[i]->SetScale(0.69); // 0.69 blank/icon width + } AppEvent::GetInstance(this); AppManage::SetViewGroup(AppEvent::ClickEvent, AppEvent::LongPressEvent, arrPage_, groupCount_); BundleInfo* pBundleInfos = nullptr; @@ -126,13 +132,6 @@ void SwipeView::OnSetUpView() void SwipeView::BundleInfoScan(BundleInfo* pBundleInfos, int count, int groupCount, ViewGroupPage* arrPage_[MAX_VIEWGROUP]) { - arrPage_[0]->SetMatrix(APP_ROW_COUNT, APP_COL_COUNT); - arrPage_[0]->SetScale(0.6); - // Reserved. Touch and hold to add a page. - for (int16_t i = 1; i < groupCount; i++) { - arrPage_[i]->SetMatrix(APP_ROW_COUNT, 2 * APP_COL_COUNT); // 2 scale of first view's col count - arrPage_[i]->SetScale(0.69); // 0.69 blank/icon width - } for (int j = 0; j < count; j++) { for (int i = 0; i < groupCount; i++) { if (memcmp(LAUNCHER_BUNDLE_NAME, pBundleInfos[j].bundleName, strlen(pBundleInfos[j].bundleName)) == 0) { -- Gitee From de5be202c0c9572d1e614e4beebca65172962a04 Mon Sep 17 00:00:00 2001 From: tongkai0808fh Date: Mon, 6 May 2024 06:06:58 +0000 Subject: [PATCH 11/18] =?UTF-8?q?=E6=B6=88=E9=99=A4launcher/launcher/src/m?= =?UTF-8?q?ain/cpp/swipe=5Fview.cpp=E6=96=87=E4=BB=B6133=E8=A1=8C=E5=AD=97?= =?UTF-8?q?=E7=AC=A6=E8=BF=87=E5=A4=9A=E5=91=8A=E8=AD=A6=20=E6=B6=88?= =?UTF-8?q?=E9=99=A4.cpp=E6=96=87=E4=BB=B6133=E8=A1=8C=E5=AD=97=E7=AC=A6?= =?UTF-8?q?=E8=BF=87=E5=A4=9A=E5=91=8A=E8=AD=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: tongkai0808fh --- launcher/launcher/src/main/cpp/swipe_view.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/launcher/launcher/src/main/cpp/swipe_view.cpp b/launcher/launcher/src/main/cpp/swipe_view.cpp index bbb82a2..47ea7d4 100755 --- a/launcher/launcher/src/main/cpp/swipe_view.cpp +++ b/launcher/launcher/src/main/cpp/swipe_view.cpp @@ -130,10 +130,10 @@ void SwipeView::OnSetUpView() swipe_->SetCurrentPage(0); } -void SwipeView::BundleInfoScan(BundleInfo* pBundleInfos, int count, int groupCount, ViewGroupPage* arrPage_[MAX_VIEWGROUP]) +void SwipeView::BundleInfoScan(BundleInfo* pBundleInfos, int cnt, int gCount, ViewGroupPage* arrPage_[MAX_VIEWGROUP]) { - for (int j = 0; j < count; j++) { - for (int i = 0; i < groupCount; i++) { + for (int j = 0; j < cnt; j++) { + for (int i = 0; i < gCount; i++) { if (memcmp(LAUNCHER_BUNDLE_NAME, pBundleInfos[j].bundleName, strlen(pBundleInfos[j].bundleName)) == 0) { break; } -- Gitee From fa879cc0a38bec145dab7bb340c943e7b3140d89 Mon Sep 17 00:00:00 2001 From: tongkai0808fh Date: Mon, 6 May 2024 06:20:36 +0000 Subject: [PATCH 12/18] update launcher/launcher/src/main/cpp/swipe_view.cpp. Signed-off-by: tongkai0808fh --- launcher/launcher/src/main/cpp/swipe_view.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/launcher/launcher/src/main/cpp/swipe_view.cpp b/launcher/launcher/src/main/cpp/swipe_view.cpp index 47ea7d4..9b73979 100755 --- a/launcher/launcher/src/main/cpp/swipe_view.cpp +++ b/launcher/launcher/src/main/cpp/swipe_view.cpp @@ -116,7 +116,7 @@ void SwipeView::OnSetUpView() // Reserved. Touch and hold to add a page. arrPage_[0]->SetMatrix(APP_ROW_COUNT, APP_COL_COUNT); arrPage_[0]->SetScale(0.6); - for (int16_t i = 1; i < groupCount; i++) { + for (int16_t i = 1; i < groupCount_; i++) { arrPage_[i]->SetMatrix(APP_ROW_COUNT, 2 * APP_COL_COUNT); // 2 scale of first view's col count arrPage_[i]->SetScale(0.69); // 0.69 blank/icon width } -- Gitee From eaae978d9b4fee5686a3103552aa4cf8e6804a46 Mon Sep 17 00:00:00 2001 From: tongkai0808fh Date: Mon, 6 May 2024 06:35:34 +0000 Subject: [PATCH 13/18] =?UTF-8?q?update=20launcher/launcher/src/main/cpp/s?= =?UTF-8?q?wipe=5Fview.cpp.=20=E5=88=9D=E5=A7=8B=E5=8C=96arrPage=5F[3]?= =?UTF-8?q?=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: tongkai0808fh --- launcher/launcher/src/main/cpp/swipe_view.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/launcher/launcher/src/main/cpp/swipe_view.cpp b/launcher/launcher/src/main/cpp/swipe_view.cpp index 9b73979..555ab9b 100755 --- a/launcher/launcher/src/main/cpp/swipe_view.cpp +++ b/launcher/launcher/src/main/cpp/swipe_view.cpp @@ -130,7 +130,7 @@ void SwipeView::OnSetUpView() swipe_->SetCurrentPage(0); } -void SwipeView::BundleInfoScan(BundleInfo* pBundleInfos, int cnt, int gCount, ViewGroupPage* arrPage_[MAX_VIEWGROUP]) +void SwipeView::BundleInfoScan(BundleInfo* pBundleInfos, int cnt, int gCount, ViewGroupPage* arrPage_[3]) { for (int j = 0; j < cnt; j++) { for (int i = 0; i < gCount; i++) { -- Gitee From 844f53f1edea7a951b4d0b6d5157da5763602253 Mon Sep 17 00:00:00 2001 From: tongkai0808fh Date: Mon, 6 May 2024 06:47:47 +0000 Subject: [PATCH 14/18] update launcher/launcher/src/main/cpp/swipe_view.cpp. Signed-off-by: tongkai0808fh --- launcher/launcher/src/main/cpp/swipe_view.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/launcher/launcher/src/main/cpp/swipe_view.cpp b/launcher/launcher/src/main/cpp/swipe_view.cpp index 555ab9b..20a7abd 100755 --- a/launcher/launcher/src/main/cpp/swipe_view.cpp +++ b/launcher/launcher/src/main/cpp/swipe_view.cpp @@ -130,7 +130,7 @@ void SwipeView::OnSetUpView() swipe_->SetCurrentPage(0); } -void SwipeView::BundleInfoScan(BundleInfo* pBundleInfos, int cnt, int gCount, ViewGroupPage* arrPage_[3]) +void SwipeView::BundleInfoScan(BundleInfo* pBundleInfos, int cnt, int gCount, ViewGroupPage* arrPage[3]) { for (int j = 0; j < cnt; j++) { for (int i = 0; i < gCount; i++) { @@ -161,7 +161,7 @@ void SwipeView::BundleInfoScan(BundleInfo* pBundleInfos, int cnt, int gCount, Vi strlen(pBundleInfos[j].bigIconPath)); app->appIconDir_[strlen(pBundleInfos[j].bigIconPath)] = 0; } - if (arrPage_[i]->AddApp(app)) { + if (arrPage[i]->AddApp(app)) { break; } } -- Gitee From c4708eb9dfba32df1549fbfe675584abf7d68724 Mon Sep 17 00:00:00 2001 From: tongkai0808fh Date: Mon, 6 May 2024 07:03:23 +0000 Subject: [PATCH 15/18] =?UTF-8?q?update=20launcher/launcher/src/main/cpp/s?= =?UTF-8?q?wipe=5Fview.h.=20arrPage=5F=E6=94=B9=E6=88=90arrPage?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: tongkai0808fh --- launcher/launcher/src/main/cpp/swipe_view.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/launcher/launcher/src/main/cpp/swipe_view.h b/launcher/launcher/src/main/cpp/swipe_view.h index c923da4..11d8d1b 100755 --- a/launcher/launcher/src/main/cpp/swipe_view.h +++ b/launcher/launcher/src/main/cpp/swipe_view.h @@ -75,7 +75,7 @@ public: SwipeView(UILabel* titlellable, UILabel* taillable); virtual ~SwipeView(); void OnSetUpView(); - void BundleInfoScan(BundleInfo* pBundleInfos, int count, int groupCount, ViewGroupPage* arrPage_[MAX_VIEWGROUP]); + void BundleInfoScan(BundleInfo* pBundleInfos, int count, int groupCount, ViewGroupPage* arrPage[MAX_VIEWGROUP]); void StartApp(AppInfo* app); void ShowLongPressView(AppInfo* app); void UninstallApp(AppInfo* app); -- Gitee From 17b4f20b4eb3e9f95d0641ed3e4f8dbc46921dd5 Mon Sep 17 00:00:00 2001 From: tongkai0808fh Date: Mon, 6 May 2024 07:51:16 +0000 Subject: [PATCH 16/18] =?UTF-8?q?=E4=BF=AE=E6=94=B9launcher/launcher/src/m?= =?UTF-8?q?ain/cpp/swipe=5Fview.cpp=E6=96=87=E4=BB=B6=EF=BC=8C=E6=B6=88?= =?UTF-8?q?=E9=99=A4pr=E6=8A=A5=E9=94=99=20=E4=BC=98=E5=8C=96BundleInfoSca?= =?UTF-8?q?n=E5=87=BD=E6=95=B0=E5=86=99=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: tongkai0808fh --- launcher/launcher/src/main/cpp/swipe_view.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/launcher/launcher/src/main/cpp/swipe_view.cpp b/launcher/launcher/src/main/cpp/swipe_view.cpp index 20a7abd..09cd8cb 100755 --- a/launcher/launcher/src/main/cpp/swipe_view.cpp +++ b/launcher/launcher/src/main/cpp/swipe_view.cpp @@ -125,15 +125,15 @@ void SwipeView::OnSetUpView() BundleInfo* pBundleInfos = nullptr; int count = 0; if (appManage_->LauncherApp(&pBundleInfos, count)) { - BundleInfoScan(pBundleInfos, count, groupCount_, arrPage_[MAX_VIEWGROUP]); + BundleInfoScan(pBundleInfos, count); } swipe_->SetCurrentPage(0); } -void SwipeView::BundleInfoScan(BundleInfo* pBundleInfos, int cnt, int gCount, ViewGroupPage* arrPage[3]) +void SwipeView::BundleInfoScan(BundleInfo* pBundleInfos, int count) { - for (int j = 0; j < cnt; j++) { - for (int i = 0; i < gCount; i++) { + for (int j = 0; j < count; j++) { + for (int i = 0; i < groupCount_; i++) { if (memcmp(LAUNCHER_BUNDLE_NAME, pBundleInfos[j].bundleName, strlen(pBundleInfos[j].bundleName)) == 0) { break; } @@ -161,7 +161,7 @@ void SwipeView::BundleInfoScan(BundleInfo* pBundleInfos, int cnt, int gCount, Vi strlen(pBundleInfos[j].bigIconPath)); app->appIconDir_[strlen(pBundleInfos[j].bigIconPath)] = 0; } - if (arrPage[i]->AddApp(app)) { + if (arrPage_[i]->AddApp(app)) { break; } } -- Gitee From 8e3148691f28aef52cdc0934b446cb3eb39fbb94 Mon Sep 17 00:00:00 2001 From: tongkai0808fh Date: Mon, 6 May 2024 07:53:22 +0000 Subject: [PATCH 17/18] =?UTF-8?q?=E4=BF=AE=E6=94=B9launcher/launcher/src/m?= =?UTF-8?q?ain/cpp/swipe=5Fview.h=EF=BC=8C=E5=BC=95=E5=85=A5BundleInfoScan?= =?UTF-8?q?=E5=87=BD=E6=95=B0=20=E5=BC=95=E7=94=A8BundleInfoScan=E5=87=BD?= =?UTF-8?q?=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: tongkai0808fh --- launcher/launcher/src/main/cpp/swipe_view.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/launcher/launcher/src/main/cpp/swipe_view.h b/launcher/launcher/src/main/cpp/swipe_view.h index 11d8d1b..69ab8ac 100755 --- a/launcher/launcher/src/main/cpp/swipe_view.h +++ b/launcher/launcher/src/main/cpp/swipe_view.h @@ -75,7 +75,7 @@ public: SwipeView(UILabel* titlellable, UILabel* taillable); virtual ~SwipeView(); void OnSetUpView(); - void BundleInfoScan(BundleInfo* pBundleInfos, int count, int groupCount, ViewGroupPage* arrPage[MAX_VIEWGROUP]); + void BundleInfoScan(BundleInfo* pBundleInfos, int count); void StartApp(AppInfo* app); void ShowLongPressView(AppInfo* app); void UninstallApp(AppInfo* app); -- Gitee From 651bac21078d753f771a113e2cf53c1240976501 Mon Sep 17 00:00:00 2001 From: tongkai0808fh Date: Mon, 6 May 2024 08:22:04 +0000 Subject: [PATCH 18/18] =?UTF-8?q?=E4=BF=AE=E6=94=B9launcher/launcher/src/m?= =?UTF-8?q?ain/cpp/swipe=5Fview.cpp=E6=96=87=E4=BB=B6=E7=9A=84SwipeView::O?= =?UTF-8?q?nSetUpView=E5=87=BD=E6=95=B0=20=E6=8C=87=E5=AE=9ASwipeView::OnS?= =?UTF-8?q?etUpView=E5=87=BD=E6=95=B0=E7=9A=84scale=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E5=85=B7=E4=BD=93=E6=95=B0=E6=8D=AE=E7=B1=BB=E5=9E=8B=EF=BC=8C?= =?UTF-8?q?=E6=B6=88=E9=99=A4=E4=BB=A3=E7=A0=81=E6=A3=80=E6=9F=A5=E6=8A=A5?= =?UTF-8?q?=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: tongkai0808fh --- launcher/launcher/src/main/cpp/swipe_view.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/launcher/launcher/src/main/cpp/swipe_view.cpp b/launcher/launcher/src/main/cpp/swipe_view.cpp index 09cd8cb..56e1444 100755 --- a/launcher/launcher/src/main/cpp/swipe_view.cpp +++ b/launcher/launcher/src/main/cpp/swipe_view.cpp @@ -113,12 +113,14 @@ void SwipeView::OnSetUpView() AddFirstViewGroup(); AddViewGroup(); AddViewGroup(); + double scale0 = 0.6; + double scale1 = 0.69; // Reserved. Touch and hold to add a page. arrPage_[0]->SetMatrix(APP_ROW_COUNT, APP_COL_COUNT); - arrPage_[0]->SetScale(0.6); + arrPage_[0]->SetScale(scale0); for (int16_t i = 1; i < groupCount_; i++) { arrPage_[i]->SetMatrix(APP_ROW_COUNT, 2 * APP_COL_COUNT); // 2 scale of first view's col count - arrPage_[i]->SetScale(0.69); // 0.69 blank/icon width + arrPage_[i]->SetScale(scale1); // 0.69 blank/icon width } AppEvent::GetInstance(this); AppManage::SetViewGroup(AppEvent::ClickEvent, AppEvent::LongPressEvent, arrPage_, groupCount_); -- Gitee