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
2026-03-23 18:24:11 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
b0184a1c81d38c93746e9ff7d08b310b8e44934b
b0184a1c
1 parent
393d1bea
small fixes
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
27 deletions
warply_android_sdk/src/main/java/ly/warp/sdk/activities/HomeActivity.java
warply_android_sdk/src/main/res/values/styles.xml
warply_android_sdk/src/main/java/ly/warp/sdk/activities/HomeActivity.java
View file @
b0184a1
...
...
@@ -2,6 +2,7 @@ package ly.warp.sdk.activities;
import
android.app.Activity
;
import
android.app.AlertDialog
;
import
android.app.Dialog
;
import
android.content.Intent
;
import
android.os.Bundle
;
import
android.os.Handler
;
...
...
@@ -615,17 +616,23 @@ public class HomeActivity extends Activity implements View.OnClickListener, Coup
private
void
showQuestionnaireDialog
(
User
.
Questionnaire
questionnaire
)
{
if
(
questionnaire
.
getQuestions
()
==
null
||
questionnaire
.
getQuestions
().
isEmpty
())
return
;
BottomSheetDialog
bottomSheetDialog
=
new
BottomSheetDialog
(
this
,
R
.
style
.
FullScreenBottomSheetDialog
);
Dialog
questionnaireDialog
=
new
Dialog
(
this
,
R
.
style
.
FullScreenDialogStyle
);
View
dialogView
=
LayoutInflater
.
from
(
this
).
inflate
(
R
.
layout
.
dialog_fullscreen_questionnaire
,
null
);
bottomSheetDialog
.
setContentView
(
dialogView
);
questionnaireDialog
.
setContentView
(
dialogView
);
if
(
questionnaireDialog
.
getWindow
()
!=
null
)
{
questionnaireDialog
.
getWindow
().
setLayout
(
ViewGroup
.
LayoutParams
.
MATCH_PARENT
,
ViewGroup
.
LayoutParams
.
MATCH_PARENT
);
}
ImageView
ivClose
=
dialogView
.
findViewById
(
R
.
id
.
iv_back
);
ivClose
.
setOnClickListener
(
v
->
{
if
(
mCurrentQuestionIndex
>
0
)
{
mCurrentQuestionIndex
--;
renderQuestion
(
questionnaire
,
dialogView
,
bottomSheet
Dialog
);
renderQuestion
(
questionnaire
,
dialogView
,
questionnaire
Dialog
);
}
else
{
bottomSheet
Dialog
.
dismiss
();
questionnaire
Dialog
.
dismiss
();
}
});
...
...
@@ -642,31 +649,11 @@ public class HomeActivity extends Activity implements View.OnClickListener, Coup
mQuestionnaireAnswers
=
new
ArrayList
<>();
}
renderQuestion
(
questionnaire
,
dialogView
,
bottomSheetDialog
);
bottomSheetDialog
.
setOnShowListener
(
dialog
->
{
View
bottomSheet
=
bottomSheetDialog
.
findViewById
(
com
.
google
.
android
.
material
.
R
.
id
.
design_bottom_sheet
);
if
(
bottomSheet
!=
null
)
{
bottomSheet
.
post
(()
->
{
// Disable fitsSystemWindows so the BottomSheet doesn't add nav bar padding automatically
bottomSheet
.
setFitsSystemWindows
(
false
);
int
screenHeight
=
getResources
().
getDisplayMetrics
().
heightPixels
;
ViewGroup
.
LayoutParams
lp
=
bottomSheet
.
getLayoutParams
();
lp
.
height
=
screenHeight
;
bottomSheet
.
setLayoutParams
(
lp
);
BottomSheetBehavior
<
View
>
behavior
=
BottomSheetBehavior
.
from
(
bottomSheet
);
behavior
.
setSkipCollapsed
(
true
);
behavior
.
setPeekHeight
(
screenHeight
);
behavior
.
setState
(
BottomSheetBehavior
.
STATE_EXPANDED
);
behavior
.
setDraggable
(
false
);
});
}
});
bottomSheetDialog
.
show
();
renderQuestion
(
questionnaire
,
dialogView
,
questionnaireDialog
);
questionnaireDialog
.
show
();
}
private
void
renderQuestion
(
User
.
Questionnaire
questionnaire
,
View
dialogView
,
BottomSheet
Dialog
dialog
)
{
private
void
renderQuestion
(
User
.
Questionnaire
questionnaire
,
View
dialogView
,
Dialog
dialog
)
{
if
(
mCurrentQuestionIndex
>=
questionnaire
.
getQuestions
().
size
())
{
return
;
}
...
...
warply_android_sdk/src/main/res/values/styles.xml
View file @
b0184a1
...
...
@@ -63,4 +63,13 @@
<style
name=
"NoCornerShapeAppearance"
parent=
""
>
<item
name=
"cornerSize"
>
0dp
</item>
</style>
<style
name=
"FullScreenDialogStyle"
parent=
"Theme.MaterialComponents.Light"
>
<item
name=
"android:windowNoTitle"
>
true
</item>
<item
name=
"android:windowFullscreen"
>
false
</item>
<item
name=
"android:windowIsFloating"
>
false
</item>
<item
name=
"android:windowBackground"
>
@color/white
</item>
<item
name=
"android:statusBarColor"
>
@android:color/transparent
</item>
<item
name=
"android:windowLightStatusBar"
>
true
</item>
</style>
</resources>
...
...
Please
register
or
login
to post a comment