Showing
1 changed file
with
14 additions
and
1 deletions
... | @@ -2,11 +2,13 @@ package ly.warp.sdk.activities; | ... | @@ -2,11 +2,13 @@ package ly.warp.sdk.activities; |
2 | 2 | ||
3 | import android.app.Activity; | 3 | import android.app.Activity; |
4 | import android.app.Dialog; | 4 | import android.app.Dialog; |
5 | +import android.content.Intent; | ||
5 | import android.graphics.Paint; | 6 | import android.graphics.Paint; |
6 | import android.os.Bundle; | 7 | import android.os.Bundle; |
7 | import android.view.View; | 8 | import android.view.View; |
8 | import android.widget.Button; | 9 | import android.widget.Button; |
9 | import android.widget.ImageView; | 10 | import android.widget.ImageView; |
11 | +import android.widget.LinearLayout; | ||
10 | import android.widget.TextView; | 12 | import android.widget.TextView; |
11 | 13 | ||
12 | import ly.warp.sdk.R; | 14 | import ly.warp.sdk.R; |
... | @@ -23,7 +25,8 @@ public class CouponInfoActivity extends Activity implements View.OnClickListener | ... | @@ -23,7 +25,8 @@ public class CouponInfoActivity extends Activity implements View.OnClickListener |
23 | // =========================================================== | 25 | // =========================================================== |
24 | 26 | ||
25 | private ImageView mIvBack; | 27 | private ImageView mIvBack; |
26 | - private TextView mTvTerms; | 28 | + private TextView mTvTerms, mTvCouponCode; |
29 | + private LinearLayout mLlGiftIt; | ||
27 | 30 | ||
28 | // =========================================================== | 31 | // =========================================================== |
29 | // Methods for/from SuperClass/Interfaces | 32 | // Methods for/from SuperClass/Interfaces |
... | @@ -36,6 +39,8 @@ public class CouponInfoActivity extends Activity implements View.OnClickListener | ... | @@ -36,6 +39,8 @@ public class CouponInfoActivity extends Activity implements View.OnClickListener |
36 | 39 | ||
37 | mIvBack = findViewById(R.id.iv_coupon_info_back); | 40 | mIvBack = findViewById(R.id.iv_coupon_info_back); |
38 | mTvTerms = findViewById(R.id.tv_terms); | 41 | mTvTerms = findViewById(R.id.tv_terms); |
42 | + mLlGiftIt = findViewById(R.id.ll_gift_it); | ||
43 | + mTvCouponCode = findViewById(R.id.textView16); | ||
39 | 44 | ||
40 | initViews(); | 45 | initViews(); |
41 | } | 46 | } |
... | @@ -49,6 +54,13 @@ public class CouponInfoActivity extends Activity implements View.OnClickListener | ... | @@ -49,6 +54,13 @@ public class CouponInfoActivity extends Activity implements View.OnClickListener |
49 | public void onClick(View view) { | 54 | public void onClick(View view) { |
50 | if (view.getId() == R.id.iv_coupon_info_back) { | 55 | if (view.getId() == R.id.iv_coupon_info_back) { |
51 | onBackPressed(); | 56 | onBackPressed(); |
57 | + return; | ||
58 | + } | ||
59 | + if (view.getId() == R.id.ll_gift_it) { | ||
60 | + Intent intent = new Intent(android.content.Intent.ACTION_SEND); | ||
61 | + intent.setType("text/plain"); | ||
62 | + intent.putExtra(android.content.Intent.EXTRA_TEXT, "Link: https://cosmote.page.link /referal\n\nΧρησιμοποίησε τον κωδικό " + mTvCouponCode.getText().toString() + " για εκπτωτικό κουπόνι 4€ στο BOX: XMAS4"); | ||
63 | + startActivity(Intent.createChooser(intent, "Άνοιγμα με")); | ||
52 | } | 64 | } |
53 | } | 65 | } |
54 | 66 | ||
... | @@ -59,6 +71,7 @@ public class CouponInfoActivity extends Activity implements View.OnClickListener | ... | @@ -59,6 +71,7 @@ public class CouponInfoActivity extends Activity implements View.OnClickListener |
59 | private void initViews() { | 71 | private void initViews() { |
60 | mIvBack.setOnClickListener(this); | 72 | mIvBack.setOnClickListener(this); |
61 | mTvTerms.setPaintFlags(mTvTerms.getPaintFlags() | Paint.UNDERLINE_TEXT_FLAG); | 73 | mTvTerms.setPaintFlags(mTvTerms.getPaintFlags() | Paint.UNDERLINE_TEXT_FLAG); |
74 | + mLlGiftIt.setOnClickListener(this); | ||
62 | } | 75 | } |
63 | 76 | ||
64 | // =========================================================== | 77 | // =========================================================== | ... | ... |
-
Please register or login to post a comment