*/
#include "wearable_log.h"
-#include "AlipayTransListItemView.h"
+// #include "AlipayTransListItemView.h"
+#include "alipay/include/AlipayTrans/AlipayTransListItemView.h"
namespace OHOS {
-static constexpr int16_t ALIPAY_TRANS_LIST_ITEM_BUTTON_HEIGHT = 95;
-static constexpr int16_t ALIPAY_TRANS_LIST_ITEM_LABEL_X = 53;
+static constexpr int16_t ALIPAY_TRANS_LIST_ITEM_BUTTON_HEIGHT = 120;
-static constexpr int16_t ALIPAY_TRANS_LIST_ITEM_LABEL_WIDTH = 347;
-static constexpr int16_t ALIPAY_TRANS_LIST_ITEM_LABEL_HEIGHT = 90;
+static constexpr int16 ALIPAY_LIST_BACK_X = 0;
+static constexpr int16 ALIPAY_LIST_BACK_Y = 0;
+static constexpr int16_t ALIPAY_LIST_BACK_WIDTH = 380;
+static constexpr int16_t ALIPAY_LIST_BACK_HEIGHT = 100;
-static constexpr int16_t ALIPAY_TRANS_LIST_ITEM_FONT_SIZE = 35;
+static constexpr int16_t ALIPAY_LIST_ITEM_LABEL_X = 47 + ALIPAY_LIST_BACK_X;
+static constexpr int16_t ALIPAY_LIST_ITEM_LABEL_Y = 32;
+static constexpr int16_t ALIPAY_LIST_ITEM_LABEL_WIDTH = 250;
+static constexpr int16_t ALIPAY_LIST_ITEM_LABEL_HEIGHT = 35;
+static constexpr int16_t ALIPAY_LIST_ITEM_FONT_SIZE = 30;
+
+static constexpr int16 NUMS_2 = 2;
+static constexpr int16 NUMS_50 = 50;
AlipayTransListItemView::AlipayTransListItemView()
{
SetTouchable(true);
SetUpChild();
+ Add(&back);
Add(&sLabel);
+ Add(&sNextImage);
}
AlipayTransListItemView::~AlipayTransListItemView()
{
+ Remove(&back);
Remove(&sLabel);
+ Remove(&sNextImage);
}
void AlipayTransListItemView::SetItemInfo(const AlipayTransListItem &itemInfo)
{
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AlipayTransListItemView::SetUpChild()");
- sLabel.SetPosition(ALIPAY_TRANS_LIST_ITEM_LABEL_X, 0);
- sLabel.Resize(ALIPAY_TRANS_LIST_ITEM_LABEL_WIDTH, ALIPAY_TRANS_LIST_ITEM_LABEL_HEIGHT);
- sLabel.SetFont(DEFAULT_VECTOR_FONT_FILENAME, ALIPAY_TRANS_LIST_ITEM_FONT_SIZE);
+ sLabel.SetPosition(ALIPAY_LIST_ITEM_LABEL_X, ALIPAY_LIST_ITEM_LABEL_Y);
+ sLabel.Resize(ALIPAY_LIST_ITEM_LABEL_WIDTH, ALIPAY_LIST_ITEM_LABEL_HEIGHT);
+ sLabel.SetFont(DEFAULT_VECTOR_FONT_FILENAME, ALIPAY_LIST_ITEM_FONT_SIZE);
sLabel.SetAlign(TEXT_ALIGNMENT_LEFT, TEXT_ALIGNMENT_CENTER);
- sLabel.SetStyle(STYLE_TEXT_OPA, OPA_OPAQUE);
- sLabel.SetStyle(STYLE_TEXT_COLOR, Color::White().full);
- sLabel.SetStyle(STYLE_BACKGROUND_COLOR, Color::Black().full);
- sLabel.SetStyle(STYLE_BACKGROUND_OPA, OPA_OPAQUE);
+ sLabel.SetLineBreakMode(UILabel::LINE_BREAK_OSCILLATION);
+ // sLabel.SetStyle(STYLE_TEXT_OPA, OPA_OPAQUE);
+ // sLabel.SetStyle(STYLE_TEXT_COLOR, Color::White().full);
+ // sLabel.SetStyle(STYLE_BACKGROUND_COLOR, Color::Black().full);
+ // sLabel.SetStyle(STYLE_BACKGROUND_OPA, OPA_OPAQUE);
+
+
+ sNextImage.SetSrc(PNG_SETTING_NEXT_IMAGE);
+ sNextImage.SetPosition(ALIPAY_LIST_BACK_X + 326, 37);
+
+ back.SetPosition(ALIPAY_LIST_BACK_X, ALIPAY_LIST_BACK_Y, ALIPAY_LIST_BACK_WIDTH, ALIPAY_LIST_BACK_HEIGHT);
+ back.SetStyle(STYLE_BACKGROUND_COLOR, 0xff191919);
+ back.SetStyle(STYLE_BACKGROUND_OPA, 0xff);
+ back.SetStyle(STYLE_BORDER_RADIUS, 100);
}
uint8_t AlipayTransListItemView::GetAlipayTransListIndex()
#include "common_def.h"
namespace OHOS {
-static constexpr int16_t ALIPAY_TRANS_LIST_POSITION_X = 33;
-static constexpr int16_t ALIPAY_TRANS_LIST_POSITION_Y = 59;
+static constexpr int16_t ALIPAY_TRANS_LIST_POSITION_X = 43;
+static constexpr int16_t ALIPAY_TRANS_LIST_POSITION_Y = 90;
static constexpr int16_t ALIPAY_TRANS_LIST_SCROLLBLANKSIZE = 50;
static constexpr int16 MAX_SCR_DIS = 900;
static constexpr int16 LIST_POS = 20;
return false;
}
contentList->SetPosition(ALIPAY_TRANS_LIST_POSITION_X, ALIPAY_TRANS_LIST_POSITION_Y);
- contentList->Resize(HORIZONTAL_RESOLUTION - ALIPAY_TRANS_LIST_POSITION_X, VERTICAL_RESOLUTION - 115);
+ contentList->Resize(380, 340);
contentList->SetScrollBlankSize(ALIPAY_TRANS_LIST_SCROLLBLANKSIZE);
contentList->SetSelectPosition(HORIZONTAL_RESOLUTION / SNUM_2); // middle position
contentList->SetDraggable(true);