Showing
4 changed files
with
71 additions
and
5 deletions
| ... | @@ -35,6 +35,10 @@ | ... | @@ -35,6 +35,10 @@ |
| 35 | android:name="ly.warp.sdk.activities.BillPaymentActivity" | 35 | android:name="ly.warp.sdk.activities.BillPaymentActivity" |
| 36 | android:exported="false" | 36 | android:exported="false" |
| 37 | android:screenOrientation="portrait" /> | 37 | android:screenOrientation="portrait" /> |
| 38 | + <activity | ||
| 39 | + android:name="ly.warp.sdk.activities.CouponInfoActivity" | ||
| 40 | + android:exported="false" | ||
| 41 | + android:screenOrientation="portrait" /> | ||
| 38 | 42 | ||
| 39 | <activity | 43 | <activity |
| 40 | android:name="ly.warp.sdk.dexter.PermissionsActivity" | 44 | android:name="ly.warp.sdk.dexter.PermissionsActivity" | ... | ... |
| 1 | +package ly.warp.sdk.activities; | ||
| 2 | + | ||
| 3 | +import android.app.Activity; | ||
| 4 | +import android.app.Dialog; | ||
| 5 | +import android.os.Bundle; | ||
| 6 | +import android.view.View; | ||
| 7 | +import android.widget.Button; | ||
| 8 | +import android.widget.ImageView; | ||
| 9 | + | ||
| 10 | +import ly.warp.sdk.R; | ||
| 11 | + | ||
| 12 | + | ||
| 13 | +public class CouponInfoActivity extends Activity implements View.OnClickListener { | ||
| 14 | + | ||
| 15 | + // =========================================================== | ||
| 16 | + // Constants | ||
| 17 | + // =========================================================== | ||
| 18 | + | ||
| 19 | + // =========================================================== | ||
| 20 | + // Fields | ||
| 21 | + // =========================================================== | ||
| 22 | + | ||
| 23 | + private ImageView mIvBack; | ||
| 24 | + | ||
| 25 | + // =========================================================== | ||
| 26 | + // Methods for/from SuperClass/Interfaces | ||
| 27 | + // =========================================================== | ||
| 28 | + | ||
| 29 | + @Override | ||
| 30 | + public void onCreate(Bundle savedInstanceState) { | ||
| 31 | + super.onCreate(savedInstanceState); | ||
| 32 | + setContentView(R.layout.activity_coupon_info); | ||
| 33 | + | ||
| 34 | + mIvBack = findViewById(R.id.iv_coupon_info_back); | ||
| 35 | + | ||
| 36 | + initViews(); | ||
| 37 | + } | ||
| 38 | + | ||
| 39 | + @Override | ||
| 40 | + public void onResume() { | ||
| 41 | + super.onResume(); | ||
| 42 | + } | ||
| 43 | + | ||
| 44 | + @Override | ||
| 45 | + public void onClick(View view) { | ||
| 46 | + if (view.getId() == R.id.iv_coupon_info_back) { | ||
| 47 | + onBackPressed(); | ||
| 48 | + } | ||
| 49 | + } | ||
| 50 | + | ||
| 51 | + // =========================================================== | ||
| 52 | + // Methods | ||
| 53 | + // =========================================================== | ||
| 54 | + | ||
| 55 | + private void initViews() { | ||
| 56 | + mIvBack.setOnClickListener(this); | ||
| 57 | + } | ||
| 58 | + | ||
| 59 | + // =========================================================== | ||
| 60 | + // Inner and Anonymous Classes | ||
| 61 | + // =========================================================== | ||
| 62 | + | ||
| 63 | +} |
| ... | @@ -2,7 +2,6 @@ package ly.warp.sdk.fragments; | ... | @@ -2,7 +2,6 @@ package ly.warp.sdk.fragments; |
| 2 | 2 | ||
| 3 | import android.content.Intent; | 3 | import android.content.Intent; |
| 4 | import android.os.Bundle; | 4 | import android.os.Bundle; |
| 5 | -import android.util.Log; | ||
| 6 | import android.view.LayoutInflater; | 5 | import android.view.LayoutInflater; |
| 7 | import android.view.View; | 6 | import android.view.View; |
| 8 | import android.view.ViewGroup; | 7 | import android.view.ViewGroup; |
| ... | @@ -18,8 +17,7 @@ import androidx.recyclerview.widget.RecyclerView; | ... | @@ -18,8 +17,7 @@ import androidx.recyclerview.widget.RecyclerView; |
| 18 | import org.json.JSONException; | 17 | import org.json.JSONException; |
| 19 | 18 | ||
| 20 | import ly.warp.sdk.R; | 19 | import ly.warp.sdk.R; |
| 21 | -import ly.warp.sdk.activities.BillPaymentActivity; | 20 | +import ly.warp.sdk.activities.CouponInfoActivity; |
| 22 | -import ly.warp.sdk.activities.LoyaltyActivity; | ||
| 23 | import ly.warp.sdk.views.adapters.HomeCampaignAdapter; | 21 | import ly.warp.sdk.views.adapters.HomeCampaignAdapter; |
| 24 | import ly.warp.sdk.views.adapters.HomeCouponAdapter; | 22 | import ly.warp.sdk.views.adapters.HomeCouponAdapter; |
| 25 | import ly.warp.sdk.activities.WarpViewActivity; | 23 | import ly.warp.sdk.activities.WarpViewActivity; |
| ... | @@ -124,7 +122,8 @@ public class HomeFragment extends Fragment { | ... | @@ -124,7 +122,8 @@ public class HomeFragment extends Fragment { |
| 124 | // WarpViewActivity.createIntentFromSessionUUID(getContext(), | 122 | // WarpViewActivity.createIntentFromSessionUUID(getContext(), |
| 125 | // coupon.getCoupon())); | 123 | // coupon.getCoupon())); |
| 126 | 124 | ||
| 127 | - Intent intent = new Intent(getContext(), BillPaymentActivity.class); | 125 | +// Intent intent = new Intent(getContext(), BillPaymentActivity.class); |
| 126 | + Intent intent = new Intent(getContext(), CouponInfoActivity.class); | ||
| 128 | getContext().startActivity(intent); | 127 | getContext().startActivity(intent); |
| 129 | }) | 128 | }) |
| 130 | .doOnError(error -> { | 129 | .doOnError(error -> { | ... | ... |
| ... | @@ -12,7 +12,7 @@ | ... | @@ -12,7 +12,7 @@ |
| 12 | android:background="@android:color/white"> | 12 | android:background="@android:color/white"> |
| 13 | 13 | ||
| 14 | <ImageView | 14 | <ImageView |
| 15 | - android:id="@+id/iv_back" | 15 | + android:id="@+id/iv_coupon_info_back" |
| 16 | android:layout_width="20dp" | 16 | android:layout_width="20dp" |
| 17 | android:layout_height="20dp" | 17 | android:layout_height="20dp" |
| 18 | android:layout_marginStart="16dp" | 18 | android:layout_marginStart="16dp" | ... | ... |
-
Please register or login to post a comment