Toggle navigation
Toggle navigation
This project
Loading...
Sign in
open-source
/
warply_android_sdk_maven_plugin
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
Panagiotis Triantafyllou
2022-03-23 13:07:06 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
adc9229291c49451b5d976b8e4b71d937ffe7fa3
adc92292
1 parent
c538f429
wallet activity
Show whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
167 additions
and
11 deletions
warply_android_sdk/src/main/AndroidManifest.xml
warply_android_sdk/src/main/java/ly/warp/sdk/activities/LoyaltyActivity.java
warply_android_sdk/src/main/java/ly/warp/sdk/fragments/LoyaltyFragment.java
warply_android_sdk/src/main/res/drawable-xhdpi/ic_back.png
warply_android_sdk/src/main/res/drawable-xhdpi/ic_close.png
warply_android_sdk/src/main/res/drawable-xhdpi/ic_home.png
warply_android_sdk/src/main/res/drawable-xhdpi/ic_loyalty.png
warply_android_sdk/src/main/res/drawable-xhdpi/ic_loyalty_pressed.png
warply_android_sdk/src/main/res/drawable-xhdpi/ic_profile_pressed.png
warply_android_sdk/src/main/res/drawable-xhdpi/ic_shop_pressed.png
warply_android_sdk/src/main/res/drawable/selector_menu_home.xml
warply_android_sdk/src/main/res/drawable/selector_menu_loyalty.xml
warply_android_sdk/src/main/res/drawable/selector_menu_profile.xml
warply_android_sdk/src/main/res/drawable/selector_menu_shop.xml
warply_android_sdk/src/main/res/drawable/shape_cos_gradient2.xml
warply_android_sdk/src/main/res/drawable/shape_cos_loyalty.xml
warply_android_sdk/src/main/res/layout/activity_loyalty.xml
warply_android_sdk/src/main/res/values/colors.xml
warply_android_sdk/src/main/AndroidManifest.xml
View file @
adc9229
...
...
@@ -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"
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/activities/LoyaltyActivity.java
0 → 100644
View file @
adc9229
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
// ===========================================================
}
warply_android_sdk/src/main/java/ly/warp/sdk/fragments/LoyaltyFragment.java
View file @
adc9229
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
);
}
}
// ===========================================================
...
...
warply_android_sdk/src/main/res/drawable-xhdpi/ic_back.png
0 → 100644
View file @
adc9229
470 Bytes
warply_android_sdk/src/main/res/drawable-xhdpi/ic_close.png
0 → 100644
View file @
adc9229
1.01 KB
warply_android_sdk/src/main/res/drawable-xhdpi/ic_home.png
0 → 100644
View file @
adc9229
4.65 KB
warply_android_sdk/src/main/res/drawable-xhdpi/ic_loyalty.png
View file @
adc9229
8.67 KB
|
W:
|
H:
8.04 KB
|
W:
|
H:
2-up
Swipe
Onion skin
warply_android_sdk/src/main/res/drawable-xhdpi/ic_loyalty_pressed.png
0 → 100644
View file @
adc9229
8.67 KB
warply_android_sdk/src/main/res/drawable-xhdpi/ic_profile_pressed.png
0 → 100644
View file @
adc9229
4.67 KB
warply_android_sdk/src/main/res/drawable-xhdpi/ic_shop_pressed.png
0 → 100644
View file @
adc9229
3.98 KB
warply_android_sdk/src/main/res/drawable/selector_menu_home.xml
View file @
adc9229
<?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
...
...
warply_android_sdk/src/main/res/drawable/selector_menu_loyalty.xml
View file @
adc9229
<?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
...
...
warply_android_sdk/src/main/res/drawable/selector_menu_profile.xml
View file @
adc9229
<?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
...
...
warply_android_sdk/src/main/res/drawable/selector_menu_shop.xml
View file @
adc9229
<?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
...
...
warply_android_sdk/src/main/res/drawable/shape_cos_gradient2.xml
0 → 100644
View file @
adc9229
<?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
warply_android_sdk/src/main/res/drawable/shape_cos_loyalty.xml
0 → 100644
View file @
adc9229
<?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
warply_android_sdk/src/main/res/layout/activity_loyalty.xml
0 → 100644
View file @
adc9229
<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>
warply_android_sdk/src/main/res/values/colors.xml
View file @
adc9229
...
...
@@ -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
...
...
Please
register
or
login
to post a comment