thkouk00

Merge branch 'cosmote' of https://git.warp.ly/open-source/warply_android_sdk_mav…

…en_plugin into cosmote
...@@ -27,6 +27,11 @@ ...@@ -27,6 +27,11 @@
27 android:screenOrientation="portrait" /> 27 android:screenOrientation="portrait" />
28 28
29 <activity 29 <activity
30 + android:name="ly.warp.sdk.activities.LoyaltyActivity"
31 + android:exported="false"
32 + android:screenOrientation="portrait" />
33 +
34 + <activity
30 android:name="ly.warp.sdk.dexter.PermissionsActivity" 35 android:name="ly.warp.sdk.dexter.PermissionsActivity"
31 android:exported="false" 36 android:exported="false"
32 android:launchMode="singleInstance" 37 android:launchMode="singleInstance"
......
1 +package ly.warp.sdk.activities;
2 +
3 +import android.app.Activity;
4 +import android.os.Bundle;
5 +import android.view.View;
6 +import android.widget.ImageView;
7 +
8 +import ly.warp.sdk.R;
9 +
10 +
11 +public class LoyaltyActivity extends Activity implements View.OnClickListener {
12 +
13 + // ===========================================================
14 + // Constants
15 + // ===========================================================
16 +
17 + // ===========================================================
18 + // Fields
19 + // ===========================================================
20 +
21 + private ImageView mIvBack;
22 +
23 + // ===========================================================
24 + // Methods for/from SuperClass/Interfaces
25 + // ===========================================================
26 +
27 + @Override
28 + public void onCreate(Bundle savedInstanceState) {
29 + super.onCreate(savedInstanceState);
30 + setContentView(R.layout.activity_loyalty);
31 +
32 + mIvBack = findViewById(R.id.iv_back);
33 +
34 + initViews();
35 + }
36 +
37 + @Override
38 + public void onResume() {
39 + super.onResume();
40 + }
41 +
42 + @Override
43 + public void onClick(View view) {
44 + if (view.getId() == R.id.iv_back) {
45 + finish();
46 + }
47 + }
48 +
49 + // ===========================================================
50 + // Methods
51 + // ===========================================================
52 +
53 + private void initViews() {
54 + mIvBack.setOnClickListener(this);
55 + }
56 +
57 + // ===========================================================
58 + // Inner and Anonymous Classes
59 + // ===========================================================
60 +
61 +}
1 package ly.warp.sdk.fragments; 1 package ly.warp.sdk.fragments;
2 2
3 +import android.content.Intent;
3 import android.os.Bundle; 4 import android.os.Bundle;
4 import android.view.LayoutInflater; 5 import android.view.LayoutInflater;
5 import android.view.View; 6 import android.view.View;
...@@ -7,6 +8,7 @@ import android.view.ViewGroup; ...@@ -7,6 +8,7 @@ import android.view.ViewGroup;
7 import android.widget.LinearLayout; 8 import android.widget.LinearLayout;
8 9
9 import androidx.annotation.Nullable; 10 import androidx.annotation.Nullable;
11 +import androidx.constraintlayout.widget.ConstraintLayout;
10 import androidx.fragment.app.Fragment; 12 import androidx.fragment.app.Fragment;
11 import androidx.recyclerview.widget.LinearLayoutManager; 13 import androidx.recyclerview.widget.LinearLayoutManager;
12 import androidx.recyclerview.widget.RecyclerView; 14 import androidx.recyclerview.widget.RecyclerView;
...@@ -14,6 +16,7 @@ import androidx.recyclerview.widget.RecyclerView; ...@@ -14,6 +16,7 @@ import androidx.recyclerview.widget.RecyclerView;
14 import org.json.JSONException; 16 import org.json.JSONException;
15 17
16 import ly.warp.sdk.R; 18 import ly.warp.sdk.R;
19 +import ly.warp.sdk.activities.LoyaltyActivity;
17 import ly.warp.sdk.activities.WarpViewActivity; 20 import ly.warp.sdk.activities.WarpViewActivity;
18 import ly.warp.sdk.io.models.Campaign; 21 import ly.warp.sdk.io.models.Campaign;
19 import ly.warp.sdk.io.models.CampaignList; 22 import ly.warp.sdk.io.models.CampaignList;
...@@ -32,6 +35,7 @@ public class LoyaltyFragment extends Fragment implements View.OnClickListener { ...@@ -32,6 +35,7 @@ public class LoyaltyFragment extends Fragment implements View.OnClickListener {
32 private RecyclerView mRecyclerDeals, mRecyclerGifts, mRecyclerMore; 35 private RecyclerView mRecyclerDeals, mRecyclerGifts, mRecyclerMore;
33 private ProfileCampaignAdapter mAdapterDeals, mAdapterGifts, mAdapterMore; 36 private ProfileCampaignAdapter mAdapterDeals, mAdapterGifts, mAdapterMore;
34 private LinearLayout mLlMoreDeals, mLlMoreGifts, mLlMore; 37 private LinearLayout mLlMoreDeals, mLlMoreGifts, mLlMore;
38 + private ConstraintLayout mClRewardsWallet;
35 39
36 // =========================================================== 40 // ===========================================================
37 // Methods for/from SuperClass/Interfaces 41 // Methods for/from SuperClass/Interfaces
...@@ -56,6 +60,9 @@ public class LoyaltyFragment extends Fragment implements View.OnClickListener { ...@@ -56,6 +60,9 @@ public class LoyaltyFragment extends Fragment implements View.OnClickListener {
56 } 60 }
57 /********* TEST DATA **********/ 61 /********* TEST DATA **********/
58 62
63 + mClRewardsWallet = view.findViewById(R.id.cl_rewards_wallet);
64 + mClRewardsWallet.setOnClickListener(this);
65 +
59 mLlMoreDeals = view.findViewById(R.id.ll_more); 66 mLlMoreDeals = view.findViewById(R.id.ll_more);
60 mLlMoreDeals.setOnClickListener(this); 67 mLlMoreDeals.setOnClickListener(this);
61 mLlMoreGifts = view.findViewById(R.id.ll_more2); 68 mLlMoreGifts = view.findViewById(R.id.ll_more2);
...@@ -108,13 +115,10 @@ public class LoyaltyFragment extends Fragment implements View.OnClickListener { ...@@ -108,13 +115,10 @@ public class LoyaltyFragment extends Fragment implements View.OnClickListener {
108 115
109 @Override 116 @Override
110 public void onClick(View view) { 117 public void onClick(View view) {
111 -// if(view.getId() == R.id.tv_info){ 118 + if (view.getId() == R.id.cl_rewards_wallet) {
112 -// Intent sendIntent = new Intent(); 119 + Intent intent = new Intent(getContext(), LoyaltyActivity.class);
113 -// sendIntent.setAction(Intent.ACTION_SEND); 120 + getContext().startActivity(intent);
114 -// sendIntent.putExtra(Intent.EXTRA_TEXT, tvInfo.getText().toString()); 121 + }
115 -// sendIntent.setType("text/plain");
116 -// startActivity(Intent.createChooser(sendIntent,"Share"));
117 -// }
118 } 122 }
119 123
120 // =========================================================== 124 // ===========================================================
......

8.67 KB | W: | H:

8.04 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
1 <?xml version="1.0" encoding="utf-8"?> 1 <?xml version="1.0" encoding="utf-8"?>
2 <selector xmlns:android="http://schemas.android.com/apk/res/android"> 2 <selector xmlns:android="http://schemas.android.com/apk/res/android">
3 - <item android:drawable="@drawable/ic_home_pressed" android:state_checked="false"/> 3 + <item android:drawable="@drawable/ic_home" android:state_checked="false"/>
4 <item android:drawable="@drawable/ic_home_pressed" android:state_checked="true"/> 4 <item android:drawable="@drawable/ic_home_pressed" android:state_checked="true"/>
5 </selector> 5 </selector>
...\ No newline at end of file ...\ No newline at end of file
......
1 <?xml version="1.0" encoding="utf-8"?> 1 <?xml version="1.0" encoding="utf-8"?>
2 <selector xmlns:android="http://schemas.android.com/apk/res/android"> 2 <selector xmlns:android="http://schemas.android.com/apk/res/android">
3 <item android:drawable="@drawable/ic_loyalty" android:state_checked="false"/> 3 <item android:drawable="@drawable/ic_loyalty" android:state_checked="false"/>
4 - <item android:drawable="@drawable/ic_loyalty" android:state_selected="true"/> 4 + <item android:drawable="@drawable/ic_loyalty_pressed" android:state_selected="true"/>
5 </selector> 5 </selector>
...\ No newline at end of file ...\ No newline at end of file
......
1 <?xml version="1.0" encoding="utf-8"?> 1 <?xml version="1.0" encoding="utf-8"?>
2 <selector xmlns:android="http://schemas.android.com/apk/res/android"> 2 <selector xmlns:android="http://schemas.android.com/apk/res/android">
3 <item android:drawable="@drawable/ic_profile" android:state_checked="false"/> 3 <item android:drawable="@drawable/ic_profile" android:state_checked="false"/>
4 - <item android:drawable="@drawable/ic_profile" android:state_checked="true"/> 4 + <item android:drawable="@drawable/ic_profile_pressed" android:state_checked="true"/>
5 </selector> 5 </selector>
...\ No newline at end of file ...\ No newline at end of file
......
1 <?xml version="1.0" encoding="utf-8"?> 1 <?xml version="1.0" encoding="utf-8"?>
2 <selector xmlns:android="http://schemas.android.com/apk/res/android"> 2 <selector xmlns:android="http://schemas.android.com/apk/res/android">
3 <item android:drawable="@drawable/ic_shop" android:state_checked="false"/> 3 <item android:drawable="@drawable/ic_shop" android:state_checked="false"/>
4 - <item android:drawable="@drawable/ic_shop" android:state_checked="true"/> 4 + <item android:drawable="@drawable/ic_shop_pressed" android:state_checked="true"/>
5 </selector> 5 </selector>
...\ No newline at end of file ...\ No newline at end of file
......
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<shape xmlns:android="http://schemas.android.com/apk/res/android"
3 + android:shape="rectangle">
4 + <gradient
5 + android:startColor="@color/cos_green2"
6 + android:centerColor="@color/green_dark"
7 + android:endColor="@color/cos_blue2"
8 + android:type="linear"/>
9 + <corners
10 + android:radius="9dp"/>
11 +
12 + <stroke android:width="2dp"
13 + android:color="@color/white_tr"/>
14 +</shape>
...\ No newline at end of file ...\ No newline at end of file
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<shape xmlns:android="http://schemas.android.com/apk/res/android"
3 + android:shape="rectangle">
4 + <corners android:topLeftRadius="30dp" />
5 +
6 + <solid android:color="@color/grey_light" />
7 +
8 +<!-- <stroke-->
9 +<!-- android:width="1dp"-->
10 +<!-- android:color="@color/cos_green" />-->
11 +</shape>
...\ No newline at end of file ...\ No newline at end of file
1 +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
2 + xmlns:app="http://schemas.android.com/apk/res-auto"
3 + android:layout_width="match_parent"
4 + android:layout_height="match_parent"
5 + android:background="@android:color/white">
6 +
7 + <androidx.constraintlayout.widget.ConstraintLayout
8 + android:id="@+id/cl_loyalty_wallet_header"
9 + android:layout_width="match_parent"
10 + android:layout_height="50dp"
11 + android:background="@android:color/white">
12 +
13 + <ImageView
14 + android:id="@+id/iv_back"
15 + android:layout_width="wrap_content"
16 + android:layout_height="wrap_content"
17 + android:layout_marginStart="16dp"
18 + android:src="@drawable/ic_back"
19 + app:layout_constraintBottom_toBottomOf="parent"
20 + app:layout_constraintStart_toStartOf="parent"
21 + app:layout_constraintTop_toTopOf="parent" />
22 +
23 + <TextView
24 + android:layout_width="wrap_content"
25 + android:layout_height="wrap_content"
26 + android:text="@string/cos_profile_reward"
27 + android:textColor="@color/grey"
28 + android:textSize="16sp"
29 + android:textStyle="bold"
30 + app:layout_constraintBottom_toBottomOf="parent"
31 + app:layout_constraintEnd_toEndOf="parent"
32 + app:layout_constraintStart_toStartOf="parent"
33 + app:layout_constraintTop_toTopOf="parent" />
34 + </androidx.constraintlayout.widget.ConstraintLayout>
35 +
36 + <ScrollView
37 + android:layout_width="match_parent"
38 + android:layout_height="match_parent"
39 + android:layout_below="@+id/cl_loyalty_wallet_header"
40 + android:background="@color/cos_green">
41 + <!-- android:paddingBottom="24dp"-->
42 + <androidx.constraintlayout.widget.ConstraintLayout
43 + android:layout_width="match_parent"
44 + android:layout_height="wrap_content"
45 + android:background="@drawable/shape_cos_loyalty">
46 +
47 + <androidx.constraintlayout.widget.ConstraintLayout
48 + android:layout_width="300dp"
49 + android:layout_height="200dp"
50 + app:layout_constraintStart_toStartOf="parent"
51 + app:layout_constraintEnd_toEndOf="parent"
52 + android:background="@drawable/shape_cos_gradient2">
53 +
54 + </androidx.constraintlayout.widget.ConstraintLayout>
55 + </androidx.constraintlayout.widget.ConstraintLayout>
56 + </ScrollView>
57 +</RelativeLayout>
...@@ -10,4 +10,8 @@ ...@@ -10,4 +10,8 @@
10 <color name="white_tr">#32FFFFFF</color> 10 <color name="white_tr">#32FFFFFF</color>
11 <color name="cos_grey_dark">#787878</color> 11 <color name="cos_grey_dark">#787878</color>
12 <color name="cos_cyan">#A3F2DA</color> 12 <color name="cos_cyan">#A3F2DA</color>
13 + <color name="grey_light">#f1f1f2</color>
14 + <color name="cos_green2">#52DF5A</color>
15 + <color name="green_dark">#1DA87A</color>
16 + <color name="cos_blue2">#0478BE</color>
13 </resources> 17 </resources>
...\ No newline at end of file ...\ No newline at end of file
......