BlueToothScrollView->Add(BluetoothServiceOptionsButton);\r
BlueToothScrollView->Add(TradionalBlueToothLabel);\r
BlueToothScrollView->Add(BluetoothServiceOptionsLabel);\r
- BlueToothScrollView->Add(AttentionLabel);\r
+ // BlueToothScrollView->Add(AttentionLabel);\r
BlueToothScrollView->Add(TradionalBlueToothToggleButton);\r
AddViewToRootContainer(BlueToothScrollView);\r
}\r
class lowppowrViewEventListener : public OHOS::UIView::OnClickListener,
public OHOS::UIView::OnLongPressListener,
public OHOS::UIView::OnTouchListener,
+ public RootView::OnKeyActListener,
public OHOS::UIView::OnDragListener
{
public:
{
return true;
}
+
+ virtual bool OnKeyAct(UIView &view, const KeyEvent &event) override;
};
};
#endif /* CHARGE_NOTIFICATION_H */
\ No newline at end of file
const ImageInfo **ChargeAnimationInfoArray{nullptr}; //充电动画图片路径数组
ImageAnimatorInfo ChargeAnimationInfo[CHARGE_ANIMATION_VIEW_NUM_FRAMES]; //充电动画图像的信息
+ static OHOS::RootView::OnKeyActListener *g_onKeyActListener = nullptr;
// GILROY_BOLD_FONT
//充电中 UI
ChargeAnimationInfoArray = nullptr;
}
+ RootView::GetInstance()->SetOnKeyActListener(g_onKeyActListener);
// if(UILabel_Chargeing)
// {
// delete UILabel_Chargeing;
UIViewGroup_charge->Add(chargeAnimatorView);
}
+ g_onKeyActListener = RootView::GetInstance()->GetOnKeyActListener();
+ RootView::GetInstance()->SetOnKeyActListener(lowppowrViewEventListener::GetInstance());
+
UIViewGroup_charge->Add(UILabel_time);
UIViewGroup_charge->Add(UILabel_power);
}
-
+ bool lowppowrViewEventListener::OnKeyAct(UIView &view, const KeyEvent &event)
+ {
+ NotificationManager::GetInstance()->StopNotify();
+ return true;
+ }
}