Panagiotis Triantafyllou

ui fixes and additions

...@@ -2,7 +2,7 @@ apply plugin: 'com.android.library' ...@@ -2,7 +2,7 @@ apply plugin: 'com.android.library'
2 2
3 ext { 3 ext {
4 PUBLISH_GROUP_ID = 'ly.warp' 4 PUBLISH_GROUP_ID = 'ly.warp'
5 - PUBLISH_VERSION = '4.5.4.6rc44' 5 + PUBLISH_VERSION = '4.5.4.6rc45'
6 PUBLISH_ARTIFACT_ID = 'warply-android-sdk' 6 PUBLISH_ARTIFACT_ID = 'warply-android-sdk'
7 } 7 }
8 8
......
...@@ -54,7 +54,7 @@ public class CouponInfoActivity extends Activity implements View.OnClickListener ...@@ -54,7 +54,7 @@ public class CouponInfoActivity extends Activity implements View.OnClickListener
54 54
55 private ImageView mIvBack, mIvCouponPhoto, mIvBarcode; 55 private ImageView mIvBack, mIvCouponPhoto, mIvBarcode;
56 private TextView mTvTerms, mTvCouponCode, mTvCouponTitle, mTvCouponSubtitle, mTvCouponDate, 56 private TextView mTvTerms, mTvCouponCode, mTvCouponTitle, mTvCouponSubtitle, mTvCouponDate,
57 - mTvTermsValue, mTvFullBarcode; 57 + mTvTermsValue, mTvFullBarcode, mTvDescription;
58 private LinearLayout mLlGiftIt, mLlShops, mLlBarcodeShown, mLlBarcodeContainer, mLlTerms, mLlWebsite; 58 private LinearLayout mLlGiftIt, mLlShops, mLlBarcodeShown, mLlBarcodeContainer, mLlTerms, mLlWebsite;
59 private Coupon mCoupon; 59 private Coupon mCoupon;
60 private Couponset mCouponset; 60 private Couponset mCouponset;
...@@ -89,6 +89,7 @@ public class CouponInfoActivity extends Activity implements View.OnClickListener ...@@ -89,6 +89,7 @@ public class CouponInfoActivity extends Activity implements View.OnClickListener
89 mLlTerms = findViewById(R.id.ll_terms_inner); 89 mLlTerms = findViewById(R.id.ll_terms_inner);
90 mTvTermsValue = findViewById(R.id.tv_terms_value); 90 mTvTermsValue = findViewById(R.id.tv_terms_value);
91 mTvFullBarcode = findViewById(R.id.tv_full_barcode); 91 mTvFullBarcode = findViewById(R.id.tv_full_barcode);
92 + mTvDescription = findViewById(R.id.tv_clickable_link);
92 93
93 initViews(); 94 initViews();
94 } 95 }
...@@ -224,6 +225,17 @@ public class CouponInfoActivity extends Activity implements View.OnClickListener ...@@ -224,6 +225,17 @@ public class CouponInfoActivity extends Activity implements View.OnClickListener
224 } 225 }
225 } 226 }
226 227
228 + if (mMerchant != null && !TextUtils.isEmpty(mMerchant.getBody()) && !mMerchant.getBody().equals("null")) {
229 + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
230 + mTvDescription.setText(Html.fromHtml(mMerchant.getBody(), Html.FROM_HTML_MODE_COMPACT));
231 + } else {
232 + mTvDescription.setText(Html.fromHtml(mMerchant.getBody()));
233 + }
234 + mTvDescription.setMovementMethod(LinkMovementMethod.getInstance());
235 + } else {
236 + mTvDescription.setVisibility(View.GONE);
237 + }
238 +
227 // if (mMerchant != null) { 239 // if (mMerchant != null) {
228 // if (mMerchant.getExtraFields() != null && mMerchant.getExtraFields().has("show_map") && (mMerchant.getExtraFields().optBoolean("show_map") || mMerchant.getExtraFields().optString("show_map").equals("true"))) { 240 // if (mMerchant.getExtraFields() != null && mMerchant.getExtraFields().has("show_map") && (mMerchant.getExtraFields().optBoolean("show_map") || mMerchant.getExtraFields().optString("show_map").equals("true"))) {
229 mLlShops.setVisibility(View.VISIBLE); 241 mLlShops.setVisibility(View.VISIBLE);
......
...@@ -86,6 +86,18 @@ ...@@ -86,6 +86,18 @@
86 tools:text="Χρησιμοποίησε τον παρακάτω κωδικό και πάρε δωρεάν πακέτο πάνες Pampers αποκλειστικά στα Supermarket Σκλαβενίτης" /> 86 tools:text="Χρησιμοποίησε τον παρακάτω κωδικό και πάρε δωρεάν πακέτο πάνες Pampers αποκλειστικά στα Supermarket Σκλαβενίτης" />
87 87
88 <TextView 88 <TextView
89 + android:id="@+id/tv_clickable_link"
90 + fontPath="fonts/pf_square_sans_pro_regular.ttf"
91 + android:layout_width="match_parent"
92 + android:layout_height="wrap_content"
93 + android:layout_marginTop="16dp"
94 + android:gravity="center"
95 + android:paddingHorizontal="32dp"
96 + android:textColor="#415564"
97 + android:textSize="16sp"
98 + tools:text="Χρησιμοποίησε" />
99 +
100 + <TextView
89 android:id="@+id/textView15" 101 android:id="@+id/textView15"
90 fontPath="fonts/pf_square_sans_pro_medium.ttf" 102 fontPath="fonts/pf_square_sans_pro_medium.ttf"
91 android:layout_width="wrap_content" 103 android:layout_width="wrap_content"
......