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
c82278cd
Commit
c82278cd
authored
Dec 27, 2022
by
Kazuyuki Hida
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ボトムメニューによる画面遷移を実装した。
parent
059911bc
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
308 additions
and
30 deletions
+308
-30
ABVJE_UI_Android/AndroidManifest.xml
+11
-7
ABVJE_UI_Android/build.gradle
+17
-17
ABVJE_UI_Android/res/layout/ac_operation_dashboard.xml
+57
-0
ABVJE_UI_Android/res/layout/operation_common_toolbar.xml
+14
-0
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/DashboardActivity.java
+186
-0
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/OperationActivity.java
+23
-6
No files found.
ABVJE_UI_Android/AndroidManifest.xml
View file @
c82278cd
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android=
"http://schemas.android.com/apk/res/android"
package=
"jp.agentec.abook.abv.launcher.android"
xmlns:tools=
"http://schemas.android.com/tools"
package=
"jp.agentec.abook.abv.launcher.android"
android:versionCode=
"1"
android:versionName=
"1.0"
>
<uses-sdk
tools:overrideLibrary=
"org.xwalk.core"
/>
<uses-sdk
tools:overrideLibrary=
"org.xwalk.core"
/>
<uses-permission
android:name=
"android.permission.ACCESS_FINE_LOCATION"
/>
<uses-permission
android:name=
"android.permission.ACCESS_WIFI_STATE"
/>
<uses-permission
android:name=
"android.permission.BLUETOOTH"
/>
<uses-permission
android:name=
"android.permission.ACCESS_FINE_LOCATION"
/>
<uses-permission
android:name=
"android.permission.ACCESS_WIFI_STATE"
/>
<uses-permission
android:name=
"android.permission.BLUETOOTH"
/>
<uses-permission
android:name=
"android.permission.BLUETOOTH_ADMIN"
/>
<uses-permission
android:name=
"android.permission.GET_ACCOUNTS"
/>
<uses-permission
android:name=
"android.permission.NFC"
/>
<uses-permission
android:name=
"android.permission.WRITE_EXTERNAL_STORAGE"
/>
<uses-permission
android:name=
"android.permission.READ_EXTERNAL_STORAGE"
/>
</manifest>
<application>
<activity
android:name=
"jp.agentec.abook.abv.ui.home.activity.DashboardActivity"
></activity>
</application>
</manifest>
\ No newline at end of file
ABVJE_UI_Android/build.gradle
View file @
c82278cd
buildscript
{
repositories
{
jcenter
()
}
repositories
{
jcenter
()
}
}
apply
plugin:
'com.android.library'
...
...
@@ -29,23 +29,23 @@ android {
compileSdkVersion
31
buildToolsVersion
'30.0.2'
defaultConfig
{
minSdkVersion
23
targetSdkVersion
31
multiDexEnabled
true
}
sourceSets
{
main
{
manifest
.
srcFile
'AndroidManifest.xml'
java
.
srcDirs
=
[
'src'
]
resources
.
srcDirs
=
[
'res'
]
aidl
.
srcDirs
=
[
'src'
]
res
.
srcDirs
=
[
'res'
]
defaultConfig
{
minSdkVersion
23
targetSdkVersion
31
multiDexEnabled
true
}
sourceSets
{
main
{
manifest
.
srcFile
'AndroidManifest.xml'
java
.
srcDirs
=
[
'src'
]
resources
.
srcDirs
=
[
'res'
]
aidl
.
srcDirs
=
[
'src'
]
res
.
srcDirs
=
[
'res'
]
jniLibs
.
srcDirs
=
[
'libs'
,
'xwalk_core_library/src/main/jniLibs'
]
jniLibs
.
srcDirs
=
[
'libs'
,
'xwalk_core_library/src/main/jniLibs'
]
}
}
}
lintOptions
{
quiet
true
checkReleaseBuilds
false
...
...
ABVJE_UI_Android/res/layout/ac_operation_dashboard.xml
0 → 100644
View file @
c82278cd
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"vertical"
tools:context=
"jp.agentec.abook.abv.ui.home.activity.DashboardActivity"
>
<RelativeLayout
android:id=
"@+id/frameTopbar"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@color/app_color"
android:minHeight=
"50dp"
>
<TextView
android:id=
"@+id/title"
style=
"@style/DialogToolBarTitle"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:maxLines=
"1"
android:ellipsize=
"end"
android:textColor=
"@color/text_dialog"
android:gravity=
"center"
android:visibility=
"gone"
android:textStyle=
"bold"
/>
<LinearLayout
android:id=
"@+id/menuLayout"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentEnd=
"true"
android:layout_centerVertical=
"true"
android:layout_marginEnd=
"5dp"
>
<ImageButton
android:id=
"@+id/btn_help"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:background=
"@drawable/ic_operation_help"
android:layout_marginTop=
"6dp"
android:layout_marginEnd=
"10dp"
/>
</LinearLayout>
</RelativeLayout>
<FrameLayout
android:id=
"@+id/frameWebView"
android:layout_width=
"match_parent"
android:layout_height=
"0dp"
android:layout_weight=
"1"
android:orientation=
"vertical"
>
</FrameLayout>
<include
layout=
"@layout/operation_common_toolbar"
android:id=
"@+id/toolbar2"
/>
</LinearLayout>
ABVJE_UI_Android/res/layout/operation_common_toolbar.xml
View file @
c82278cd
...
...
@@ -10,6 +10,20 @@
android:minHeight=
"50dp"
android:visibility=
"visible"
>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:layout_weight=
"1"
android:gravity=
"center"
>
<ImageButton
android:id=
"@+id/btn_operation_dashboard"
style=
"@style/ToolBarIcon"
android:src=
"@drawable/btn_operation_dashboard"
/>
</LinearLayout>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/DashboardActivity.java
0 → 100644
View file @
c82278cd
package
jp
.
agentec
.
abook
.
abv
.
ui
.
home
.
activity
;
import
android.app.Dialog
;
import
android.content.DialogInterface
;
import
android.content.Intent
;
import
android.os.Bundle
;
import
android.view.View
;
import
android.view.Window
;
import
android.widget.ImageButton
;
import
android.widget.LinearLayout
;
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.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.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.home.helper.ActivityHandlingHelper
;
import
jp.agentec.abook.abv.ui.viewer.activity.OnlineHTMLWebViewActivity
;
public
class
DashboardActivity
extends
ABVUIActivity
{
@SuppressWarnings
(
"unused"
)
private
static
final
String
TAG
=
"DashboardActivity"
;
protected
ImageButton
mOperationHomeButton
;
// ホームボタン
protected
ImageButton
mDashboardButton
;
// ダッシュボード
protected
ImageButton
mCommonContentButton
;
// 関連資料
protected
ImageButton
mCommunicationButton
;
// コミュニケーション
protected
ImageButton
mQuickReportPrintButton
;
// 簡易帳票印刷ボタン
private
PushMessageLogic
mPushMessageLogic
=
AbstractLogic
.
getLogic
(
PushMessageLogic
.
class
);
private
Dialog
mCommunicationMenuDialog
;
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
setContentView
(
R
.
layout
.
ac_operation_dashboard
);
createCommonToolber
();
}
protected
void
createCommonToolber
()
{
// ダッシュボード
mDashboardButton
=
findViewById
(
R
.
id
.
btn_operation_dashboard
);
mDashboardButton
.
setEnabled
(
false
);
// ホームボタン
mOperationHomeButton
=
findViewById
(
R
.
id
.
btn_operation_home
);
mOperationHomeButton
.
setEnabled
(
true
);
mOperationHomeButton
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
finish
();
}
});
// 共通資料
mCommonContentButton
=
findViewById
(
R
.
id
.
btn_common_content
);
mCommonContentButton
.
setEnabled
(
true
);
mCommonContentButton
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
showCommonContent
();
}
});
// コミュニケーション
mCommunicationButton
=
findViewById
(
R
.
id
.
btn_communication_menu
);
List
<
PushMessageDto
>
pushMessageDtoList
=
mPushMessageLogic
.
getAllPushMessageList
();
boolean
existUnreadFlg
=
false
;
for
(
PushMessageDto
pushMessageDto
:
pushMessageDtoList
)
{
if
(!
pushMessageDto
.
readingFlg
)
{
existUnreadFlg
=
true
;
break
;
}
}
if
(
existUnreadFlg
)
{
mCommunicationButton
.
setImageDrawable
(
getRDrawable
(
R
.
drawable
.
ic_communication_menu_with_badge
));
}
else
{
mCommunicationButton
.
setImageDrawable
(
getRDrawable
(
R
.
drawable
.
ic_communication_menu
));
}
mCommunicationButton
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
showCommunicationMenuDialog
();
}
});
// 簡易帳票印刷ボタン
mQuickReportPrintButton
=
findViewById
(
R
.
id
.
btn_operation_print
);
if
(
ABVDataCache
.
getInstance
().
serviceOption
.
isUnableIOReport
())
{
mQuickReportPrintButton
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
showPrintTargetSelect
();
}
});
mQuickReportPrintButton
.
setVisibility
(
View
.
VISIBLE
);
}
else
{
findViewById
(
R
.
id
.
print_layout
).
setVisibility
(
View
.
GONE
);
mQuickReportPrintButton
.
setVisibility
(
View
.
GONE
);
}
}
// 共通資料画面表示
private
void
showCommonContent
()
{
Intent
intent
=
new
Intent
();
intent
.
setClass
(
this
,
OperationRelatedContentActivity
.
class
);
startActivity
(
intent
);
}
/**
* コミュニケーションダイアログの表示
*/
private
void
showCommunicationMenuDialog
()
{
mCommunicationMenuDialog
=
new
Dialog
(
this
);
mCommunicationMenuDialog
.
requestWindowFeature
(
Window
.
FEATURE_NO_TITLE
);
mCommunicationMenuDialog
.
setCanceledOnTouchOutside
(
false
);
mCommunicationMenuDialog
.
setContentView
(
R
.
layout
.
communication_menu_dialog
);
LinearLayout
ll_menuItem_meeting
=
mCommunicationMenuDialog
.
findViewById
(
R
.
id
.
ll_item_meeting
);
ll_menuItem_meeting
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
view
)
{
ActivityHandlingHelper
.
getInstance
().
startMeetingActivity
();
mCommunicationMenuDialog
.
dismiss
();
}
});
mCommunicationMenuDialog
.
findViewById
(
R
.
id
.
close_btn
).
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
mCommunicationMenuDialog
.
dismiss
();
}
});
mCommunicationMenuDialog
.
show
();
}
// 設定画面へ遷移
public
void
onClickSetting
(
View
v
)
{
showSetting
();
}
/**
* インターネットが繋がってない場合のダイアログ表示
*/
protected
void
showDisConnectNetworkDialog
()
{
handler
.
post
(
new
Runnable
()
{
@Override
public
void
run
()
{
// ヘッダーの新着更新処理を完了にさせる
stopUpdateAnimation
();
final
ABookAlertDialog
messageDialog
=
AlertDialogUtil
.
createAlertDialog
(
DashboardActivity
.
this
,
R
.
string
.
app_name
);
messageDialog
.
setMessage
(
getString
(
R
.
string
.
msg_network_offline
));
messageDialog
.
setPositiveButton
(
R
.
string
.
confirm
,
new
DialogInterface
.
OnClickListener
()
{
@Override
public
void
onClick
(
DialogInterface
dialog
,
int
whichButton
)
{
messageDialog
.
dismiss
();
}
});
messageDialog
.
show
();
}
});
}
/**
* 簡易帳票印刷対象選択画面表示
*/
protected
void
showPrintTargetSelect
()
{
if
(!
ABVEnvironment
.
getInstance
().
networkAdapter
.
isNetworkConnected
())
{
showDisConnectNetworkDialog
();
return
;
}
Intent
intent
=
new
Intent
();
intent
.
setClass
(
this
,
OnlineHTMLWebViewActivity
.
class
);
intent
.
setFlags
(
Intent
.
FLAG_ACTIVITY_SINGLE_TOP
);
intent
.
putExtra
(
"LINKURL"
,
AcmsApis
.
getApiUrl
(
ABVEnvironment
.
getInstance
().
acmsAddress
,
ABVDataCache
.
getInstance
().
getUrlPath
(),
AcmsApis
.
ApiQuickReportSearch
));
startActivity
(
intent
,
NaviConsts
.
Right
);
}
}
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/OperationActivity.java
View file @
c82278cd
...
...
@@ -25,8 +25,10 @@ import jp.agentec.abook.abv.ui.home.helper.ActivityHandlingHelper;
import
jp.agentec.abook.abv.ui.viewer.activity.OnlineHTMLWebViewActivity
;
public
class
OperationActivity
extends
ABVUIActivity
{
@SuppressWarnings
(
"unused"
)
private
static
final
String
TAG
=
"OperationActivity"
;
protected
ImageButton
mOperationHomeButton
;
// ホームボタン
protected
ImageButton
mDashboardButton
;
// ダッシュボード
protected
ImageButton
mCommonContentButton
;
// 関連資料
protected
ImageButton
mCommunicationButton
;
// コミュニケーション
protected
ImageButton
mQuickReportPrintButton
;
// 簡易帳票印刷ボタン
...
...
@@ -36,10 +38,20 @@ public class OperationActivity extends ABVUIActivity {
protected
void
createCommonToolber
()
{
// ホームボタン
mOperationHomeButton
=
(
ImageButton
)
findViewById
(
R
.
id
.
btn_operation_home
);
mOperationHomeButton
=
findViewById
(
R
.
id
.
btn_operation_home
);
mOperationHomeButton
.
setEnabled
(
false
);
// ダッシュボード
mDashboardButton
=
findViewById
(
R
.
id
.
btn_operation_dashboard
);
mDashboardButton
.
setEnabled
(
true
);
mDashboardButton
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
showDashboard
();
}
});
// 共通資料
mCommonContentButton
=
(
ImageButton
)
findViewById
(
R
.
id
.
btn_common_content
);
mCommonContentButton
=
findViewById
(
R
.
id
.
btn_common_content
);
mCommonContentButton
.
setEnabled
(
true
);
mCommonContentButton
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
...
...
@@ -49,7 +61,7 @@ public class OperationActivity extends ABVUIActivity {
});
// コミュニケーション
mCommunicationButton
=
(
ImageButton
)
findViewById
(
R
.
id
.
btn_communication_menu
);
mCommunicationButton
=
findViewById
(
R
.
id
.
btn_communication_menu
);
List
<
PushMessageDto
>
pushMessageDtoList
=
mPushMessageLogic
.
getAllPushMessageList
();
boolean
existUnreadFlg
=
false
;
for
(
PushMessageDto
pushMessageDto
:
pushMessageDtoList
)
{
...
...
@@ -71,7 +83,7 @@ public class OperationActivity extends ABVUIActivity {
});
// 簡易帳票印刷ボタン
mQuickReportPrintButton
=
(
ImageButton
)
findViewById
(
R
.
id
.
btn_operation_print
);
mQuickReportPrintButton
=
findViewById
(
R
.
id
.
btn_operation_print
);
if
(
ABVDataCache
.
getInstance
().
serviceOption
.
isUnableIOReport
())
{
mQuickReportPrintButton
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
...
...
@@ -85,7 +97,12 @@ public class OperationActivity extends ABVUIActivity {
mQuickReportPrintButton
.
setVisibility
(
View
.
GONE
);
}
}
// ダッシュボード表示
private
void
showDashboard
()
{
Intent
intent
=
new
Intent
();
intent
.
setClass
(
OperationActivity
.
this
,
DashboardActivity
.
class
);
startActivity
(
intent
);
}
// 共通資料画面表示
private
void
showCommonContent
()
{
Intent
intent
=
new
Intent
();
...
...
@@ -102,7 +119,7 @@ public class OperationActivity extends ABVUIActivity {
mCommunicationMenuDialog
.
setContentView
(
R
.
layout
.
communication_menu_dialog
);
List
<
PushMessageDto
>
pushMessageDtoList
=
mPushMessageLogic
.
getAllPushMessageList
();
LinearLayout
ll_menuItem_meeting
=
(
LinearLayout
)
mCommunicationMenuDialog
.
findViewById
(
R
.
id
.
ll_item_meeting
);
LinearLayout
ll_menuItem_meeting
=
mCommunicationMenuDialog
.
findViewById
(
R
.
id
.
ll_item_meeting
);
ll_menuItem_meeting
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
view
)
{
...
...
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