thkouk00

fixes in wallet v2

......@@ -16,6 +16,7 @@ import androidx.recyclerview.widget.RecyclerView;
import org.json.JSONException;
import ly.warp.sdk.R;
import ly.warp.sdk.fragments.BaseFragment;
import ly.warp.sdk.io.models.Coupon;
import ly.warp.sdk.io.models.CouponList;
import ly.warp.sdk.views.adapters.HomeCouponAdapter;
......@@ -36,7 +37,7 @@ public class LoyaltyActivity extends Activity implements View.OnClickListener,
private RecyclerView mRecyclerCoupons, mRecyclerBurntCoupons;
private HomeCouponAdapter mAdapterCoupons, mAdapterBurntCoupons;
private Spinner mCouponSpinner, mRedemptionSpinner;
private TextView mTvAnalysisButton;
private TextView mTvAnalysisButton, mTvUsername;
// ===========================================================
// Methods for/from SuperClass/Interfaces
......@@ -54,6 +55,7 @@ public class LoyaltyActivity extends Activity implements View.OnClickListener,
mCouponSpinner = findViewById(R.id.sp_coupons);
mRedemptionSpinner = findViewById(R.id.sp_redemption);
mTvAnalysisButton = findViewById(R.id.rl_analysis_row).findViewById(R.id.cl_chart_info).findViewById(R.id.tv_analysis_details);
mTvUsername = findViewById(R.id.cl_loyalty_info_banner).findViewById(R.id.tv_card_username);
initViews();
}
......@@ -90,6 +92,11 @@ public class LoyaltyActivity extends Activity implements View.OnClickListener,
// ===========================================================
private void initViews() {
if (BaseFragment.getConsumer() != null)
mTvUsername.setText(String.format(getResources().getString(R.string.cos_profile_loyalty_name),
BaseFragment.getConsumer().getFirstName(), BaseFragment.getConsumer().getLastName()));
/********* TEST COUPONS DATA **********/
CouponList clist = new CouponList();
try {
......
......@@ -81,6 +81,7 @@
android:inputType="textPersonName"
android:text="0€"
android:textSize="25dp"
android:textColor="#2F4455"
app:layout_constraintBottom_toBottomOf="@+id/view"
app:layout_constraintEnd_toEndOf="@+id/view"
app:layout_constraintHorizontal_bias="0.475"
......
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="@dimen/width_full"
android:layout_width="360dp"
android:layout_height="240dp"
app:cardCornerRadius="20dp"
android:layout_marginBottom="2dp"
......@@ -86,9 +86,9 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:layout_marginBottom="16dp"
android:background="@drawable/shape_cos_gradient3"
android:paddingHorizontal="12dp"
android:layout_marginBottom="16dp"
android:paddingVertical="4dp"
android:text="Πάρε το δώρο σου"
android:textColor="@android:color/white"
......
......@@ -35,6 +35,7 @@
android:src="@drawable/ic_traveller_white" />
<TextView
android:id="@+id/tv_card_username"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/iv_loyalty_type"
......
......@@ -20,7 +20,7 @@
<string name="menu_shop">Shop</string>
<string name="menu_loyalty">Loyalty</string>
<string name="menu_profile">Προφίλ</string>
<string name="cos_profile_loyalty_name">Γιώργος Γεωργίου</string>
<string name="cos_profile_loyalty_name">%1$s %2$s</string>
<string name="cos_questionnaire">Ερωτηματολόγιο</string>
<string name="cos_gifts_loyalty_title">Τα δώρα μου</string>
<string name="cos_coupons_loyalty_title">Ενεργά κουπόνια</string>
......