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-29 17:55:37 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
d38511028a1030ab712bbaf37a012c2a52aeed72
d3851102
1 parent
338e1392
conditional rendering in loyalty dropdowns v2
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
51 additions
and
7 deletions
warply_android_sdk/src/main/java/ly/warp/sdk/activities/LoyaltyActivity.java
warply_android_sdk/src/main/res/layout/cos_piechart.xml
warply_android_sdk/src/main/res/layout/cos_piechart_conditional_render.xml
warply_android_sdk/src/main/res/layout/loyalty_analysis_container.xml
warply_android_sdk/src/main/java/ly/warp/sdk/activities/LoyaltyActivity.java
View file @
d385110
...
...
@@ -78,15 +78,13 @@ public class LoyaltyActivity extends Activity implements View.OnClickListener,
@Override
public
void
onItemSelected
(
AdapterView
<?>
parent
,
View
view
,
int
pos
,
long
id
)
{
// parent.getItemAtPosition(pos)
ImageView
chartImg
=
findViewById
(
R
.
id
.
cl_chart
).
findViewById
(
R
.
id
.
iv_chart
);
ImageView
innerChartImg
=
findViewById
(
R
.
id
.
cl_chart
).
findViewById
(
R
.
id
.
iv_inner_chart
);
if
(
parent
.
getId
()
==
mCouponSpinner
.
getId
())
{
if
(
pos
==
1
)
{
mRedemptionSpinner
.
setVisibility
(
View
.
GONE
);
findViewById
(
R
.
id
.
cl_tab_analysis
).
setVisibility
(
View
.
GONE
);
findViewById
(
R
.
id
.
cl_chart
).
setVisibility
(
View
.
GONE
);
// findViewById(R.id.cl
_chart2).setVisibility(View.VISIBLE);
findViewById
(
R
.
id
.
cl_chart
).
findViewById
(
R
.
id
.
cl_inner_chart
).
setVisibility
(
View
.
GONE
);
findViewById
(
R
.
id
.
cl_chart
).
findViewById
(
R
.
id
.
cl_inner
_chart2
).
setVisibility
(
View
.
VISIBLE
);
findViewById
(
R
.
id
.
cl_chart_info
).
findViewById
(
R
.
id
.
analysis_tab
).
setVisibility
(
View
.
GONE
);
findViewById
(
R
.
id
.
cl_chart_info
).
findViewById
(
R
.
id
.
analysis_tab2
).
setVisibility
(
View
.
GONE
);
findViewById
(
R
.
id
.
cl_chart_info
).
findViewById
(
R
.
id
.
analysis_tab3
).
setVisibility
(
View
.
GONE
);
...
...
@@ -94,8 +92,8 @@ public class LoyaltyActivity extends Activity implements View.OnClickListener,
findViewById
(
R
.
id
.
cl_chart_info
).
findViewById
(
R
.
id
.
analysis_tab5
).
setVisibility
(
View
.
VISIBLE
);
}
else
{
mRedemptionSpinner
.
setVisibility
(
View
.
VISIBLE
);
findViewById
(
R
.
id
.
cl_chart
).
setVisibility
(
View
.
VISIBLE
);
// findViewById(R.id.cl
_chart2).setVisibility(View.GONE);
findViewById
(
R
.
id
.
cl_chart
).
findViewById
(
R
.
id
.
cl_inner_chart
).
setVisibility
(
View
.
VISIBLE
);
findViewById
(
R
.
id
.
cl_chart
).
findViewById
(
R
.
id
.
cl_inner
_chart2
).
setVisibility
(
View
.
GONE
);
findViewById
(
R
.
id
.
cl_tab_analysis
).
setVisibility
(
View
.
VISIBLE
);
findViewById
(
R
.
id
.
cl_chart_info
).
findViewById
(
R
.
id
.
analysis_tab
).
setVisibility
(
View
.
VISIBLE
);
findViewById
(
R
.
id
.
cl_chart_info
).
findViewById
(
R
.
id
.
analysis_tab2
).
setVisibility
(
View
.
VISIBLE
);
...
...
warply_android_sdk/src/main/res/layout/cos_piechart.xml
View file @
d385110
...
...
@@ -18,6 +18,14 @@
android:orientation=
"vertical"
app:layout_constraintGuide_percent=
"0.85"
/>
<include
android:id=
"@+id/piechart"
layout=
"@layout/cos_piechart2"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"@+id/iv_chart"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
<ImageView
android:id=
"@+id/iv_chart"
android:layout_width=
"0dp"
...
...
warply_android_sdk/src/main/res/layout/cos_piechart_conditional_render.xml
0 → 100644
View file @
d385110
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:layout_width=
"200dp"
android:layout_height=
"200dp"
>
<androidx.constraintlayout.widget.Guideline
android:id=
"@+id/gl_vertical_15_guideline"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
app:layout_constraintGuide_percent=
"0.15"
/>
<androidx.constraintlayout.widget.Guideline
android:id=
"@+id/gl_vertical_85_guideline"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
app:layout_constraintGuide_percent=
"0.85"
/>
<include
android:id=
"@+id/cl_inner_chart"
layout=
"@layout/cos_piechart"
android:layout_width=
"200dp"
android:layout_height=
"200dp"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
<include
android:id=
"@+id/cl_inner_chart2"
layout=
"@layout/cos_piechart2"
android:layout_width=
"200dp"
android:layout_height=
"200dp"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
warply_android_sdk/src/main/res/layout/loyalty_analysis_container.xml
View file @
d385110
...
...
@@ -63,7 +63,7 @@
<include
android:id=
"@+id/cl_chart"
layout=
"@layout/cos_piechart"
layout=
"@layout/cos_piechart
_conditional_render
"
android:layout_width=
"200dp"
android:layout_height=
"200dp"
app:layout_constraintEnd_toEndOf=
"parent"
...
...
Please
register
or
login
to post a comment