From: luozheng <1732036298@qq.com> Date: Mon, 12 May 2025 03:08:47 +0000 (+0800) Subject: 进入支付宝添加最大亮度设备,乘车码界面修改 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=ce31e9ee2496dd5ed806d38b4e3c125c4065d4e6;p=mirrors%2FFD230.git 进入支付宝添加最大亮度设备,乘车码界面修改 --- diff --git a/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayModel.cpp b/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayModel.cpp index d7f70e547..5144ac300 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayModel.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayModel.cpp @@ -14,6 +14,7 @@ #include "power_display_service.h" #include "custom_utils.h" #include "bleService.h" +#include "ConfigModel.h" namespace OHOS { AlipayModel::AlipayModel() : alipayApi(alipay_svr_get_api()) { @@ -709,11 +710,13 @@ void AlipayModel::AlipayScreenControl(bool turnOnFlag) // //当设置的值是-1 的时候,设置屏幕常亮 // display_api->set_screen_set_keepon_timeout(-1); ScreenAlwaysOnCtr(OPEN_SCREEN_ALWAYS_ON); + uapi_setScreenBrightness(MAX_BRIGHTNESS); //最高亮度 } else { // display_api->set_screen_set_keepon_timeout(0); ScreenAlwaysOnCtr(CANCEL_SCREEN_ALWAYS_ON); + uapi_setScreenBrightness(ConfigModel::GetInstance()->GetBrightness());//退出APP将亮度恢复到ConfigModel中设置的亮度值 } } diff --git a/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayTrans/AlipayTransListView.cpp b/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayTrans/AlipayTransListView.cpp index c1ca6edbd..b5307c5b7 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayTrans/AlipayTransListView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayTrans/AlipayTransListView.cpp @@ -21,10 +21,10 @@ static constexpr int16 LIST_POS = 20; static constexpr int16 SNUM_2 = 2; static const int16 REFRESH_BUTTON_FONT = 38; -static const int16 REFRESH_BUTTON_X = 189; +static const int16 REFRESH_BUTTON_X = 133; static const int16 REFRESH_BUTTON_Y = 400; -static const int16 REFRESH_BUTTON_WIDTH = 76; -static const int16 REFRESH_BUTTON_HEIGHT = 53; +static const int16 REFRESH_BUTTON_WIDTH = 200; +static const int16 REFRESH_BUTTON_HEIGHT = 60; static const char *REFRESH_BUTTON = (char *)"刷新"; AlipayTransList::AlipayTransList(AlipayPresenter *presenter) @@ -67,14 +67,15 @@ bool AlipayTransList::AlipayInitList() return false; } contentList->SetPosition(ALIPAY_TRANS_LIST_POSITION_X, ALIPAY_TRANS_LIST_POSITION_Y); - contentList->Resize(380, 340); - contentList->SetScrollBlankSize(ALIPAY_TRANS_LIST_SCROLLBLANKSIZE); + contentList->Resize(380, 300); + // contentList->SetScrollBlankSize(ALIPAY_TRANS_LIST_SCROLLBLANKSIZE); + contentList->SetReboundSize(15); contentList->SetSelectPosition(HORIZONTAL_RESOLUTION / SNUM_2); // middle position contentList->SetDraggable(true); contentList->SetThrowDrag(false); contentList->EnableAutoAlign(true); contentList->SetMaxScrollDistance(MAX_SCR_DIS); - contentList->SetYScrollBarVisible(true); + contentList->SetYScrollBarVisible(false); AddAlipayTransListItemToList(); Add(contentList); contentList->SetAdapter(listAdapter); @@ -108,7 +109,9 @@ bool AlipayTransList::AlipayInitButton() buttonRefresh->SetTextColor(Color::Blue()); buttonRefresh->SetStyle(STYLE_BACKGROUND_COLOR, Color::Black().full); + buttonRefresh->SetStyle(STYLE_BACKGROUND_OPA, 0xff); buttonRefresh->SetStyleForState(STYLE_BORDER_COLOR, 0xff0b1928, UIButton::PRESSED); + buttonRefresh->SetStyleForState(STYLE_BACKGROUND_OPA, 0x00, UIButton::PRESSED); buttonRefresh->SetOnClickListener(presenter_); Add(buttonRefresh); @@ -136,6 +139,19 @@ bool AlipayTransList::InitListView() return false; } + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "cardCount = %d", listLen); + if(listLen > 3) + { + contentList->SetHeight(300); + int16_t y = contentList->GetY() + contentList->GetHeight() + 10; + buttonRefresh->SetY(y); + } + else + { + contentList->SetHeight(listLen * 100); + buttonRefresh->SetY(REFRESH_BUTTON_Y); + } + return true; }