Panagiotis Triantafyllou

new wallet header

......@@ -79,7 +79,7 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener, Vie
private ConstraintLayout mClDealsBanner, mClDealsView,
mClGiftsBanner, mClToolbar, mClMarket;
private LinearLayout mLlQuestionnaire, mLlUserBadge, mLlEmptyWallet, mLlDeals, mLlGifts,
mLlMarketView;
mLlMarketView, mLlHistory;
private FlowLayout mLlActiveCodesView;
private float couponDfyValue = 0.0f, mFavValue = 0.0f;
private RecyclerView mRecyclerCoupons, mRvMarketCoupons;
......@@ -97,7 +97,7 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener, Vie
private CardView mClExp;
private boolean mDfyPressed = false, mDealsBannerPressed = false, mQuestionnairePressed = false,
mHistoryPressed = false, mHistoryMarketPressed = false, mUnifiedPressed = false,
mCouponPressed = false;
mCouponPressed = false, mHistoryBadgePressed = false;
// ===========================================================
// Methods for/from SuperClass/Interfaces
......@@ -146,6 +146,7 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener, Vie
mClMarket = findViewById(R.id.cl_market_inner);
mTvFavValue = findViewById(R.id.tv_exp_value);
mTvFavValueAll = findViewById(R.id.tv_exp_value_all);
mLlHistory = findViewById(R.id.ll_loyalty_history);
if (WarplyManagerHelper.getActiveDFYCoupons() != null) {
Collections.sort(WarplyManagerHelper.getActiveDFYCoupons(), new Comparator<ActiveDFYCouponModel>() {
......@@ -209,6 +210,7 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener, Vie
mHistoryMarketPressed = false;
mUnifiedPressed = false;
mCouponPressed = false;
mHistoryBadgePressed = false;
}
@Override
......@@ -310,6 +312,19 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener, Vie
// }
return;
}
if(view.getId() == R.id.ll_loyalty_history) {
if(!mHistoryBadgePressed) {
WarplyAnalyticsManager.logTrackersEvent(this, "click", ("LoyaltyWalletScreen")
.concat(":")
.concat("LoyaltyHistoryBadge"));
LoyaltySDKFirebaseEventModel analyticsEvent = new LoyaltySDKFirebaseEventModel();
analyticsEvent.setEventName("did_tap_history_badge");
analyticsEvent.setParameter("screen", "Loyalty Wallet");
EventBus.getDefault().post(new WarplyEventBusManager(analyticsEvent));
}
return;
}
if (view.getId() == R.id.cl_mygifts) {
if (!mDfyPressed) {
mDfyPressed = true;
......@@ -820,6 +835,7 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener, Vie
mSvLoyaltyWallet.setOnScrollChangeListener(this);
mClExp.setOnClickListener(this);
mClMarket.setOnClickListener(this);
mLlHistory.setOnClickListener(this);
}
private void nonTelcoDialog() {
......
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/white"/>
<stroke android:width="1.5dp" android:color="@color/cos_green12" />
<corners android:radius="15dp" />
<stroke android:width="1dp" android:color="@color/cos_green12" />
<corners android:radius="16dp" />
</shape>
\ No newline at end of file
......
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/white"/>
<stroke android:width="1.5dp" android:color="@color/cos_green6_tr" />
<corners android:radius="15dp" />
<stroke android:width="1dp" android:color="@color/cos_green6_tr" />
<corners android:radius="16dp" />
</shape>
\ No newline at end of file
......
......@@ -49,48 +49,63 @@
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/ll_first_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/ic_background_line"
android:gravity="center_horizontal"
android:orientation="vertical"
android:orientation="horizontal"
android:paddingHorizontal="16dp"
android:paddingVertical="24dp">
<com.google.android.material.imageview.ShapeableImageView
android:id="@+id/iv_profile_photo"
android:layout_width="70dp"
android:layout_height="70dp"
android:layout_width="74dp"
android:layout_height="74dp"
android:padding="1dp"
android:src="@drawable/ic_default_photo"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:shapeAppearanceOverlay="@style/ShapeAppearanceProfileImage"
app:strokeColor="@color/cos_grey2"
app:strokeWidth="1dp"
tools:background="@color/cos_cyan3" />
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"/>
<LinearLayout
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginStart="8dp"
app:layout_constraintTop_toTopOf="@+id/iv_profile_photo"
app:layout_constraintBottom_toBottomOf="@+id/iv_profile_photo"
app:layout_constraintStart_toEndOf="@+id/iv_profile_photo"
app:layout_constraintEnd_toEndOf="parent"
android:orientation="vertical">
<TextView
android:id="@+id/tv_profile_name"
fontPath="fonts/PeridotPE-Bold.ttf"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginVertical="6dp"
android:maxLines="1"
android:includeFontPadding="false"
android:layout_marginBottom="4dp"
android:textColor="@color/cos_light_black"
android:textSize="18sp"
android:textSize="22sp"
tools:text="Test Name" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<LinearLayout
android:id="@+id/ll_user_badge"
android:layout_width="wrap_content"
android:layout_height="42dp"
android:background="@drawable/selector_button_green_border"
android:gravity="center"
android:visibility="gone"
tools:visibility="visible">
tools:visibility="gone">
<TextView
android:id="@+id/tv_type"
......@@ -111,11 +126,11 @@
android:background="@drawable/selector_button_green_border"
android:gravity="center"
android:visibility="gone"
tools:visibility="gone">
tools:visibility="visible">
<TextView
android:id="@+id/tv_questionnaire"
fontPath="fonts/PeridotPE-SemiBold.ttf"
fontPath="fonts/PeridotPE-Bold.ttf"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:includeFontPadding="false"
......@@ -123,7 +138,20 @@
android:textColor="@color/cos_green12"
android:textSize="16sp" />
</LinearLayout>
<LinearLayout
android:id="@+id/ll_loyalty_history"
android:layout_width="52dp"
android:layout_height="42dp"
android:background="@drawable/selector_button_green_border"
android:gravity="center"
android:layout_marginStart="4dp"
android:orientation="vertical">
</LinearLayout>
</LinearLayout>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
<RelativeLayout
android:layout_width="match_parent"
......@@ -484,8 +512,8 @@
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="24dp"
android:layout_marginStart="20dp"
android:layout_marginEnd="24dp"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/iv_deals_circle"
......