#include "power_display_service.h"\r
#include "custom_utils.h"\r
#include "bleService.h"\r
+#include "ConfigModel.h"\r
namespace OHOS {\r
AlipayModel::AlipayModel() : alipayApi(alipay_svr_get_api())\r
{\r
// //当设置的值是-1 的时候,设置屏幕常亮\r
// display_api->set_screen_set_keepon_timeout(-1);\r
ScreenAlwaysOnCtr(OPEN_SCREEN_ALWAYS_ON);\r
+ uapi_setScreenBrightness(MAX_BRIGHTNESS); //最高亮度\r
}\r
else\r
{\r
// display_api->set_screen_set_keepon_timeout(0);\r
ScreenAlwaysOnCtr(CANCEL_SCREEN_ALWAYS_ON);\r
+ uapi_setScreenBrightness(ConfigModel::GetInstance()->GetBrightness());//退出APP将亮度恢复到ConfigModel中设置的亮度值\r
}\r
}\r
\r
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)
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);
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);
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;
}