Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
abook_check
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abook_android
abook_check
Commits
7eb4d96d
Commit
7eb4d96d
authored
May 23, 2023
by
Kazuyuki Hida
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
動作するようになったので、いったんコミット
parent
89703410
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
67 additions
and
6 deletions
+67
-6
ABVJE_UI_Android/res/layout/dlg_agreement_to_terms.xml
+23
-1
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVNoAuthenticatedActivity.java
+44
-5
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/helper/AgreementToTermsHelper.java
+0
-0
No files found.
ABVJE_UI_Android/res/layout/dlg_agreement_to_terms.xml
View file @
7eb4d96d
...
@@ -41,5 +41,26 @@
...
@@ -41,5 +41,26 @@
/>
/>
</LinearLayout>
</LinearLayout>
</ScrollView>
</ScrollView>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"horizontal"
android:background=
"#ff999999"
android:padding=
"8dp"
>
<Button
android:id=
"@+id/agreeButton"
style=
"@style/ButtonABookDark"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:text=
"@string/agree"
/>
<Button
android:id=
"@+id/disagreeButton"
style=
"@style/ButtonABookDark"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:text=
"@string/disagree"
/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVNoAuthenticatedActivity.java
View file @
7eb4d96d
...
@@ -91,7 +91,7 @@ public abstract class ABVNoAuthenticatedActivity extends ABVActivity {
...
@@ -91,7 +91,7 @@ public abstract class ABVNoAuthenticatedActivity extends ABVActivity {
* @param loginId
* @param loginId
*/
*/
protected
void
showMainActivity
(
String
loginId
)
{
protected
void
showMainActivity
(
String
loginId
)
{
AgreementToTerms
Activity
.
Pre
AgreementListener
listener
=
new
AgreementToTermsHelper
.
AgreementListener
()
{
AgreementToTerms
Helper
.
AgreementListener
listener
=
new
AgreementToTermsHelper
.
AgreementListener
()
{
@Override
@Override
public
void
onDisabled
()
{
public
void
onDisabled
()
{
onAgreed
();
onAgreed
();
...
@@ -109,9 +109,29 @@ public abstract class ABVNoAuthenticatedActivity extends ABVActivity {
...
@@ -109,9 +109,29 @@ public abstract class ABVNoAuthenticatedActivity extends ABVActivity {
}
}
@Override
@Override
public
void
onConfirmed
(
boolean
isAgreed
)
{
if
(
isAgreed
)
{
// 同意したら初期化
doShowMainActivity
();
}
else
{
// 規約に同意しなかったので、ログアウト
LogoutHelper
.
logout
(
ABVNoAuthenticatedActivity
.
this
);
}
}
@Override
public
void
onError
(
Exception
e
)
{
logoutAlert
(
R
.
string
.
C_E_SYSTEM_0001
);
}
@Override
public
void
onFailed
(
Exception
e
)
{
public
void
onFailed
(
Exception
e
)
{
// 読み込みに失敗したらログアウト
// 読み込みに失敗したらログアウト
AlertDialogUtil
.
showAlertDialog
(
ABVNoAuthenticatedActivity
.
this
,
R
.
string
.
app_name
,
R
.
string
.
failed_to_get_terms_of_service
,
true
,
new
DialogInterface
.
OnClickListener
()
{
logoutAlert
(
R
.
string
.
failed_to_get_terms_of_service
);
}
private
void
logoutAlert
(
int
messageRes
)
{
AlertDialogUtil
.
showAlertDialog
(
ABVNoAuthenticatedActivity
.
this
,
R
.
string
.
app_name
,
messageRes
,
true
,
new
DialogInterface
.
OnClickListener
()
{
@Override
@Override
public
void
onClick
(
DialogInterface
dialog
,
int
which
)
{
public
void
onClick
(
DialogInterface
dialog
,
int
which
)
{
LogoutHelper
.
logout
(
ABVNoAuthenticatedActivity
.
this
);
LogoutHelper
.
logout
(
ABVNoAuthenticatedActivity
.
this
);
...
@@ -119,7 +139,7 @@ public abstract class ABVNoAuthenticatedActivity extends ABVActivity {
...
@@ -119,7 +139,7 @@ public abstract class ABVNoAuthenticatedActivity extends ABVActivity {
});
});
}
}
};
};
AgreementToTerms
Activity
.
confirmAgreement
(
this
,
REQUEST_AGREEMENT_FROM_LOGIN
,
isNormalSize
(),
listener
);
AgreementToTerms
Helper
.
confirmAgreement
(
this
,
isNormalSize
(),
listener
);
}
}
protected
void
doShowMainActivity
()
{
protected
void
doShowMainActivity
()
{
...
@@ -414,7 +434,7 @@ public abstract class ABVNoAuthenticatedActivity extends ABVActivity {
...
@@ -414,7 +434,7 @@ public abstract class ABVNoAuthenticatedActivity extends ABVActivity {
return
;
return
;
}
}
// 必要に応じて、規約同意画面を表示
// 必要に応じて、規約同意画面を表示
AgreementToTerms
Activity
.
PreAgreementListener
listener
=
new
AgreementToTermsActivity
.
Pre
AgreementListener
()
{
AgreementToTerms
Helper
.
AgreementListener
listener
=
new
AgreementToTermsHelper
.
AgreementListener
()
{
@Override
@Override
public
void
onDisabled
()
{
public
void
onDisabled
()
{
onAgreed
();
onAgreed
();
...
@@ -432,13 +452,32 @@ public abstract class ABVNoAuthenticatedActivity extends ABVActivity {
...
@@ -432,13 +452,32 @@ public abstract class ABVNoAuthenticatedActivity extends ABVActivity {
}
}
@Override
@Override
public
void
onConfirmed
(
boolean
isAgreed
)
{
if
(
isAgreed
)
{
// 同意したら初期化
doMoveToHome
();
}
else
{
// 規約に同意しなかったので、ログアウト
LogoutHelper
.
logout
(
ABVNoAuthenticatedActivity
.
this
);
}
}
@Override
public
void
onError
(
Exception
e
)
{
// 失敗しても、次に進む
Logger
.
e
(
TAG
,
e
);
doMoveToHome
();
}
@Override
public
void
onFailed
(
Exception
e
)
{
public
void
onFailed
(
Exception
e
)
{
// 読み込みに失敗しても、次に進む
// 読み込みに失敗しても、次に進む
Logger
.
e
(
TAG
,
e
);
Logger
.
e
(
TAG
,
e
);
doMoveToHome
();
doMoveToHome
();
}
}
};
};
AgreementToTermsActivity
.
confirmAgreement
(
this
,
REQUEST_AGREEMENT
,
isNormalSize
(),
listener
);
AgreementToTermsHelper
.
clearVersion
(
this
);
AgreementToTermsHelper
.
confirmAgreement
(
this
,
isNormalSize
(),
listener
);
}
}
@Override
@Override
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/helper/AgreementToTermsHelper.java
View file @
7eb4d96d
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment