thkouk00

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

…en_plugin into cosmote
......@@ -27,6 +27,11 @@
android:screenOrientation="portrait" />
<activity
android:name="ly.warp.sdk.activities.LoyaltyActivity"
android:exported="false"
android:screenOrientation="portrait" />
<activity
android:name="ly.warp.sdk.dexter.PermissionsActivity"
android:exported="false"
android:launchMode="singleInstance"
......
package ly.warp.sdk.activities;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import ly.warp.sdk.R;
public class LoyaltyActivity extends Activity implements View.OnClickListener {
// ===========================================================
// Constants
// ===========================================================
// ===========================================================
// Fields
// ===========================================================
private ImageView mIvBack;
// ===========================================================
// Methods for/from SuperClass/Interfaces
// ===========================================================
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_loyalty);
mIvBack = findViewById(R.id.iv_back);
initViews();
}
@Override
public void onResume() {
super.onResume();
}
@Override
public void onClick(View view) {
if (view.getId() == R.id.iv_back) {
finish();
}
}
// ===========================================================
// Methods
// ===========================================================
private void initViews() {
mIvBack.setOnClickListener(this);
}
// ===========================================================
// Inner and Anonymous Classes
// ===========================================================
}
package ly.warp.sdk.fragments;
import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
......@@ -7,6 +8,7 @@ import android.view.ViewGroup;
import android.widget.LinearLayout;
import androidx.annotation.Nullable;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.fragment.app.Fragment;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
......@@ -14,6 +16,7 @@ import androidx.recyclerview.widget.RecyclerView;
import org.json.JSONException;
import ly.warp.sdk.R;
import ly.warp.sdk.activities.LoyaltyActivity;
import ly.warp.sdk.activities.WarpViewActivity;
import ly.warp.sdk.io.models.Campaign;
import ly.warp.sdk.io.models.CampaignList;
......@@ -32,6 +35,7 @@ public class LoyaltyFragment extends Fragment implements View.OnClickListener {
private RecyclerView mRecyclerDeals, mRecyclerGifts, mRecyclerMore;
private ProfileCampaignAdapter mAdapterDeals, mAdapterGifts, mAdapterMore;
private LinearLayout mLlMoreDeals, mLlMoreGifts, mLlMore;
private ConstraintLayout mClRewardsWallet;
// ===========================================================
// Methods for/from SuperClass/Interfaces
......@@ -56,6 +60,9 @@ public class LoyaltyFragment extends Fragment implements View.OnClickListener {
}
/********* TEST DATA **********/
mClRewardsWallet = view.findViewById(R.id.cl_rewards_wallet);
mClRewardsWallet.setOnClickListener(this);
mLlMoreDeals = view.findViewById(R.id.ll_more);
mLlMoreDeals.setOnClickListener(this);
mLlMoreGifts = view.findViewById(R.id.ll_more2);
......@@ -108,13 +115,10 @@ public class LoyaltyFragment extends Fragment implements View.OnClickListener {
@Override
public void onClick(View view) {
// if(view.getId() == R.id.tv_info){
// Intent sendIntent = new Intent();
// sendIntent.setAction(Intent.ACTION_SEND);
// sendIntent.putExtra(Intent.EXTRA_TEXT, tvInfo.getText().toString());
// sendIntent.setType("text/plain");
// startActivity(Intent.createChooser(sendIntent,"Share"));
// }
if (view.getId() == R.id.cl_rewards_wallet) {
Intent intent = new Intent(getContext(), LoyaltyActivity.class);
getContext().startActivity(intent);
}
}
// ===========================================================
......

8.67 KB | W: | H:

8.04 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/ic_home_pressed" android:state_checked="false"/>
<item android:drawable="@drawable/ic_home" android:state_checked="false"/>
<item android:drawable="@drawable/ic_home_pressed" android:state_checked="true"/>
</selector>
\ No newline at end of file
......
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/ic_loyalty" android:state_checked="false"/>
<item android:drawable="@drawable/ic_loyalty" android:state_selected="true"/>
<item android:drawable="@drawable/ic_loyalty_pressed" android:state_selected="true"/>
</selector>
\ No newline at end of file
......
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/ic_profile" android:state_checked="false"/>
<item android:drawable="@drawable/ic_profile" android:state_checked="true"/>
<item android:drawable="@drawable/ic_profile_pressed" android:state_checked="true"/>
</selector>
\ No newline at end of file
......
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/ic_shop" android:state_checked="false"/>
<item android:drawable="@drawable/ic_shop" android:state_checked="true"/>
<item android:drawable="@drawable/ic_shop_pressed" android:state_checked="true"/>
</selector>
\ No newline at end of file
......
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient
android:startColor="@color/cos_green2"
android:centerColor="@color/green_dark"
android:endColor="@color/cos_blue2"
android:type="linear"/>
<corners
android:radius="9dp"/>
<stroke android:width="2dp"
android:color="@color/white_tr"/>
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:topLeftRadius="30dp" />
<solid android:color="@color/grey_light" />
<!-- <stroke-->
<!-- android:width="1dp"-->
<!-- android:color="@color/cos_green" />-->
</shape>
\ No newline at end of file
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/white">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_loyalty_wallet_header"
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@android:color/white">
<ImageView
android:id="@+id/iv_back"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:src="@drawable/ic_back"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/cos_profile_reward"
android:textColor="@color/grey"
android:textSize="16sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/cl_loyalty_wallet_header"
android:background="@color/cos_green">
<!-- android:paddingBottom="24dp"-->
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/shape_cos_loyalty">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="300dp"
android:layout_height="200dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:background="@drawable/shape_cos_gradient2">
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView>
</RelativeLayout>
......@@ -10,4 +10,8 @@
<color name="white_tr">#32FFFFFF</color>
<color name="cos_grey_dark">#787878</color>
<color name="cos_cyan">#A3F2DA</color>
<color name="grey_light">#f1f1f2</color>
<color name="cos_green2">#52DF5A</color>
<color name="green_dark">#1DA87A</color>
<color name="cos_blue2">#0478BE</color>
</resources>
\ No newline at end of file
......