Panagiotis Triantafyllou

ui fixes and additions

......@@ -2,7 +2,7 @@ apply plugin: 'com.android.library'
ext {
PUBLISH_GROUP_ID = 'ly.warp'
PUBLISH_VERSION = '4.5.4.6rc44'
PUBLISH_VERSION = '4.5.4.6rc45'
PUBLISH_ARTIFACT_ID = 'warply-android-sdk'
}
......
......@@ -54,7 +54,7 @@ public class CouponInfoActivity extends Activity implements View.OnClickListener
private ImageView mIvBack, mIvCouponPhoto, mIvBarcode;
private TextView mTvTerms, mTvCouponCode, mTvCouponTitle, mTvCouponSubtitle, mTvCouponDate,
mTvTermsValue, mTvFullBarcode;
mTvTermsValue, mTvFullBarcode, mTvDescription;
private LinearLayout mLlGiftIt, mLlShops, mLlBarcodeShown, mLlBarcodeContainer, mLlTerms, mLlWebsite;
private Coupon mCoupon;
private Couponset mCouponset;
......@@ -89,6 +89,7 @@ public class CouponInfoActivity extends Activity implements View.OnClickListener
mLlTerms = findViewById(R.id.ll_terms_inner);
mTvTermsValue = findViewById(R.id.tv_terms_value);
mTvFullBarcode = findViewById(R.id.tv_full_barcode);
mTvDescription = findViewById(R.id.tv_clickable_link);
initViews();
}
......@@ -224,6 +225,17 @@ public class CouponInfoActivity extends Activity implements View.OnClickListener
}
}
if (mMerchant != null && !TextUtils.isEmpty(mMerchant.getBody()) && !mMerchant.getBody().equals("null")) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
mTvDescription.setText(Html.fromHtml(mMerchant.getBody(), Html.FROM_HTML_MODE_COMPACT));
} else {
mTvDescription.setText(Html.fromHtml(mMerchant.getBody()));
}
mTvDescription.setMovementMethod(LinkMovementMethod.getInstance());
} else {
mTvDescription.setVisibility(View.GONE);
}
// if (mMerchant != null) {
// if (mMerchant.getExtraFields() != null && mMerchant.getExtraFields().has("show_map") && (mMerchant.getExtraFields().optBoolean("show_map") || mMerchant.getExtraFields().optString("show_map").equals("true"))) {
mLlShops.setVisibility(View.VISIBLE);
......
......@@ -86,6 +86,18 @@
tools:text="Χρησιμοποίησε τον παρακάτω κωδικό και πάρε δωρεάν πακέτο πάνες Pampers αποκλειστικά στα Supermarket Σκλαβενίτης" />
<TextView
android:id="@+id/tv_clickable_link"
fontPath="fonts/pf_square_sans_pro_regular.ttf"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:gravity="center"
android:paddingHorizontal="32dp"
android:textColor="#415564"
android:textSize="16sp"
tools:text="Χρησιμοποίησε" />
<TextView
android:id="@+id/textView15"
fontPath="fonts/pf_square_sans_pro_medium.ttf"
android:layout_width="wrap_content"
......