#include <list>
#include "languagecode/LanguageInit.h"
#include "PhoneService.h"
+#include "components/ui_swipe_view.h"
namespace OHOS
{
class CallLogListAdapter : public AbstractAdapter,
- public UIView::OnClickListener
- {
+ public UIView::OnClickListener,
+ public UISwipeView::OnSwipeListener
+ {
public:
explicit CallLogListAdapter();
virtual ~CallLogListAdapter();
}
bool OnClick(UIView &view, const ClickEvent &event);
+ void OnSwipe(UISwipeView &view);
private:
std::list<CallLogInfo> listData;
// }
//item->SetOnClickListener(this);
+ // item->Getbutton_calllog()->->SetOnSwipeListener(this);
item->Getbutton_calllog()->SetOnClickListener(this);
item->GetDeleteButton()->SetOnClickListener(this);
+ item->Getbutton_calllog_SwipeView()->SetOnSwipeListener(this);
// item->GetUILabelButtonExt()->SetOnClickListener(itemClickListener);
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "GetView, id = %s", item->GetUILabelButtonExt()->GetViewId());
listData.push_back(item);
}
+ void CallLogListAdapter::OnSwipe(UISwipeView &view)
+ {
+ UNUSED(view);
+
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlarmPresenter::OnSwipe ");
+ view.SetIntercept((0 == view.GetCurrentPage()) ? false : true);
+ }
+
+
}
\ No newline at end of file
button_calllog_SwipeView->SetAnimatorTime(50); // 200:animator drag time(ms)
- UIView::OnDragListener *dragListener = static_cast<UIView::OnDragListener *>(MainPhonePresenter::GetInstance());
- button_calllog_SwipeView->SetOnDragListener(dragListener);
+ // UIView::OnDragListener *dragListener = static_cast<UIView::OnDragListener *>(MainPhonePresenter::GetInstance());
+ // button_calllog_SwipeView->SetOnDragListener(dragListener);
button_calllog_SwipeView->SetStyle(STYLE_BACKGROUND_COLOR, Color::Black().full);
button_calllog_SwipeView->SetStyle(STYLE_BACKGROUND_OPA, OPA_OPAQUE);
button_calllog_SwipeView->SetLoopState(false);
button_calllog_SwipeView->SetVisible(true);
-
+ button_calllog_SwipeView->SetReboundSize(0);
+ button_calllog_SwipeView->SetBlankSize(0);
//button_calllog_SwipeView[i]->SetDirection();
//button_calllog_SwipeView->SetDraggable(false);