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
Show 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 @@
...
@@ -19,9 +19,6 @@
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
android:layout_gravity=
"center_horizontal"
android:layout_margin=
"40dp"
android:layout_marginStart=
"40dp"
android:layout_marginLeft=
"40dp"
android:layout_marginBottom=
"20dp"
android:layout_marginBottom=
"20dp"
android:background=
"@drawable/logo_login"
android:background=
"@drawable/logo_login"
android:contentDescription=
"@string/login"
android:contentDescription=
"@string/login"
...
@@ -72,48 +69,16 @@
...
@@ -72,48 +69,16 @@
android:hint=
"@string/title_password"
android:hint=
"@string/title_password"
android:inputType=
"textPassword"
android:inputType=
"textPassword"
android:maxLines=
"1"
/>
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
<Button
android:id=
"@+id/btn_login"
android:id=
"@+id/btn_login"
android:layout_width=
"
match_parent
"
android:layout_width=
"
200dp
"
android:layout_height=
"46dp"
android:layout_height=
"46dp"
android:layout_gravity=
"center"
android:layout_marginTop=
"10dp"
android:layout_marginTop=
"10dp"
android:background=
"@drawable/btn_login
_off
"
android:background=
"@drawable/btn_login"
android:contentDescription=
"@string/login"
android:contentDescription=
"@string/login"
android:text=
"@string/login"
android:text=
"@string/login"
android:textColor=
"@color/text_color"
android:textColor=
"@color/text_color"
/>
android:visibility=
"visible"
/>
</LinearLayout>
</LinearLayout>
</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 {
...
@@ -97,8 +97,8 @@ public class LoginActivity extends ABVLoginActivity {
private
InputMethodManager
imm
;
private
InputMethodManager
imm
;
private
CheckBox
chexBoxAgree
;
//
private CheckBox chexBoxAgree;
private
static
String
termsOfUseUrl
=
ABVEnvironment
.
getInstance
().
agreeToTermsOfUseUrl
;
//
private static String termsOfUseUrl = ABVEnvironment.getInstance().agreeToTermsOfUseUrl;
@Override
@Override
public
void
onCreate
(
Bundle
savedInstanceState
)
{
public
void
onCreate
(
Bundle
savedInstanceState
)
{
...
@@ -164,25 +164,25 @@ public class LoginActivity extends ABVLoginActivity {
...
@@ -164,25 +164,25 @@ public class LoginActivity extends ABVLoginActivity {
}
}
});
});
// チェックボックス
//
// チェックボックス
chexBoxAgree
=
findViewById
(
R
.
id
.
check_box_agree
);
//
chexBoxAgree = findViewById(R.id.check_box_agree);
// 初期化(状態は保存しておく。ログアウトした後に使う)
//
// 初期化(状態は保存しておく。ログアウトした後に使う)
boolean
agree
=
PreferenceUtil
.
get
(
LoginActivity
.
this
,
AppDefType
.
PrefName
.
AGREE_STATUS
,
false
);
//
boolean agree = PreferenceUtil.get(LoginActivity.this, AppDefType.PrefName.AGREE_STATUS, false);
chexBoxAgree
.
setChecked
(
agree
);
//
chexBoxAgree.setChecked(agree);
//
chexBoxAgree
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
//
chexBoxAgree.setOnClickListener(new View.OnClickListener() {
@Override
//
@Override
public
void
onClick
(
View
view
)
{
//
public void onClick(View view) {
PreferenceUtil
.
put
(
LoginActivity
.
this
,
AppDefType
.
PrefName
.
AGREE_STATUS
,
chexBoxAgree
.
isChecked
());
//
PreferenceUtil.put(LoginActivity.this, AppDefType.PrefName.AGREE_STATUS, chexBoxAgree.isChecked());
}
//
}
});
//
});
//
// agreementUrl が 空の場合は、チェックボックスなどを消す
//
// agreementUrl が 空の場合は、チェックボックスなどを消す
if
(
StringUtil
.
isNullOrEmpty
(
termsOfUseUrl
))
{
//
if (StringUtil.isNullOrEmpty(termsOfUseUrl)) {
chexBoxAgree
.
setVisibility
(
View
.
GONE
);
//
chexBoxAgree.setVisibility(View.GONE);
findViewById
(
R
.
id
.
terms_of_use_text
).
setVisibility
(
View
.
GONE
);
//
findViewById(R.id.terms_of_use_text).setVisibility(View.GONE);
findViewById
(
R
.
id
.
detail
).
setVisibility
(
View
.
GONE
);
//
findViewById(R.id.detail).setVisibility(View.GONE);
}
//
}
//androidバジョン6以上からMAC idではなくandroid固有numberを取得ため、ダイアログで表示
//androidバジョン6以上からMAC idではなくandroid固有numberを取得ため、ダイアログで表示
if
(
android
.
os
.
Build
.
VERSION
.
SDK_INT
>=
23
)
{
if
(
android
.
os
.
Build
.
VERSION
.
SDK_INT
>=
23
)
{
...
@@ -223,50 +223,50 @@ public class LoginActivity extends ABVLoginActivity {
...
@@ -223,50 +223,50 @@ public class LoginActivity extends ABVLoginActivity {
}
}
}
}
// 詳細ボタン
//
// 詳細ボタン
final
Button
btnDetail
=
findViewById
(
R
.
id
.
detail
);
//
final Button btnDetail = findViewById(R.id.detail);
btnDetail
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
//
btnDetail.setOnClickListener(new View.OnClickListener() {
@Override
//
@Override
public
void
onClick
(
View
view
)
{
//
public void onClick(View view) {
btnDetail
.
setEnabled
(
false
);
// 非活性化(連打防止)
//
btnDetail.setEnabled(false); // 非活性化(連打防止)
// ネットワーク接続チェック
//
// ネットワーク接続チェック
if
(!
ABVEnvironment
.
getInstance
().
networkAdapter
.
isNetworkConnected
())
{
//
if (!ABVEnvironment.getInstance().networkAdapter.isNetworkConnected()) {
AlertDialogUtil
.
showAlertDialog
(
LoginActivity
.
this
,
getString
(
R
.
string
.
error
),
getString
(
R
.
string
.
msg_network_offline
),
true
,
new
DialogInterface
.
OnClickListener
()
{
//
AlertDialogUtil.showAlertDialog(LoginActivity.this, getString(R.string.error), getString(R.string.msg_network_offline), true, new DialogInterface.OnClickListener() {
@Override
//
@Override
public
void
onClick
(
DialogInterface
dialog
,
int
which
)
{
//
public void onClick(DialogInterface dialog, int which) {
dialog
.
dismiss
();
//
dialog.dismiss();
btnDetail
.
setEnabled
(
true
);
// 活性化
//
btnDetail.setEnabled(true); // 活性化
}
//
}
});
//
});
return
;
//
return;
}
//
}
CommonExecutor
.
execute
(
new
Runnable
()
{
//
CommonExecutor.execute(new Runnable() {
@Override
//
@Override
public
void
run
()
{
//
public void run() {
// CMSより文言を取得し、ダイアログで表示する。
//
// CMSより文言を取得し、ダイアログで表示する。
final
String
termsOfUseText
=
contractLogic
.
getTermsOfServiceText
(
termsOfUseUrl
);
//
final String termsOfUseText = contractLogic.getTermsOfServiceText(termsOfUseUrl);
runOnUiThread
(
new
Runnable
()
{
//
runOnUiThread(new Runnable() {
@Override
//
@Override
public
void
run
()
{
//
public void run() {
String
title
=
getString
(
R
.
string
.
error
);
//
String title = getString(R.string.error);
String
messageText
=
getString
(
R
.
string
.
err_gert_term_of_use_text
);
//
String messageText = getString(R.string.err_gert_term_of_use_text);
if
(
termsOfUseText
!=
null
)
{
//
if (termsOfUseText != null) {
title
=
getString
(
R
.
string
.
app_name
);
//
title = getString(R.string.app_name);
messageText
=
termsOfUseText
;
//
messageText = termsOfUseText;
}
//
}
AlertDialogUtil
.
showAlertDialog
(
LoginActivity
.
this
,
title
,
messageText
,
true
,
new
DialogInterface
.
OnClickListener
()
{
//
AlertDialogUtil.showAlertDialog(LoginActivity.this, title, messageText, true, new DialogInterface.OnClickListener() {
@Override
//
@Override
public
void
onClick
(
DialogInterface
dialog
,
int
which
)
{
//
public void onClick(DialogInterface dialog, int which) {
dialog
.
dismiss
();
//
dialog.dismiss();
btnDetail
.
setEnabled
(
true
);
// 活性化
//
btnDetail.setEnabled(true); // 活性化
}
//
}
});
//
});
}
//
}
});
//
});
}
//
}
});
//
});
}
//
}
});
//
});
}
}
@Override
@Override
...
@@ -436,24 +436,24 @@ public class LoginActivity extends ABVLoginActivity {
...
@@ -436,24 +436,24 @@ public class LoginActivity extends ABVLoginActivity {
return
false
;
return
false
;
}
}
}
}
if
(
StringUtil
.
isNullOrWhiteSpace
(
mLoginId
))
{
//
if (StringUtil.isNullOrWhiteSpace(mLoginId)) {
handleErrorMessageToast
(
ErrorCode
.
E001
);
//
handleErrorMessageToast(ErrorCode.E001);
mEdtLoginId
.
requestFocus
();
//
mEdtLoginId.requestFocus();
return
false
;
//
return false;
}
//
}
//
if
(
StringUtil
.
isNullOrWhiteSpace
(
mPassword
))
{
//
if (StringUtil.isNullOrWhiteSpace(mPassword)) {
handleErrorMessageToast
(
ErrorCode
.
E002
);
//
handleErrorMessageToast(ErrorCode.E002);
mEdtPassword
.
requestFocus
();
//
mEdtPassword.requestFocus();
return
false
;
//
return false;
}
//
}
//
if
(!
StringUtil
.
isNullOrEmpty
(
termsOfUseUrl
))
{
//
if (!StringUtil.isNullOrEmpty(termsOfUseUrl)) {
if
(!
chexBoxAgree
.
isChecked
())
{
//
if (!chexBoxAgree.isChecked()) {
handleErrorMessageToast
(
ErrorCode
.
E132
);
//
handleErrorMessageToast(ErrorCode.E132);
return
false
;
//
return false;
}
//
}
}
//
}
return
true
;
return
true
;
}
}
...
@@ -758,10 +758,10 @@ public class LoginActivity extends ABVLoginActivity {
...
@@ -758,10 +758,10 @@ public class LoginActivity extends ABVLoginActivity {
PreferenceUtil
.
clearUserPref
(
this
);
PreferenceUtil
.
clearUserPref
(
this
);
memberInfoDao
.
deleteMemberInfo
();
memberInfoDao
.
deleteMemberInfo
();
// ユーザ変更でプリファレンスは初期化するが、
//
// ユーザ変更でプリファレンスは初期化するが、
// 一度ログインで利用規約には同意しているので、以下の値はtrueに設定しなおす
//
// 一度ログインで利用規約には同意しているので、以下の値はtrueに設定しなおす
PreferenceUtil
.
put
(
LoginActivity
.
this
,
AppDefType
.
PrefName
.
AGREE_STATUS
,
true
);
//
PreferenceUtil.put(LoginActivity.this, AppDefType.PrefName.AGREE_STATUS, true);
//
contentLogic
.
deleteContentMarkingData
();
contentLogic
.
deleteContentMarkingData
();
boolean
isAllDelete
=
true
;
boolean
isAllDelete
=
true
;
if
(
getRInteger
(
R
.
integer
.
not_delete_all_contents
)
==
1
)
{
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