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
3efe1193
Commit
3efe1193
authored
Jul 03, 2024
by
Kim Jinsung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug #59911【@Form 2024年度上期開発 android 1.3.8】「ダッシュボード」(または「関連資料」)を表示した状態で、「プッシュメッセージ一覧」を表示できない
parent
fd12a476
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
139 additions
and
116 deletions
+139
-116
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/OperationActivity.java
+137
-3
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/OperationListActivity.java
+2
-113
No files found.
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/OperationActivity.java
View file @
3efe1193
...
...
@@ -5,24 +5,33 @@ import android.content.DialogInterface;
import
android.content.Intent
;
import
android.view.View
;
import
android.view.Window
;
import
android.widget.AdapterView
;
import
android.widget.ImageButton
;
import
android.widget.LinearLayout
;
import
android.widget.ListView
;
import
android.widget.TextView
;
import
java.util.List
;
import
jp.agentec.abook.abv.bl.acms.type.AcmsApis
;
import
jp.agentec.abook.abv.bl.common.ABVEnvironment
;
import
jp.agentec.abook.abv.bl.common.log.Logger
;
import
jp.agentec.abook.abv.bl.data.ABVDataCache
;
import
jp.agentec.abook.abv.bl.dto.PushMessageDto
;
import
jp.agentec.abook.abv.bl.logic.AbstractLogic
;
import
jp.agentec.abook.abv.bl.logic.PushMessageLogic
;
import
jp.agentec.abook.abv.launcher.android.R
;
import
jp.agentec.abook.abv.ui.common.activity.ABVUIActivity
;
import
jp.agentec.abook.abv.ui.common.appinfo.AppDefType
;
import
jp.agentec.abook.abv.ui.common.constant.NaviConsts
;
import
jp.agentec.abook.abv.ui.common.dialog.ABookAlertDialog
;
import
jp.agentec.abook.abv.ui.common.util.AlertDialogUtil
;
import
jp.agentec.abook.abv.ui.common.util.PatternStringUtil
;
import
jp.agentec.abook.abv.ui.home.adapter.PushMessageListAdapter
;
import
jp.agentec.abook.abv.ui.home.helper.ActivityHandlingHelper
;
import
jp.agentec.abook.abv.ui.viewer.activity.OnlineHTMLWebViewActivity
;
import
jp.agentec.adf.util.DateTimeFormat
;
import
jp.agentec.adf.util.DateTimeUtil
;
public
class
OperationActivity
extends
ABVUIActivity
{
@SuppressWarnings
(
"unused"
)
...
...
@@ -35,8 +44,9 @@ public class OperationActivity extends ABVUIActivity {
private
PushMessageLogic
mPushMessageLogic
=
AbstractLogic
.
getLogic
(
PushMessageLogic
.
class
);
private
Dialog
mCommunicationMenuDialog
;
private
Dialog
mSubMenuDialog
;
private
Dialog
mPushMessageListDialog
;
private
ListView
mPushMessageListView
;
private
PushMessageListAdapter
mPushMessageListAdapter
;
protected
void
createCommonToolber
()
{
// ホームボタン
mOperationHomeButton
=
findViewById
(
R
.
id
.
btn_operation_home
);
...
...
@@ -208,5 +218,129 @@ public class OperationActivity extends ABVUIActivity {
startActivity
(
intent
,
NaviConsts
.
Right
);
}
protected
void
showPushMessageListDialog
(){}
/**
* プッシュメッセージ一覧画面表示
*/
protected
void
showPushMessageListDialog
(){
mPushMessageListDialog
=
new
Dialog
(
OperationActivity
.
this
);
mPushMessageListDialog
.
requestWindowFeature
(
Window
.
FEATURE_NO_TITLE
);
mPushMessageListDialog
.
setCanceledOnTouchOutside
(
false
);
mPushMessageListDialog
.
setContentView
(
R
.
layout
.
push_message_list_dialog
);
mPushMessageListView
=
(
ListView
)
mPushMessageListDialog
.
findViewById
(
R
.
id
.
lv_push_message
);
List
<
PushMessageDto
>
pushMessageDtoList
=
mPushMessageLogic
.
getAllPushMessageList
();
mPushMessageListAdapter
=
new
PushMessageListAdapter
(
OperationActivity
.
this
,
pushMessageDtoList
);
mPushMessageListView
.
setAdapter
(
mPushMessageListAdapter
);
mPushMessageListView
.
setOnItemClickListener
(
new
AdapterView
.
OnItemClickListener
()
{
@Override
public
void
onItemClick
(
AdapterView
<?>
adapterView
,
View
view
,
int
i
,
long
l
)
{
PushMessageDto
pushMessageDto
=
(
PushMessageDto
)
adapterView
.
getItemAtPosition
(
i
);
showPushMessageDetailView
(
pushMessageDto
);
}
});
mPushMessageListView
.
invalidate
();
mPushMessageListView
.
setClickable
(
false
);
TextView
notesTextView
=
mPushMessageListDialog
.
findViewById
(
R
.
id
.
tv_notes
);
notesTextView
.
setText
(
R
.
string
.
msg_push_message_list_notes
);
mPushMessageListDialog
.
findViewById
(
R
.
id
.
back_btn
).
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
List
<
PushMessageDto
>
pushMessageDtoList
=
mPushMessageLogic
.
getAllPushMessageList
();
mPushMessageListAdapter
.
setItem
(
pushMessageDtoList
);
showPushMessgeListView
(
true
);
}
});
mPushMessageListDialog
.
findViewById
(
R
.
id
.
close_btn
).
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
mPushMessageListDialog
.
dismiss
();
reloadOperationPushMessageListView
();
}
});
showPushMessgeListView
(
true
);
mPushMessageListDialog
.
show
();
}
/**
* プッシュメッセージ詳細画面表示
* @param dto プッシュメッセージ情報
*/
private
void
showPushMessageDetailView
(
final
PushMessageDto
dto
)
{
TextView
detailNotesTextVie
=
(
TextView
)
mPushMessageListDialog
.
findViewById
(
R
.
id
.
tv_detail_notes
);
int
errorMessageResourceId
=
0
;
if
(!
dto
.
readingFlg
)
{
if
(
ABVEnvironment
.
getInstance
().
networkAdapter
.
isNetworkConnected
())
{
//サーバ通信
showProgressPopup
(
PatternStringUtil
.
patternToString
(
getApplicationContext
(),
R
.
string
.
msg_common_processing
,
getUserPref
(
AppDefType
.
UserPrefKey
.
RESOURCE_PATTERN_TYPE
,
0
)));
try
{
if
(
mPushMessageLogic
.
sendReadPushMessage
(
dto
.
pushMessageId
))
{
mPushMessageLogic
.
updateReadingFlg
(
dto
.
pushMessageId
);
}
else
{
Logger
.
e
(
TAG
,
"sendReadPushMessage result false"
);
errorMessageResourceId
=
R
.
string
.
msg_push_message_detail_api_error
;
}
}
catch
(
Exception
e
)
{
Logger
.
e
(
TAG
,
"e.getLocalizedMessage = "
+
e
.
getLocalizedMessage
());
errorMessageResourceId
=
R
.
string
.
msg_push_message_detail_api_error
;
}
finally
{
closeProgressPopup
();
}
}
else
{
errorMessageResourceId
=
R
.
string
.
msg_push_message_detail_api_disconnect
;
}
}
if
(
errorMessageResourceId
==
0
)
{
detailNotesTextVie
.
setVisibility
(
View
.
GONE
);
detailNotesTextVie
.
setText
(
null
);
}
else
{
detailNotesTextVie
.
setVisibility
(
View
.
VISIBLE
);
detailNotesTextVie
.
setText
(
errorMessageResourceId
);
}
TextView
messageTextView
=
(
TextView
)
mPushMessageListDialog
.
findViewById
(
R
.
id
.
tv_message
);
TextView
sendDateTextView
=
(
TextView
)
mPushMessageListDialog
.
findViewById
(
R
.
id
.
tv_send_date
);
TextView
sendOperationNameTextView
=
(
TextView
)
mPushMessageListDialog
.
findViewById
(
R
.
id
.
tv_operation_name
);
messageTextView
.
setText
(
dto
.
pushMessage
);
sendDateTextView
.
setText
(
DateTimeUtil
.
toString
(
dto
.
pushSendDate
,
DateTimeFormat
.
yyyyMMddHHmm_slash
));
sendOperationNameTextView
.
setText
(
dto
.
operationName
);
showPushMessgeListView
(
false
);
}
/**
* プッシュメッセージ一覧・詳細画面の切り替え処理
* @param pushMessageListViewFlg true:一覧, false:詳細
*/
private
void
showPushMessgeListView
(
boolean
pushMessageListViewFlg
)
{
TextView
titleTextView
=
(
TextView
)
mPushMessageListDialog
.
findViewById
(
R
.
id
.
tv_toolbar_title
);
if
(
pushMessageListViewFlg
)
{
mPushMessageListDialog
.
findViewById
(
R
.
id
.
ll_push_message_list
).
setVisibility
(
View
.
VISIBLE
);
mPushMessageListDialog
.
findViewById
(
R
.
id
.
close_btn
).
setVisibility
(
View
.
VISIBLE
);
mPushMessageListDialog
.
findViewById
(
R
.
id
.
back_btn
).
setVisibility
(
View
.
GONE
);
mPushMessageListDialog
.
findViewById
(
R
.
id
.
ll_detail
).
setVisibility
(
View
.
GONE
);
// リソースパターンの適用
titleTextView
.
setText
(
PatternStringUtil
.
patternToString
(
getApplicationContext
(),
R
.
string
.
push_message_list
,
getUserPref
(
AppDefType
.
UserPrefKey
.
RESOURCE_PATTERN_TYPE
,
0
)));
}
else
{
mPushMessageListDialog
.
findViewById
(
R
.
id
.
ll_push_message_list
).
setVisibility
(
View
.
GONE
);
mPushMessageListDialog
.
findViewById
(
R
.
id
.
close_btn
).
setVisibility
(
View
.
VISIBLE
);
mPushMessageListDialog
.
findViewById
(
R
.
id
.
back_btn
).
setVisibility
(
View
.
VISIBLE
);
mPushMessageListDialog
.
findViewById
(
R
.
id
.
ll_detail
).
setVisibility
(
View
.
VISIBLE
);
// リソースパターンの適用
titleTextView
.
setText
(
PatternStringUtil
.
patternToString
(
getApplicationContext
(),
R
.
string
.
title_message_detail
,
getUserPref
(
AppDefType
.
UserPrefKey
.
RESOURCE_PATTERN_TYPE
,
0
)));
}
}
/**
* 子クラスから実装(未読プッシュメッセージ表示領域をリロード)
*/
protected
void
reloadOperationPushMessageListView
(){}
}
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/OperationListActivity.java
View file @
3efe1193
...
...
@@ -183,10 +183,7 @@ public class OperationListActivity extends OperationActivity {
private
Dialog
mOperationSelectDialog
;
private
ListView
mOperationSelectListView
;
private
Dialog
mPushMessageListDialog
;
private
ListView
mPushMessageListView
;
private
OperationSelectAdapter
mOperationSelectAdapter
;
private
PushMessageListAdapter
mPushMessageListAdapter
;
private
UnreadPushMessageListAdapter
mUnreadPushMessageListAdapter
;
private
File
mLocalFile
;
...
...
@@ -1521,116 +1518,7 @@ public class OperationListActivity extends OperationActivity {
mOperationSelectDialog
.
show
();
}
@Override
protected
void
showPushMessageListDialog
()
{
mPushMessageListDialog
=
new
Dialog
(
OperationListActivity
.
this
);
mPushMessageListDialog
.
requestWindowFeature
(
Window
.
FEATURE_NO_TITLE
);
mPushMessageListDialog
.
setCanceledOnTouchOutside
(
false
);
mPushMessageListDialog
.
setContentView
(
R
.
layout
.
push_message_list_dialog
);
mPushMessageListView
=
(
ListView
)
mPushMessageListDialog
.
findViewById
(
R
.
id
.
lv_push_message
);
List
<
PushMessageDto
>
pushMessageDtoList
=
mPushMessageLogic
.
getAllPushMessageList
();
mPushMessageListAdapter
=
new
PushMessageListAdapter
(
OperationListActivity
.
this
,
pushMessageDtoList
);
mPushMessageListView
.
setAdapter
(
mPushMessageListAdapter
);
mPushMessageListView
.
setOnItemClickListener
(
new
AdapterView
.
OnItemClickListener
()
{
@Override
public
void
onItemClick
(
AdapterView
<?>
adapterView
,
View
view
,
int
i
,
long
l
)
{
PushMessageDto
pushMessageDto
=
(
PushMessageDto
)
adapterView
.
getItemAtPosition
(
i
);
showPushMessageDetailView
(
pushMessageDto
);
}
});
mPushMessageListView
.
invalidate
();
mPushMessageListView
.
setClickable
(
false
);
TextView
notesTextView
=
mPushMessageListDialog
.
findViewById
(
R
.
id
.
tv_notes
);
notesTextView
.
setText
(
R
.
string
.
msg_push_message_list_notes
);
mPushMessageListDialog
.
findViewById
(
R
.
id
.
back_btn
).
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
List
<
PushMessageDto
>
pushMessageDtoList
=
mPushMessageLogic
.
getAllPushMessageList
();
mPushMessageListAdapter
.
setItem
(
pushMessageDtoList
);
showPushMessgeListView
(
true
);
}
});
mPushMessageListDialog
.
findViewById
(
R
.
id
.
close_btn
).
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
mPushMessageListDialog
.
dismiss
();
reloadOperationPushMessageListView
();
}
});
showPushMessgeListView
(
true
);
mPushMessageListDialog
.
show
();
}
private
void
showPushMessageDetailView
(
final
PushMessageDto
dto
)
{
TextView
detailNotesTextVie
=
(
TextView
)
mPushMessageListDialog
.
findViewById
(
R
.
id
.
tv_detail_notes
);
int
errorMessageResourceId
=
0
;
if
(!
dto
.
readingFlg
)
{
if
(
ABVEnvironment
.
getInstance
().
networkAdapter
.
isNetworkConnected
())
{
//サーバ通信
showProgressPopup
(
PatternStringUtil
.
patternToString
(
getApplicationContext
(),
R
.
string
.
msg_common_processing
,
getUserPref
(
AppDefType
.
UserPrefKey
.
RESOURCE_PATTERN_TYPE
,
0
)));
try
{
if
(
mPushMessageLogic
.
sendReadPushMessage
(
dto
.
pushMessageId
))
{
mPushMessageLogic
.
updateReadingFlg
(
dto
.
pushMessageId
);
}
else
{
Logger
.
e
(
TAG
,
"sendReadPushMessage result false"
);
errorMessageResourceId
=
R
.
string
.
msg_push_message_detail_api_error
;
}
}
catch
(
Exception
e
)
{
Logger
.
e
(
TAG
,
"e.getLocalizedMessage = "
+
e
.
getLocalizedMessage
());
errorMessageResourceId
=
R
.
string
.
msg_push_message_detail_api_error
;
}
finally
{
closeProgressPopup
();
}
}
else
{
errorMessageResourceId
=
R
.
string
.
msg_push_message_detail_api_disconnect
;
}
}
if
(
errorMessageResourceId
==
0
)
{
detailNotesTextVie
.
setVisibility
(
View
.
GONE
);
detailNotesTextVie
.
setText
(
null
);
}
else
{
detailNotesTextVie
.
setVisibility
(
View
.
VISIBLE
);
detailNotesTextVie
.
setText
(
errorMessageResourceId
);
}
TextView
messageTextView
=
(
TextView
)
mPushMessageListDialog
.
findViewById
(
R
.
id
.
tv_message
);
TextView
sendDateTextView
=
(
TextView
)
mPushMessageListDialog
.
findViewById
(
R
.
id
.
tv_send_date
);
TextView
sendOperationNameTextView
=
(
TextView
)
mPushMessageListDialog
.
findViewById
(
R
.
id
.
tv_operation_name
);
messageTextView
.
setText
(
dto
.
pushMessage
);
sendDateTextView
.
setText
(
DateTimeUtil
.
toString
(
dto
.
pushSendDate
,
DateTimeFormat
.
yyyyMMddHHmm_slash
));
sendOperationNameTextView
.
setText
(
dto
.
operationName
);
showPushMessgeListView
(
false
);
}
private
void
showPushMessgeListView
(
boolean
pushMessageListViewFlg
)
{
TextView
titleTextView
=
(
TextView
)
mPushMessageListDialog
.
findViewById
(
R
.
id
.
tv_toolbar_title
);
if
(
pushMessageListViewFlg
)
{
mPushMessageListDialog
.
findViewById
(
R
.
id
.
ll_push_message_list
).
setVisibility
(
View
.
VISIBLE
);
mPushMessageListDialog
.
findViewById
(
R
.
id
.
close_btn
).
setVisibility
(
View
.
VISIBLE
);
mPushMessageListDialog
.
findViewById
(
R
.
id
.
back_btn
).
setVisibility
(
View
.
GONE
);
mPushMessageListDialog
.
findViewById
(
R
.
id
.
ll_detail
).
setVisibility
(
View
.
GONE
);
// リソースパターンの適用
titleTextView
.
setText
(
PatternStringUtil
.
patternToString
(
getApplicationContext
(),
R
.
string
.
push_message_list
,
getUserPref
(
AppDefType
.
UserPrefKey
.
RESOURCE_PATTERN_TYPE
,
0
)));
}
else
{
mPushMessageListDialog
.
findViewById
(
R
.
id
.
ll_push_message_list
).
setVisibility
(
View
.
GONE
);
mPushMessageListDialog
.
findViewById
(
R
.
id
.
close_btn
).
setVisibility
(
View
.
VISIBLE
);
mPushMessageListDialog
.
findViewById
(
R
.
id
.
back_btn
).
setVisibility
(
View
.
VISIBLE
);
mPushMessageListDialog
.
findViewById
(
R
.
id
.
ll_detail
).
setVisibility
(
View
.
VISIBLE
);
// リソースパターンの適用
titleTextView
.
setText
(
PatternStringUtil
.
patternToString
(
getApplicationContext
(),
R
.
string
.
title_message_detail
,
getUserPref
(
AppDefType
.
UserPrefKey
.
RESOURCE_PATTERN_TYPE
,
0
)));
}
}
/**
* プッシュメッセージ送信ダイヤログ表示
...
...
@@ -2544,7 +2432,8 @@ public class OperationListActivity extends OperationActivity {
/**
* 作業一覧画面上部に未読のプッシュメッセージ最大3つ表示
*/
private
void
reloadOperationPushMessageListView
()
{
@Override
protected
void
reloadOperationPushMessageListView
()
{
List
<
PushMessageDto
>
pushMessageDtoList
=
mPushMessageLogic
.
getUnreadPushMessageList
();
if
(
pushMessageDtoList
.
size
()
==
0
)
{
mOperationPushMessageListView
.
setVisibility
(
View
.
GONE
);
...
...
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