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
bce458e5
Commit
bce458e5
authored
May 26, 2022
by
onuma
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'features/1.4.210_46993' into 'features/1.4.210'
利用規約のUIを元に戻した。処理をコメント化した。 See merge request
!256
parents
b7c6370d
87af942c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
90 additions
and
125 deletions
+90
-125
ABVJE_UI_Android/res/layout/ac_login.xml
+3
-38
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/LoginActivity.java
+87
-87
No files found.
ABVJE_UI_Android/res/layout/ac_login.xml
View file @
bce458e5
...
...
@@ -19,9 +19,6 @@
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
android:layout_margin=
"40dp"
android:layout_marginStart=
"40dp"
android:layout_marginLeft=
"40dp"
android:layout_marginBottom=
"20dp"
android:background=
"@drawable/logo_login"
android:contentDescription=
"@string/login"
...
...
@@ -72,48 +69,16 @@
android:hint=
"@string/title_password"
android:inputType=
"textPassword"
android:maxLines=
"1"
/>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:orientation=
"horizontal"
>
<CheckBox
android:id=
"@+id/check_box_agree"
android:layout_width=
"match_parent"
android:layout_height=
"46dp"
android:layout_gravity=
"center"
/>
<TextView
android:id=
"@+id/terms_of_use_text"
android:layout_width=
"match_parent"
android:layout_height=
"46dp"
android:layout_gravity=
"left"
android:gravity=
"center"
android:text=
"@string/msg_agree_to_terms_of_use"
android:textColor=
"@color/text_color"
/>
<Button
android:id=
"@+id/detail"
style=
"@style/Widget.AppCompat.Button.Borderless"
android:layout_width=
"match_parent"
android:layout_height=
"46dp"
android:freezesText=
"false"
android:text=
"@string/clickable_detail_button"
android:textAllCaps=
"false"
android:textColor=
"@color/text_color"
/>
</LinearLayout>
<Button
android:id=
"@+id/btn_login"
android:layout_width=
"
match_parent
"
android:layout_width=
"
200dp
"
android:layout_height=
"46dp"
android:layout_gravity=
"center"
android:layout_marginTop=
"10dp"
android:background=
"@drawable/btn_login
_off
"
android:background=
"@drawable/btn_login"
android:contentDescription=
"@string/login"
android:text=
"@string/login"
android:textColor=
"@color/text_color"
android:visibility=
"visible"
/>
android:textColor=
"@color/text_color"
/>
</LinearLayout>
</LinearLayout>
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/LoginActivity.java
View file @
bce458e5
...
...
@@ -97,8 +97,8 @@ public class LoginActivity extends ABVLoginActivity {
private
InputMethodManager
imm
;
private
CheckBox
chexBoxAgree
;
private
static
String
termsOfUseUrl
=
ABVEnvironment
.
getInstance
().
agreeToTermsOfUseUrl
;
//
private CheckBox chexBoxAgree;
//
private static String termsOfUseUrl = ABVEnvironment.getInstance().agreeToTermsOfUseUrl;
@Override
public
void
onCreate
(
Bundle
savedInstanceState
)
{
...
...
@@ -164,25 +164,25 @@ public class LoginActivity extends ABVLoginActivity {
}
});
// チェックボックス
chexBoxAgree
=
findViewById
(
R
.
id
.
check_box_agree
);
// 初期化(状態は保存しておく。ログアウトした後に使う)
boolean
agree
=
PreferenceUtil
.
get
(
LoginActivity
.
this
,
AppDefType
.
PrefName
.
AGREE_STATUS
,
false
);
chexBoxAgree
.
setChecked
(
agree
);
chexBoxAgree
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
view
)
{
PreferenceUtil
.
put
(
LoginActivity
.
this
,
AppDefType
.
PrefName
.
AGREE_STATUS
,
chexBoxAgree
.
isChecked
());
}
});
// agreementUrl が 空の場合は、チェックボックスなどを消す
if
(
StringUtil
.
isNullOrEmpty
(
termsOfUseUrl
))
{
chexBoxAgree
.
setVisibility
(
View
.
GONE
);
findViewById
(
R
.
id
.
terms_of_use_text
).
setVisibility
(
View
.
GONE
);
findViewById
(
R
.
id
.
detail
).
setVisibility
(
View
.
GONE
);
}
//
// チェックボックス
//
chexBoxAgree = findViewById(R.id.check_box_agree);
//
// 初期化(状態は保存しておく。ログアウトした後に使う)
//
boolean agree = PreferenceUtil.get(LoginActivity.this, AppDefType.PrefName.AGREE_STATUS, false);
//
chexBoxAgree.setChecked(agree);
//
//
chexBoxAgree.setOnClickListener(new View.OnClickListener() {
//
@Override
//
public void onClick(View view) {
//
PreferenceUtil.put(LoginActivity.this, AppDefType.PrefName.AGREE_STATUS, chexBoxAgree.isChecked());
//
}
//
});
//
//
// agreementUrl が 空の場合は、チェックボックスなどを消す
//
if (StringUtil.isNullOrEmpty(termsOfUseUrl)) {
//
chexBoxAgree.setVisibility(View.GONE);
//
findViewById(R.id.terms_of_use_text).setVisibility(View.GONE);
//
findViewById(R.id.detail).setVisibility(View.GONE);
//
}
//androidバジョン6以上からMAC idではなくandroid固有numberを取得ため、ダイアログで表示
if
(
android
.
os
.
Build
.
VERSION
.
SDK_INT
>=
23
)
{
...
...
@@ -223,50 +223,50 @@ public class LoginActivity extends ABVLoginActivity {
}
}
// 詳細ボタン
final
Button
btnDetail
=
findViewById
(
R
.
id
.
detail
);
btnDetail
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
view
)
{
btnDetail
.
setEnabled
(
false
);
// 非活性化(連打防止)
// ネットワーク接続チェック
if
(!
ABVEnvironment
.
getInstance
().
networkAdapter
.
isNetworkConnected
())
{
AlertDialogUtil
.
showAlertDialog
(
LoginActivity
.
this
,
getString
(
R
.
string
.
error
),
getString
(
R
.
string
.
msg_network_offline
),
true
,
new
DialogInterface
.
OnClickListener
()
{
@Override
public
void
onClick
(
DialogInterface
dialog
,
int
which
)
{
dialog
.
dismiss
();
btnDetail
.
setEnabled
(
true
);
// 活性化
}
});
return
;
}
CommonExecutor
.
execute
(
new
Runnable
()
{
@Override
public
void
run
()
{
// CMSより文言を取得し、ダイアログで表示する。
final
String
termsOfUseText
=
contractLogic
.
getTermsOfServiceText
(
termsOfUseUrl
);
runOnUiThread
(
new
Runnable
()
{
@Override
public
void
run
()
{
String
title
=
getString
(
R
.
string
.
error
);
String
messageText
=
getString
(
R
.
string
.
err_gert_term_of_use_text
);
if
(
termsOfUseText
!=
null
)
{
title
=
getString
(
R
.
string
.
app_name
);
messageText
=
termsOfUseText
;
}
AlertDialogUtil
.
showAlertDialog
(
LoginActivity
.
this
,
title
,
messageText
,
true
,
new
DialogInterface
.
OnClickListener
()
{
@Override
public
void
onClick
(
DialogInterface
dialog
,
int
which
)
{
dialog
.
dismiss
();
btnDetail
.
setEnabled
(
true
);
// 活性化
}
});
}
});
}
});
}
});
//
// 詳細ボタン
//
final Button btnDetail = findViewById(R.id.detail);
//
btnDetail.setOnClickListener(new View.OnClickListener() {
//
@Override
//
public void onClick(View view) {
//
btnDetail.setEnabled(false); // 非活性化(連打防止)
//
// ネットワーク接続チェック
//
if (!ABVEnvironment.getInstance().networkAdapter.isNetworkConnected()) {
//
AlertDialogUtil.showAlertDialog(LoginActivity.this, getString(R.string.error), getString(R.string.msg_network_offline), true, new DialogInterface.OnClickListener() {
//
@Override
//
public void onClick(DialogInterface dialog, int which) {
//
dialog.dismiss();
//
btnDetail.setEnabled(true); // 活性化
//
}
//
});
//
return;
//
}
//
CommonExecutor.execute(new Runnable() {
//
@Override
//
public void run() {
//
// CMSより文言を取得し、ダイアログで表示する。
//
final String termsOfUseText = contractLogic.getTermsOfServiceText(termsOfUseUrl);
//
runOnUiThread(new Runnable() {
//
@Override
//
public void run() {
//
String title = getString(R.string.error);
//
String messageText = getString(R.string.err_gert_term_of_use_text);
//
if (termsOfUseText != null) {
//
title = getString(R.string.app_name);
//
messageText = termsOfUseText;
//
}
//
AlertDialogUtil.showAlertDialog(LoginActivity.this, title, messageText, true, new DialogInterface.OnClickListener() {
//
@Override
//
public void onClick(DialogInterface dialog, int which) {
//
dialog.dismiss();
//
btnDetail.setEnabled(true); // 活性化
//
}
//
});
//
}
//
});
//
}
//
});
//
}
//
});
}
@Override
...
...
@@ -436,24 +436,24 @@ public class LoginActivity extends ABVLoginActivity {
return
false
;
}
}
if
(
StringUtil
.
isNullOrWhiteSpace
(
mLoginId
))
{
handleErrorMessageToast
(
ErrorCode
.
E001
);
mEdtLoginId
.
requestFocus
();
return
false
;
}
if
(
StringUtil
.
isNullOrWhiteSpace
(
mPassword
))
{
handleErrorMessageToast
(
ErrorCode
.
E002
);
mEdtPassword
.
requestFocus
();
return
false
;
}
if
(!
StringUtil
.
isNullOrEmpty
(
termsOfUseUrl
))
{
if
(!
chexBoxAgree
.
isChecked
())
{
handleErrorMessageToast
(
ErrorCode
.
E132
);
return
false
;
}
}
//
if (StringUtil.isNullOrWhiteSpace(mLoginId)) {
//
handleErrorMessageToast(ErrorCode.E001);
//
mEdtLoginId.requestFocus();
//
return false;
//
}
//
//
if (StringUtil.isNullOrWhiteSpace(mPassword)) {
//
handleErrorMessageToast(ErrorCode.E002);
//
mEdtPassword.requestFocus();
//
return false;
//
}
//
//
if (!StringUtil.isNullOrEmpty(termsOfUseUrl)) {
//
if (!chexBoxAgree.isChecked()) {
//
handleErrorMessageToast(ErrorCode.E132);
//
return false;
//
}
//
}
return
true
;
}
...
...
@@ -758,10 +758,10 @@ public class LoginActivity extends ABVLoginActivity {
PreferenceUtil
.
clearUserPref
(
this
);
memberInfoDao
.
deleteMemberInfo
();
// ユーザ変更でプリファレンスは初期化するが、
// 一度ログインで利用規約には同意しているので、以下の値はtrueに設定しなおす
PreferenceUtil
.
put
(
LoginActivity
.
this
,
AppDefType
.
PrefName
.
AGREE_STATUS
,
true
);
//
// ユーザ変更でプリファレンスは初期化するが、
//
// 一度ログインで利用規約には同意しているので、以下の値はtrueに設定しなおす
//
PreferenceUtil.put(LoginActivity.this, AppDefType.PrefName.AGREE_STATUS, true);
//
contentLogic
.
deleteContentMarkingData
();
boolean
isAllDelete
=
true
;
if
(
getRInteger
(
R
.
integer
.
not_delete_all_contents
)
==
1
)
{
...
...
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