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
thkouk00
2022-03-28 16:24:07 +0300
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
99ede5998ed56f7dc1c53b8fcbc56e6877813702
99ede599
2 parents
356cca44
db424260
Merge branch 'cosmote' of
https://git.warp.ly/open-source/warply_android_sdk_mav…
…en_plugin into cosmote
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
7 deletions
warply_android_sdk/src/main/java/ly/warp/sdk/activities/BillPaymentActivity.java
warply_android_sdk/src/main/java/ly/warp/sdk/fragments/BaseFragment.java
warply_android_sdk/src/main/res/layout/payment_success_dialog.xml
warply_android_sdk/src/main/java/ly/warp/sdk/activities/BillPaymentActivity.java
View file @
99ede59
...
...
@@ -11,9 +11,11 @@ import android.text.style.StyleSpan;
import
android.view.View
;
import
android.widget.Button
;
import
android.widget.ImageView
;
import
android.widget.LinearLayout
;
import
android.widget.TextView
;
import
ly.warp.sdk.R
;
import
ly.warp.sdk.fragments.BaseFragment
;
public
class
BillPaymentActivity
extends
Activity
implements
View
.
OnClickListener
{
...
...
@@ -28,7 +30,6 @@ public class BillPaymentActivity extends Activity implements View.OnClickListene
private
ImageView
mIvBack
;
private
Button
mPayBtn
;
private
TextView
mTvLuckyDraw
;
// ===========================================================
// Methods for/from SuperClass/Interfaces
...
...
@@ -77,18 +78,30 @@ public class BillPaymentActivity extends Activity implements View.OnClickListene
dialog
.
getWindow
().
setBackgroundDrawableResource
(
R
.
drawable
.
banner_border_white
);
dialog
.
show
();
mTvLuckyDraw
=
dialog
.
findViewById
(
R
.
id
.
tv_lucky_draw
);
TextView
mTvLuckyDraw
=
dialog
.
findViewById
(
R
.
id
.
tv_lucky_draw
);
LinearLayout
mClLuckyDraw
=
dialog
.
findViewById
(
R
.
id
.
constraintLayout
);
SpannableStringBuilder
builder
=
new
SpannableStringBuilder
();
String
s1
=
"My Lucky Day Draw"
;
String
s2
=
" 10 συμμετοχές αντί για 1"
;
SpannableString
ss1
=
new
SpannableString
(
s1
);
String
s1
=
"My Lucky Day Draw"
;
String
s2
=
" 10 συμμετοχές αντί για 1"
;
SpannableString
ss1
=
new
SpannableString
(
s1
);
ss1
.
setSpan
(
new
StyleSpan
(
Typeface
.
BOLD
),
0
,
s1
.
length
(),
Spannable
.
SPAN_EXCLUSIVE_EXCLUSIVE
);
// set size
ss1
.
setSpan
(
"#3A5266"
,
0
,
s1
.
length
(),
Spannable
.
SPAN_EXCLUSIVE_EXCLUSIVE
);
// set color
builder
.
append
(
ss1
);
builder
.
append
(
s2
);
mTvLuckyDraw
.
setText
(
builder
,
TextView
.
BufferType
.
SPANNABLE
);
mClLuckyDraw
.
setOnClickListener
(
view
->
{
if
(
BaseFragment
.
getUniqueCampaignList
()
!=
null
&&
!
BaseFragment
.
getUniqueCampaignList
().
isEmpty
())
{
if
(
BaseFragment
.
getUniqueCampaignList
().
containsKey
(
"lucky_draw"
)
&&
BaseFragment
.
getUniqueCampaignList
().
get
(
"lucky_draw"
).
size
()
>
0
)
{
startActivity
(
WarpViewActivity
.
createIntentFromSessionUUID
(
this
,
BaseFragment
.
getUniqueCampaignList
().
get
(
"lucky_draw"
).
get
(
0
).
getSessionUUID
()));
dialog
.
dismiss
();
}
}
});
}
// ===========================================================
// Inner and Anonymous Classes
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/fragments/BaseFragment.java
View file @
99ede59
...
...
@@ -4,7 +4,6 @@ import android.os.Bundle;
import
androidx.fragment.app.Fragment
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
ly.warp.sdk.Warply
;
...
...
@@ -47,6 +46,10 @@ public class BaseFragment extends Fragment {
return
mConsumer
;
}
public
static
HashMap
<
String
,
CampaignList
>
getUniqueCampaignList
()
{
return
mUniqueCampaignList
;
}
private
final
CallbackReceiver
<
Consumer
>
mConsumerReceiver
=
new
CallbackReceiver
<
Consumer
>()
{
@Override
public
void
onSuccess
(
Consumer
result
)
{
...
...
warply_android_sdk/src/main/res/layout/payment_success_dialog.xml
View file @
99ede59
...
...
@@ -76,9 +76,9 @@
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"16dp"
android:gravity=
"center"
android:text=
"Μy Lucky Day Draw"
android:textSize=
"17dp"
android:gravity=
"center"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
...
...
Please
register
or
login
to post a comment