Commit 032eb0d4 by Lee Jaebin

#34869 作業一覧・共通資料画面上下ツールバー

parent 67f59ddb
...@@ -116,8 +116,12 @@ public class OperationDao extends AbstractDao { ...@@ -116,8 +116,12 @@ public class OperationDao extends AbstractDao {
return dto; return dto;
} }
/**
* 全作業を取得(operation_id降順)
* @return
*/
public List<OperationDto> getAllOperation() { public List<OperationDto> getAllOperation() {
return rawQueryGetDtoList("select tp.*, rpc.content_id from t_operation AS tp left outer join r_operation_content AS rpc on tp.operation_id = rpc.operation_id", null, OperationDto.class); return rawQueryGetDtoList("select tp.*, rpc.content_id from t_operation AS tp left outer join r_operation_content AS rpc on tp.operation_id = rpc.operation_id ORDER BY operation_id DESC", null, OperationDto.class);
} }
public List<OperationDto> getLatestOperations() { public List<OperationDto> getLatestOperations() {
...@@ -266,8 +270,8 @@ public class OperationDao extends AbstractDao { ...@@ -266,8 +270,8 @@ public class OperationDao extends AbstractDao {
* @param operationGroupMasterId * @param operationGroupMasterId
* @return * @return
*/ */
public List<OperationDto> getOperationsByGroupMasterId(Integer operationGroupMasterId) { public List<OperationDto> getOperationsByGroupMasterId(Integer operationGroupMasterId, OperationSortingType operationSortingType) {
String sql = generateGetOperationQuery(null, null, null, null, operationGroupMasterId); String sql = generateGetOperationQuery(null, null, null, operationSortingType, operationGroupMasterId);
return rawQueryGetDtoList(sql, null, OperationDto.class); return rawQueryGetDtoList(sql, null, OperationDto.class);
} }
......
...@@ -8,6 +8,7 @@ import java.util.Map; ...@@ -8,6 +8,7 @@ import java.util.Map;
import jp.agentec.abook.abv.bl.acms.client.AcmsClient; import jp.agentec.abook.abv.bl.acms.client.AcmsClient;
import jp.agentec.abook.abv.bl.acms.client.json.OperationGroupMasterJSON; import jp.agentec.abook.abv.bl.acms.client.json.OperationGroupMasterJSON;
import jp.agentec.abook.abv.bl.acms.client.parameters.AcmsParameters; import jp.agentec.abook.abv.bl.acms.client.parameters.AcmsParameters;
import jp.agentec.abook.abv.bl.acms.type.OperationSortingType;
import jp.agentec.abook.abv.bl.common.ABVEnvironment; import jp.agentec.abook.abv.bl.common.ABVEnvironment;
import jp.agentec.abook.abv.bl.common.exception.AcmsException; import jp.agentec.abook.abv.bl.common.exception.AcmsException;
import jp.agentec.abook.abv.bl.common.exception.NetworkDisconnectedException; import jp.agentec.abook.abv.bl.common.exception.NetworkDisconnectedException;
...@@ -165,7 +166,7 @@ public class OperationGroupMasterLogic extends AbstractLogic { ...@@ -165,7 +166,7 @@ public class OperationGroupMasterLogic extends AbstractLogic {
* @param operationGroupMasterId * @param operationGroupMasterId
* @return * @return
*/ */
public List<OperationDto> getOperationByOperationGroupMasterId(Integer operationGroupMasterId) { public List<OperationDto> getOperationByOperationGroupMasterId(Integer operationGroupMasterId, OperationSortingType operationSortingType) {
return mOperationDao.getOperationsByGroupMasterId(operationGroupMasterId); return mOperationDao.getOperationsByGroupMasterId(operationGroupMasterId, operationSortingType);
} }
} }
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
<item
android:state_enabled="false"
android:drawable="@drawable/home_common_content_icon_off"/>
<item
android:drawable="@drawable/home_common_content_icon_on"/>
</selector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
<item
android:state_enabled="false"
android:drawable="@drawable/home_icon_off"/>
<item
android:drawable="@drawable/home_icon_on"/>
</selector>
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
<item
android:state_enabled="false"
android:drawable="@drawable/ic_operation_search_off"/>
<item
android:drawable="@drawable/ic_operation_search_on"/>
</selector>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:state_checked="true"
android:state_pressed="true"
android:drawable="@drawable/operation_location_segment_on" />
<item
android:state_checked="true"
android:drawable="@drawable/operation_location_segment_on" />
<item
android:state_checked="false"
android:state_pressed="true"
android:drawable="@drawable/operation_location_segment_off" />
<item
android:state_checked="false"
android:drawable="@drawable/operation_location_segment_off" />
</selector>
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
<stroke android:width="1dp" android:color="@android:color/white" />
<solid android:color="@color/operation_color"/>
</shape>
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
<stroke android:width="1dp" android:color="@android:color/white" />
<solid android:color="@android:color/white"/>
</shape>
...@@ -88,4 +88,5 @@ ...@@ -88,4 +88,5 @@
<color name="operation_related_content_new_mark">#ff0000</color> <color name="operation_related_content_new_mark">#ff0000</color>
<color name="operation_bg">#FFFFFF</color> <color name="operation_bg">#FFFFFF</color>
<color name="bottom_toolbar">#F2F2F2</color>
</resources> </resources>
\ No newline at end of file
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
style="@style/ToolBarIcon" style="@style/ToolBarIcon"
android:layout_toRightOf="@+id/btn_view_mode" android:layout_toRightOf="@+id/btn_view_mode"
android:onClick="onClickGroupLocationByTablet" android:onClick="onClickGroupLocationByTablet"
android:src="@drawable/ic_filter" /> android:src="@drawable/ic_category_off" />
<TextView <TextView
android:id="@+id/operation_title" android:id="@+id/operation_title"
...@@ -61,13 +61,13 @@ ...@@ -61,13 +61,13 @@
style="@style/ToolBarIcon" style="@style/ToolBarIcon"
android:layout_toLeftOf="@+id/btn_search" android:layout_toLeftOf="@+id/btn_search"
android:onClick="onClickSortMenuByTablet" android:onClick="onClickSortMenuByTablet"
android:src="@drawable/ic_filter" /> android:src="@drawable/ic_sort" />
<ImageButton <ImageButton
android:id="@+id/btn_search" android:id="@+id/btn_search"
style="@style/ToolBarIcon" style="@style/ToolBarIcon"
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
android:src="@drawable/ic_operation_search" /> android:src="@drawable/btn_operation_search" />
</RelativeLayout> </RelativeLayout>
</RelativeLayout> </RelativeLayout>
...@@ -84,7 +84,8 @@ ...@@ -84,7 +84,8 @@
android:id="@+id/toolbar2" android:id="@+id/toolbar2"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@color/operation_color" android:layout_gravity="bottom"
android:background="@color/bottom_toolbar"
android:minHeight="50dp" android:minHeight="50dp"
android:visibility="visible"> android:visibility="visible">
...@@ -104,7 +105,7 @@ ...@@ -104,7 +105,7 @@
<ImageButton <ImageButton
android:id="@+id/btn_operation_home" android:id="@+id/btn_operation_home"
style="@style/ToolBarIcon" style="@style/ToolBarIcon"
android:src="@drawable/ic_operation_home" /> android:src="@drawable/btn_operation_home" />
</LinearLayout> </LinearLayout>
...@@ -117,7 +118,7 @@ ...@@ -117,7 +118,7 @@
<ImageButton <ImageButton
android:id="@+id/btn_common_content" android:id="@+id/btn_common_content"
style="@style/ToolBarIcon" style="@style/ToolBarIcon"
android:src="@drawable/ic_common_content_off" /> android:src="@drawable/btn_common_content" />
</LinearLayout> </LinearLayout>
......
...@@ -4,44 +4,34 @@ ...@@ -4,44 +4,34 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_gravity="center" android:layout_gravity="center"
android:orientation="vertical"
android:background="@color/basic_white1" android:background="@color/basic_white1"
android:clickable="true" > android:clickable="true" >
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="vertical" > android:orientation="vertical" >
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" > android:orientation="vertical" >
<FrameLayout <FrameLayout
android:id="@+id/operation_related_content_toolbar" android:id="@+id/operation_related_content_toolbar"
style="@style/ToolBarHolo" style="@style/ToolBarHolo"
android:minHeight="50dp" android:minHeight="50dp"
android:background="@color/operation_color" android:background="@color/operation_color"
android:gravity="center" > android:gravity="center"
>
<LinearLayout <LinearLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="left|center" android:layout_gravity="center"
android:gravity="left|center" >
<ImageButton
android:id="@+id/btn_operation_home"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="20dp"
android:background="@drawable/ic_operation_home"
android:contentDescription="@null" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center" > android:gravity="center" >
<ImageView <ImageView
...@@ -61,57 +51,8 @@ ...@@ -61,57 +51,8 @@
android:textColor="@color/text_dialog" android:textColor="@color/text_dialog"
android:textStyle="bold" /> android:textStyle="bold" />
</LinearLayout> </LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right|center"
android:gravity="right|center" >
<ImageButton
android:id="@+id/btn_operation_help"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginRight="10dp"
android:background="@drawable/ic_operation_help"
android:contentDescription="@null"
android:onClick="onClickShowHelpView"/>
</LinearLayout>
</FrameLayout> </FrameLayout>
<LinearLayout
android:id="@+id/ll_operation_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="10dp"
android:paddingTop="10dp"
android:paddingBottom="10dp"
android:paddingRight="10dp" >
<TextView
android:id="@+id/txt_operation_name"
style="@style/txt_menu"
android:gravity="left"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:ellipsize="end"
android:singleLine="true"
android:textColor="@color/edt_text"
android:textSize="@dimen/app_large_text_size"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:id="@+id/linear_full_border"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/border"
android:orientation="vertical" >
</LinearLayout>
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
...@@ -142,4 +83,74 @@ ...@@ -142,4 +83,74 @@
</LinearLayout> </LinearLayout>
<LinearLayout
android:id="@+id/toolbar2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:background="@color/bottom_toolbar"
android:minHeight="50dp"
android:visibility="visible">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginLeft="30dp"
android:layout_marginRight="30dp">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center">
<ImageButton
android:id="@+id/btn_operation_home"
style="@style/ToolBarIcon"
android:src="@drawable/btn_operation_home" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center">
<ImageButton
android:id="@+id/btn_common_content"
style="@style/ToolBarIcon"
android:src="@drawable/btn_common_content" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center">
<ImageButton
android:id="@+id/btn_communication_menu"
style="@style/ToolBarIcon"
android:layout_centerVertical="true"
android:src="@drawable/ic_communication_menu" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center">
<ImageButton
android:id="@+id/btn_setting"
style="@style/ToolBarIcon"
android:onClick="onClickSetting"
android:src="@drawable/ic_operation_setting" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout> </LinearLayout>
\ No newline at end of file
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
style="@style/ToolBarIcon" style="@style/ToolBarIcon"
android:layout_toRightOf="@+id/btn_view_mode" android:layout_toRightOf="@+id/btn_view_mode"
android:onClick="onClickGroupLocationByNormalSize" android:onClick="onClickGroupLocationByNormalSize"
android:src="@drawable/ic_filter" /> android:src="@drawable/ic_category_off" />
<TextView <TextView
android:id="@+id/operation_title" android:id="@+id/operation_title"
...@@ -64,13 +64,13 @@ ...@@ -64,13 +64,13 @@
android:layout_toLeftOf="@+id/btn_search" android:layout_toLeftOf="@+id/btn_search"
android:layout_marginRight="10dp" android:layout_marginRight="10dp"
android:onClick="onClickSortMenuByNormalSize" android:onClick="onClickSortMenuByNormalSize"
android:src="@drawable/ic_filter" /> android:src="@drawable/ic_sort" />
<ImageButton <ImageButton
android:id="@+id/btn_search" android:id="@+id/btn_search"
style="@style/ToolBarIcon" style="@style/ToolBarIcon"
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
android:src="@drawable/ic_operation_search" /> android:src="@drawable/btn_operation_search" />
</RelativeLayout> </RelativeLayout>
</RelativeLayout> </RelativeLayout>
...@@ -89,7 +89,7 @@ ...@@ -89,7 +89,7 @@
android:id="@+id/toolbar2" android:id="@+id/toolbar2"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@color/operation_color" android:background="@color/bottom_toolbar"
android:minHeight="50dp" android:minHeight="50dp"
android:visibility="visible"> android:visibility="visible">
...@@ -103,7 +103,7 @@ ...@@ -103,7 +103,7 @@
<ImageButton <ImageButton
android:id="@+id/btn_operation_home" android:id="@+id/btn_operation_home"
style="@style/ToolBarIcon" style="@style/ToolBarIcon"
android:src="@drawable/ic_operation_home" /> android:src="@drawable/btn_operation_home" />
</LinearLayout> </LinearLayout>
...@@ -117,7 +117,7 @@ ...@@ -117,7 +117,7 @@
<ImageButton <ImageButton
android:id="@+id/btn_common_content" android:id="@+id/btn_common_content"
style="@style/ToolBarIcon" style="@style/ToolBarIcon"
android:src="@drawable/ic_common_content_off" /> android:src="@drawable/btn_common_content" />
</LinearLayout> </LinearLayout>
......
...@@ -4,39 +4,27 @@ ...@@ -4,39 +4,27 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_gravity="center" android:layout_gravity="center"
android:orientation="vertical"
android:background="@color/basic_white1" android:background="@color/basic_white1"
android:clickable="true" > android:clickable="true" >
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical" > android:layout_weight="1"
android:orientation="vertical">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" > android:orientation="vertical">
<FrameLayout <FrameLayout
android:id="@+id/operation_related_content_toolbar" android:id="@+id/operation_related_content_toolbar"
style="@style/ToolBarHolo" style="@style/ToolBarHolo"
android:minHeight="50dp"
android:background="@color/operation_color" android:background="@color/operation_color"
android:gravity="center" > android:gravity="center"
android:minHeight="50dp">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="left|center"
android:gravity="left|center">
<ImageButton
android:id="@+id/btn_operation_home"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="20dp"
android:background="@drawable/ic_operation_home"
android:contentDescription="@null" />
</LinearLayout>
<LinearLayout <LinearLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"
...@@ -54,65 +42,14 @@ ...@@ -54,65 +42,14 @@
android:textSize="@dimen/app_normal_text_size" android:textSize="@dimen/app_normal_text_size"
android:textStyle="bold" /> android:textStyle="bold" />
</LinearLayout> </LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right|center"
android:gravity="right|center" >
<ImageButton
android:id="@+id/btn_operation_help"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginRight="10dp"
android:background="@drawable/ic_operation_help"
android:contentDescription="@null"
android:onClick="onClickShowHelpView"/>
</LinearLayout>
</FrameLayout> </FrameLayout>
<LinearLayout <LinearLayout
android:id="@+id/ll_operation_name"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingLeft="10dp"
android:paddingTop="10dp"
android:paddingBottom="10dp"
android:paddingRight="10dp" >
<TextView
android:id="@+id/txt_operation_name"
style="@style/txt_menu"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:ellipsize="end"
android:gravity="left"
android:maxLines="2"
android:singleLine="false"
android:textColor="@color/edt_text"
android:textSize="@dimen/app_large_text_size"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:id="@+id/linear_full_border"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/border"
android:orientation="vertical" >
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp" android:layout_marginBottom="10dp"
android:layout_marginRight="20dp" android:layout_marginRight="20dp"
android:orientation="vertical" > android:layout_marginTop="10dp">
<Button <Button
android:id="@+id/btn_all_save" android:id="@+id/btn_all_save"
...@@ -136,4 +73,76 @@ ...@@ -136,4 +73,76 @@
</LinearLayout> </LinearLayout>
<LinearLayout
android:id="@+id/toolbar2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:background="@color/bottom_toolbar"
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_home"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/btn_operation_home" />
</LinearLayout>
<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_common_content"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/btn_common_content" />
</LinearLayout>
<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_communication_menu"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:background="@drawable/ic_communication_menu" />
</LinearLayout>
<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_setting"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:background="@drawable/ic_operation_setting"
android:onClick="onClickSetting" />
</LinearLayout>
</LinearLayout>
</LinearLayout> </LinearLayout>
\ No newline at end of file
...@@ -179,15 +179,6 @@ ...@@ -179,15 +179,6 @@
android:background="@drawable/ic_operation_task_list" android:background="@drawable/ic_operation_task_list"
android:layout_marginRight="10dp" android:layout_marginRight="10dp"
android:visibility="gone" /> android:visibility="gone" />
<ImageButton
android:id="@+id/btn_help"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/ic_operation_help"
android:layout_marginRight="10dp"
android:visibility="gone"
android:onClick="onClickShowHelpView"/>
</LinearLayout> </LinearLayout>
</RelativeLayout> </RelativeLayout>
......
...@@ -184,15 +184,6 @@ ...@@ -184,15 +184,6 @@
android:background="@drawable/ic_operation_task_list" android:background="@drawable/ic_operation_task_list"
android:layout_marginRight="10dp" android:layout_marginRight="10dp"
android:visibility="gone" /> android:visibility="gone" />
<ImageButton
android:id="@+id/btn_help"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/ic_operation_help"
android:layout_marginRight="10dp"
android:visibility="gone"
android:onClick="onClickShowHelpView"/>
</LinearLayout> </LinearLayout>
</RelativeLayout> </RelativeLayout>
......
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/related_content_main_linear"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:background="@color/basic_white1"
android:clickable="true" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<FrameLayout
android:id="@+id/operation_related_content_toolbar"
style="@style/ToolBarHolo"
android:minHeight="50dp"
android:background="@color/operation_color"
android:gravity="center" >
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="left|center"
android:gravity="left|center" >
<ImageButton
android:id="@+id/btn_operation_home"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="20dp"
android:background="@drawable/ic_operation_home"
android:contentDescription="@null" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center" >
<TextView
android:id="@+id/txt_operation_related_content"
style="@style/txt_menu"
android:layout_centerVertical="true"
android:text="@string/operation_related_content"
android:textColor="@color/text_dialog"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right|center"
android:gravity="right|center" >
<ImageButton
android:id="@+id/btn_operation_help"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginRight="10dp"
android:background="@drawable/ic_operation_help"
android:contentDescription="@null"
android:onClick="onClickShowHelpView"/>
</LinearLayout>
</FrameLayout>
<LinearLayout
android:id="@+id/ll_operation_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="10dp"
android:paddingTop="10dp"
android:paddingBottom="10dp"
android:paddingRight="10dp" >
<TextView
android:id="@+id/txt_operation_name"
style="@style/txt_menu"
android:gravity="left"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:ellipsize="end"
android:singleLine="true"
android:textColor="@color/edt_text"
android:textSize="@dimen/app_large_text_size"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:id="@+id/linear_full_border"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/border"
android:orientation="vertical" >
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:layout_marginRight="20dp"
android:orientation="vertical" >
<Button
android:id="@+id/btn_all_save"
style="@style/ButtonABookDark"
android:layout_width="140dp"
android:layout_height="30dp"
android:layout_gravity="right|center"
android:gravity="center"
android:background="@drawable/operation_radius_frame"
android:text="@string/save_all" />
</LinearLayout>
</LinearLayout>
<ListView
android:id="@+id/lv_content_list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:divider="@null" />
</LinearLayout>
</LinearLayout>
\ No newline at end of file
...@@ -147,22 +147,11 @@ ...@@ -147,22 +147,11 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@drawable/ic_operation_task_list" android:background="@drawable/ic_operation_task_list"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:layout_toLeftOf="@+id/btn_help" android:layout_alignParentRight="true"
android:layout_marginRight="10dp" android:layout_marginRight="10dp"
android:visibility="gone" /> android:visibility="gone" />
<ImageButton <ImageButton
android:id="@+id/btn_help"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/ic_operation_help"
android:layout_centerVertical="true"
android:layout_alignParentRight="true"
android:layout_marginRight="5dp"
android:visibility="gone"
android:onClick="onClickShowHelpView"/>
<ImageButton
android:id="@+id/btn_exitMeeting" android:id="@+id/btn_exitMeeting"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
......
...@@ -124,7 +124,7 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity { ...@@ -124,7 +124,7 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
protected TextView operationNameTitle; protected TextView operationNameTitle;
protected Button operationHomeButton; protected Button operationHomeButton;
protected ImageButton taskListButton; protected ImageButton taskListButton;
protected ImageButton helpButton; // protected ImageButton helpButton;
protected boolean isPageFinished; protected boolean isPageFinished;
protected Double latitude; protected Double latitude;
...@@ -462,9 +462,9 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity { ...@@ -462,9 +462,9 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
subMenuBtn.setLayoutParams(params); subMenuBtn.setLayoutParams(params);
exitMeetingBtn.setVisibility(View.VISIBLE); exitMeetingBtn.setVisibility(View.VISIBLE);
if (helpButton != null && helpButton.getVisibility() == View.VISIBLE) { // if (helpButton != null && helpButton.getVisibility() == View.VISIBLE) {
helpButton.setLayoutParams(params); // helpButton.setLayoutParams(params);
} // }
} }
else { // 会議室退室ボタン非表示 else { // 会議室退室ボタン非表示
exitMeetingBtn.setVisibility(View.GONE); exitMeetingBtn.setVisibility(View.GONE);
...@@ -474,9 +474,9 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity { ...@@ -474,9 +474,9 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
params.rightMargin = (int) (getResources().getDisplayMetrics().density * 5); params.rightMargin = (int) (getResources().getDisplayMetrics().density * 5);
subMenuBtn.setLayoutParams(params); subMenuBtn.setLayoutParams(params);
if (helpButton != null && helpButton.getVisibility() == View.VISIBLE) { // if (helpButton != null && helpButton.getVisibility() == View.VISIBLE) {
helpButton.setLayoutParams(params); // helpButton.setLayoutParams(params);
} // }
} }
} }
}); });
...@@ -793,78 +793,78 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity { ...@@ -793,78 +793,78 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
*/ */
protected void onActionOperationPdfWebView(Map<String, String> checkParam, OperationTaskDto operationTaskDto) {} protected void onActionOperationPdfWebView(Map<String, String> checkParam, OperationTaskDto operationTaskDto) {}
public void onClickShowHelpView(View v) { // public void onClickShowHelpView(View v) {
int helpViewType = 0; // int helpViewType = 0;
switch (mStatusCode) { // switch (mStatusCode) {
case Constant.XWalkWebViewDisplayStatus.InitView: // case Constant.XWalkWebViewDisplayStatus.InitView:
if (mXWalkOpenType == Constant.XWalkOpenType.PANO_EDIT) { // if (mXWalkOpenType == Constant.XWalkOpenType.PANO_EDIT) {
helpViewType = Constant.HelpViewType.PanoContentEdit; // helpViewType = Constant.HelpViewType.PanoContentEdit;
} else { // } else {
switch (mOperationType) { // switch (mOperationType) {
case OperationType.LIST: // case OperationType.LIST:
switch (mXWalkOpenType) { // switch (mXWalkOpenType) {
case Constant.XWalkOpenType.TASK_DERECTION: // case Constant.XWalkOpenType.TASK_DERECTION:
helpViewType = Constant.HelpViewType.ListOperationDirector; // helpViewType = Constant.HelpViewType.ListOperationDirector;
break; // break;
case Constant.XWalkOpenType.TASK_REPORT: // case Constant.XWalkOpenType.TASK_REPORT:
if (operationDto.reportType == Constant.ReportType.RoutineTask) { // if (operationDto.reportType == Constant.ReportType.RoutineTask) {
helpViewType = Constant.HelpViewType.RoutineTaskOperation; // helpViewType = Constant.HelpViewType.RoutineTaskOperation;
} else { // } else {
helpViewType = Constant.HelpViewType.ListOperationReporter; // helpViewType = Constant.HelpViewType.ListOperationReporter;
} // }
break; // break;
} // }
break; // break;
case OperationType.DRAWING: // case OperationType.DRAWING:
case OperationType.PDF: // case OperationType.PDF:
switch (mXWalkOpenType) { // switch (mXWalkOpenType) {
case Constant.XWalkOpenType.TASK_DERECTION: // case Constant.XWalkOpenType.TASK_DERECTION:
helpViewType = Constant.HelpViewType.DrawingOperationDirector; // helpViewType = Constant.HelpViewType.DrawingOperationDirector;
break; // break;
case Constant.XWalkOpenType.TASK_REPORT: // case Constant.XWalkOpenType.TASK_REPORT:
helpViewType = Constant.HelpViewType.DrawingOperationReporter; // helpViewType = Constant.HelpViewType.DrawingOperationReporter;
break; // break;
} // }
break; // break;
case OperationType.PANO: // case OperationType.PANO:
switch (mXWalkOpenType) { // switch (mXWalkOpenType) {
case Constant.XWalkOpenType.TASK_DERECTION: // case Constant.XWalkOpenType.TASK_DERECTION:
helpViewType = Constant.HelpViewType.PanoOperationDirector; // helpViewType = Constant.HelpViewType.PanoOperationDirector;
break; // break;
case Constant.XWalkOpenType.TASK_REPORT: // case Constant.XWalkOpenType.TASK_REPORT:
helpViewType = Constant.HelpViewType.PanoOperationReporter; // helpViewType = Constant.HelpViewType.PanoOperationReporter;
break; // break;
} // }
//
break; // break;
} // }
} // }
break; // break;
case Constant.XWalkWebViewDisplayStatus.TaskView: // case Constant.XWalkWebViewDisplayStatus.TaskView:
if (mXWalkOpenType == Constant.XWalkOpenType.TASK_DERECTION) { // if (mXWalkOpenType == Constant.XWalkOpenType.TASK_DERECTION) {
helpViewType = Constant.HelpViewType.DirectorTask; // helpViewType = Constant.HelpViewType.DirectorTask;
} else if (mXWalkOpenType == Constant.XWalkOpenType.TASK_REPORT) { // } else if (mXWalkOpenType == Constant.XWalkOpenType.TASK_REPORT) {
if (operationDto.reportType == Constant.ReportType.RoutineTask) { // if (operationDto.reportType == Constant.ReportType.RoutineTask) {
helpViewType = Constant.HelpViewType.RoutineTaskOperationReport; // helpViewType = Constant.HelpViewType.RoutineTaskOperationReport;
} else { // } else {
helpViewType = Constant.HelpViewType.ReportTask; // helpViewType = Constant.HelpViewType.ReportTask;
} // }
} // }
break; // break;
case Constant.XWalkWebViewDisplayStatus.ReportPreView: // case Constant.XWalkWebViewDisplayStatus.ReportPreView:
helpViewType = Constant.HelpViewType.ReportPreview; // helpViewType = Constant.HelpViewType.ReportPreview;
break; // break;
case Constant.XWalkWebViewDisplayStatus.TaskListView: // case Constant.XWalkWebViewDisplayStatus.TaskListView:
if (mXWalkOpenType == Constant.XWalkOpenType.TASK_DERECTION) { // if (mXWalkOpenType == Constant.XWalkOpenType.TASK_DERECTION) {
helpViewType = Constant.HelpViewType.DirectorTaskList; // helpViewType = Constant.HelpViewType.DirectorTaskList;
} else if (mXWalkOpenType == Constant.XWalkOpenType.TASK_REPORT) { // } else if (mXWalkOpenType == Constant.XWalkOpenType.TASK_REPORT) {
helpViewType = Constant.HelpViewType.ReportTaskList; // helpViewType = Constant.HelpViewType.ReportTaskList;
} // }
break; // break;
} // }
//
showHelpViewDialog(helpViewType); // showHelpViewDialog(helpViewType);
} // }
public void commonShouldOverrideUrlLoading (Uri uri, OperationTaskDto operationTaskDto) { public void commonShouldOverrideUrlLoading (Uri uri, OperationTaskDto operationTaskDto) {
Logger.d(TAG, "Uri : %s", uri); Logger.d(TAG, "Uri : %s", uri);
......
...@@ -3,6 +3,7 @@ package jp.agentec.abook.abv.ui.common.activity; ...@@ -3,6 +3,7 @@ package jp.agentec.abook.abv.ui.common.activity;
import jp.agentec.abook.abv.bl.acms.type.DownloadStatusType; import jp.agentec.abook.abv.bl.acms.type.DownloadStatusType;
import jp.agentec.abook.abv.bl.common.ABVEnvironment; import jp.agentec.abook.abv.bl.common.ABVEnvironment;
import jp.agentec.abook.abv.bl.common.CommonExecutor; import jp.agentec.abook.abv.bl.common.CommonExecutor;
import jp.agentec.abook.abv.bl.common.Constant;
import jp.agentec.abook.abv.bl.common.exception.ABVException; import jp.agentec.abook.abv.bl.common.exception.ABVException;
import jp.agentec.abook.abv.bl.common.exception.ABVExceptionCode; import jp.agentec.abook.abv.bl.common.exception.ABVExceptionCode;
import jp.agentec.abook.abv.bl.common.exception.AcmsException; import jp.agentec.abook.abv.bl.common.exception.AcmsException;
...@@ -10,38 +11,63 @@ import jp.agentec.abook.abv.bl.common.exception.NetworkDisconnectedException; ...@@ -10,38 +11,63 @@ import jp.agentec.abook.abv.bl.common.exception.NetworkDisconnectedException;
import jp.agentec.abook.abv.bl.common.log.Logger; import jp.agentec.abook.abv.bl.common.log.Logger;
import jp.agentec.abook.abv.bl.data.ABVDataCache; import jp.agentec.abook.abv.bl.data.ABVDataCache;
import jp.agentec.abook.abv.bl.data.dao.AbstractDao; import jp.agentec.abook.abv.bl.data.dao.AbstractDao;
import jp.agentec.abook.abv.bl.data.dao.OperationDao;
import jp.agentec.abook.abv.bl.download.ContentDownloader; import jp.agentec.abook.abv.bl.download.ContentDownloader;
import jp.agentec.abook.abv.bl.download.ContentFileExtractor; import jp.agentec.abook.abv.bl.download.ContentFileExtractor;
import jp.agentec.abook.abv.bl.download.ContentZipDownloadNotification; import jp.agentec.abook.abv.bl.download.ContentZipDownloadNotification;
import jp.agentec.abook.abv.bl.dto.ContentDto; import jp.agentec.abook.abv.bl.dto.ContentDto;
import jp.agentec.abook.abv.bl.dto.FixPushMessageDto;
import jp.agentec.abook.abv.bl.dto.OperationDto;
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.cl.helper.ContentMarkingFileHelper; import jp.agentec.abook.abv.cl.helper.ContentMarkingFileHelper;
import jp.agentec.abook.abv.cl.util.AndroidStringUtil; import jp.agentec.abook.abv.cl.util.AndroidStringUtil;
import jp.agentec.abook.abv.launcher.android.ABVApplication; import jp.agentec.abook.abv.launcher.android.ABVApplication;
import jp.agentec.abook.abv.launcher.android.R; import jp.agentec.abook.abv.launcher.android.R;
import jp.agentec.abook.abv.ui.common.appinfo.AppDefType;
import jp.agentec.abook.abv.ui.common.constant.ErrorCode; import jp.agentec.abook.abv.ui.common.constant.ErrorCode;
import jp.agentec.abook.abv.ui.common.constant.NaviConsts; 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.dialog.ABookAlertDialog;
import jp.agentec.abook.abv.ui.common.helper.ProgressDialogHelper;
import jp.agentec.abook.abv.ui.common.util.ABVToastUtil; import jp.agentec.abook.abv.ui.common.util.ABVToastUtil;
import jp.agentec.abook.abv.ui.common.util.AlertDialogUtil; import jp.agentec.abook.abv.ui.common.util.AlertDialogUtil;
import jp.agentec.abook.abv.ui.common.util.KeyboardUtils;
import jp.agentec.abook.abv.ui.common.util.LogUtil; import jp.agentec.abook.abv.ui.common.util.LogUtil;
import jp.agentec.abook.abv.ui.common.view.ABVBatchSyncView; import jp.agentec.abook.abv.ui.common.util.PatternStringUtil;
import jp.agentec.abook.abv.ui.home.activity.ABookSettingActivity; import jp.agentec.abook.abv.ui.home.activity.ABookSettingActivity;
import jp.agentec.abook.abv.ui.home.adapter.FixPushMessageAdapter;
import jp.agentec.abook.abv.ui.home.adapter.OperationSelectAdapter;
import jp.agentec.abook.abv.ui.home.adapter.PushMessageListAdapter;
import jp.agentec.abook.abv.ui.home.helper.ActivityHandlingHelper; import jp.agentec.abook.abv.ui.home.helper.ActivityHandlingHelper;
import jp.agentec.adf.util.DateTimeFormat;
import jp.agentec.adf.util.DateTimeUtil;
import android.app.Dialog;
import android.content.DialogInterface; import android.content.DialogInterface;
import android.content.Intent; import android.content.Intent;
import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
import android.view.KeyEvent; import android.view.KeyEvent;
import android.view.View;
import android.view.Window;
import android.view.animation.Animation; import android.view.animation.Animation;
import android.view.animation.LinearInterpolator; import android.view.animation.LinearInterpolator;
import android.view.animation.RotateAnimation; import android.view.animation.RotateAnimation;
import android.widget.AdapterView;
import android.widget.EditText;
import android.widget.ImageButton;
import android.widget.ImageView; import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.RadioGroup;
import android.widget.TextView; import android.widget.TextView;
import android.widget.Toast; import android.widget.Toast;
import com.handmark.pulltorefresh.library.PullToRefreshBase; import com.handmark.pulltorefresh.library.PullToRefreshBase;
import java.nio.charset.StandardCharsets;
import java.util.List;
public abstract class ABVUIActivity extends ABVAuthenticatedActivity { public abstract class ABVUIActivity extends ABVAuthenticatedActivity {
private final static String TAG = "ABVUIActivity"; private final static String TAG = "ABVUIActivity";
...@@ -50,6 +76,21 @@ public abstract class ABVUIActivity extends ABVAuthenticatedActivity { ...@@ -50,6 +76,21 @@ public abstract class ABVUIActivity extends ABVAuthenticatedActivity {
protected TextView mUpdatedDate; // add by jang protected TextView mUpdatedDate; // add by jang
protected TextView mLoadingText; // add by jang; protected TextView mLoadingText; // add by jang;
private Dialog mCommunicationMenuDialog;
private Dialog mOperationSelectDialog;
private ListView mOperationSelectListView;
private Dialog mPushMessageListDialog;
private ListView mPushMessageListView;
private OperationSelectAdapter mOperationSelectAdapter;
private PushMessageListAdapter mPushMessageListAdapter;
private ListView mFixPushMessageListView;
private Dialog mPushMessageSendDialog;
private int mSelectedFixPuchMessagePosition;
private int mSendType;
protected PushMessageLogic pushMessageLogic = AbstractLogic.getLogic(PushMessageLogic.class);
// 新着更新処理の終了後、プルダウンを完了させるためのビュー // 新着更新処理の終了後、プルダウンを完了させるためのビュー
protected PullToRefreshBase refreshBaseView; protected PullToRefreshBase refreshBaseView;
...@@ -71,6 +112,9 @@ public abstract class ABVUIActivity extends ABVAuthenticatedActivity { ...@@ -71,6 +112,9 @@ public abstract class ABVUIActivity extends ABVAuthenticatedActivity {
startRefresh = true; startRefresh = true;
ABVEnvironment.getInstance().enableToastMessage = true; ABVEnvironment.getInstance().enableToastMessage = true;
// dateFormat ="yyyy'" + getResources().getString(R.string.date_format_year) + "'MM'" + getResources().getString(R.string.date_format_month) + "'dd'" + getResources().getString(R.string.date_format_day) + "'HH:mm:ss"; // dateFormat ="yyyy'" + getResources().getString(R.string.date_format_year) + "'MM'" + getResources().getString(R.string.date_format_month) + "'dd'" + getResources().getString(R.string.date_format_day) + "'HH:mm:ss";
mSelectedFixPuchMessagePosition = 0;
mSendType = 0;
} }
//更新する場合中止させる。 //更新する場合中止させる。
...@@ -480,8 +524,405 @@ public abstract class ABVUIActivity extends ABVAuthenticatedActivity { ...@@ -480,8 +524,405 @@ public abstract class ABVUIActivity extends ABVAuthenticatedActivity {
Intent intent = new Intent(); Intent intent = new Intent();
intent.setClassName(getApplicationContext().getPackageName(), ABookSettingActivity.class.getName()); intent.setClassName(getApplicationContext().getPackageName(), ABookSettingActivity.class.getName());
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
// 設定画面の前のActivityを保存する(設定画面から戻る用)
ActivityHandlingHelper.getInstance().setPreviousOfSettingActivity(this);
startActivity(intent); startActivity(intent);
// ※ 設定画面からログアウトした場合、このActivityも残らないようにfinishして遷移する // ※ 設定画面からログアウトした場合、このActivityも残らないようにfinishして遷移する
finish(); finish();
} }
/**
* コミュニケーションメニューダイアログ
*/
public void showCommunicationMenuDialog() {
mCommunicationMenuDialog = new Dialog(this);
mCommunicationMenuDialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
mCommunicationMenuDialog.setCanceledOnTouchOutside(false);
mCommunicationMenuDialog.setContentView(R.layout.communication_menu_dialog);
List<PushMessageDto> pushMessageDtoList = pushMessageLogic.getAllPushMessageList();
boolean existUnreadFlg = false;
for (PushMessageDto pushMessageDto : pushMessageDtoList) {
if (!pushMessageDto.readingFlg) {
existUnreadFlg = true;
break;
}
}
ImageView ivIcon = (ImageView)mCommunicationMenuDialog.findViewById(R.id.btn_push_message_list);
if (existUnreadFlg) {
ivIcon.setBackgroundResource(R.drawable.ic_communication_push_message_list_with_badge);
} else {
ivIcon.setBackgroundResource(R.drawable.ic_communication_push_message_list);
}
LinearLayout ll_menuItem_meeting = (LinearLayout)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();
}
});
LinearLayout ll_menuItem_push_message = (LinearLayout)mCommunicationMenuDialog.findViewById(R.id.ll_item_push_message);
ll_menuItem_push_message.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
showOperationSelectDialog();
mCommunicationMenuDialog.dismiss();
}
});
LinearLayout ll_menuItem_push_message_list = (LinearLayout)mCommunicationMenuDialog.findViewById(R.id.ll_item_push_message_list);
ll_menuItem_push_message_list.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
showPushMessageListDialog();
mCommunicationMenuDialog.dismiss();
}
});
mCommunicationMenuDialog.findViewById(R.id.close_btn).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mCommunicationMenuDialog.dismiss();
}
});
mCommunicationMenuDialog.show();
}
private void showOperationSelectDialog() {
OperationDao operationDao = AbstractDao.getDao(OperationDao.class);
mOperationSelectDialog = new Dialog(this);
mOperationSelectDialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
mOperationSelectDialog.setCanceledOnTouchOutside(false);
mOperationSelectDialog.setContentView(R.layout.operation_select_dialog);
mOperationSelectListView = (ListView) mOperationSelectDialog.findViewById(R.id.lv_operation_select);
List<OperationDto> operationDtoList = operationDao.getAllOperation();
mOperationSelectAdapter = new OperationSelectAdapter(this, operationDtoList);
mOperationSelectListView.setAdapter(mOperationSelectAdapter);
mOperationSelectListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
OperationDto operationDto = mOperationSelectAdapter.getItem(position);
showPushMessageSendDialog(operationDto);
mOperationSelectDialog.dismiss();
}
});
// リソースパターンを適用
TextView operationSelect = (TextView) mOperationSelectDialog.findViewById(R.id.tv_toolbar_title);
operationSelect.setText(PatternStringUtil.patternToInt(getApplicationContext(),
R.string.operation_select,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
mOperationSelectDialog.findViewById(R.id.close_btn).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mOperationSelectDialog.dismiss();
}
});
mOperationSelectDialog.show();
}
/**
* プッシュメッセージダイアログ表示
*/
private void showPushMessageListDialog() {
mPushMessageListDialog = new Dialog(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 = pushMessageLogic.getAllPushMessageList();
mPushMessageListAdapter = new PushMessageListAdapter(this, pushMessageDtoList);
mPushMessageListView.setAdapter(mPushMessageListAdapter);
mPushMessageListAdapter.setAdapterListener(new PushMessageListAdapter.PushMessageListAdapterListener() {
@Override
public void onDetailView(final PushMessageDto dto) {
showPushMessageDetailView(dto);
}
});
mPushMessageListView.invalidate();
mPushMessageListView.setClickable(false);
mPushMessageListDialog.findViewById(R.id.back_btn).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
List<PushMessageDto> pushMessageDtoList = pushMessageLogic.getAllPushMessageList();
mPushMessageListAdapter.setItem(pushMessageDtoList);
showPushMessgeListView(true);
}
});
mPushMessageListDialog.findViewById(R.id.close_btn).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mPushMessageListDialog.dismiss();
}
});
showPushMessgeListView(true);
mPushMessageListDialog.show();
}
// プッシュメッセージの詳細表示
private void showPushMessageDetailView(final PushMessageDto dto) {
dto.readingFlg = true;
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);
TextView sendUserTextView = (TextView)mPushMessageListDialog.findViewById(R.id.tv_send_user);
messageTextView.setText(dto.pushMessage);
sendDateTextView.setText(DateTimeUtil.toString(dto.pushSendDate, DateTimeFormat.yyyyMMddHHmm_slash));
sendOperationNameTextView.setText(dto.operationName);
sendUserTextView.setText(dto.pushSendLoginId);
pushMessageLogic.updateReadingFlg(dto.pushMessageId);
showPushMessgeListView(false);
}
// プッシュメッセージの一覧表示
private void showPushMessgeListView(boolean pushMessageListViewFlg) {
TextView titleTextView = (TextView)mPushMessageListDialog.findViewById(R.id.tv_toolbar_title);
if (pushMessageListViewFlg) {
mPushMessageListView.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 {
mPushMessageListView.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)));
}
}
/**
* プッシュメッセージ送信ダイヤログ表示
*/
private void showPushMessageSendDialog(final OperationDto operationDto) {
mPushMessageSendDialog = new Dialog(this);
mPushMessageSendDialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
mPushMessageSendDialog.setCanceledOnTouchOutside(false);
mPushMessageSendDialog.setContentView(R.layout.push_message_send_dialog);
mFixPushMessageListView = (ListView) mPushMessageSendDialog.findViewById(R.id.listView);
mPushMessageSendDialog.findViewById(R.id.back_btn).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
showOperationSelectDialog();
mPushMessageSendDialog.dismiss();
}
});
mPushMessageSendDialog.findViewById(R.id.close_btn).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mPushMessageSendDialog.dismiss();
}
});
mPushMessageSendDialog.findViewById(R.id.send_btn).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
sendPushMessageRequest(operationDto.operationId);
}
});
RadioGroup searchTarget = (RadioGroup) mPushMessageSendDialog.findViewById(R.id.send_target_group);
searchTarget.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(RadioGroup group, int checkedId) {
if (checkedId == R.id.in_gourp) {
mSendType = Constant.PushMessageSendType.InGroup;
} else {
mSendType = Constant.PushMessageSendType.AllOperation;
}
}
});
mPushMessageSendDialog.findViewById(R.id.fix_push_message_layout).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
showFixPushMessageView();
}
});
TextView messageTitleTextView = (TextView) mPushMessageSendDialog.findViewById(R.id.message_title);
// リソースパターンの適用
messageTitleTextView.setText(PatternStringUtil.patternToString(getApplicationContext(),
R.string.free_input,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)) + " > ");
TextView tvOperationName = (TextView) mPushMessageSendDialog.findViewById(R.id.operation_name);
tvOperationName.setText(operationDto.operationName);
mPushMessageSendDialog.show();
}
/**
* プッシュメッセージ送信画面、定型文一覧画面切り替え
* @param sendPushMessageViewFlg (true : プッシュメッセージ送信画面、false : 定型文一覧画面)
*/
private void showSendPushMessgeView(boolean sendPushMessageViewFlg) {
if (sendPushMessageViewFlg) {
mFixPushMessageListView.setVisibility(View.GONE);
mPushMessageSendDialog.findViewById(R.id.back_btn).setVisibility(View.GONE);
mPushMessageSendDialog.findViewById(R.id.push_send_layout).setVisibility(View.VISIBLE);
mPushMessageSendDialog.findViewById(R.id.close_btn).setVisibility(View.VISIBLE);
EditText messageEditText = (EditText) mPushMessageSendDialog.findViewById(R.id.message);
KeyboardUtils.show(this, messageEditText);
} else {
mFixPushMessageListView.setVisibility(View.VISIBLE);
mPushMessageSendDialog.findViewById(R.id.back_btn).setVisibility(View.VISIBLE);
mPushMessageSendDialog.findViewById(R.id.push_send_layout).setVisibility(View.GONE);
mPushMessageSendDialog.findViewById(R.id.close_btn).setVisibility(View.GONE);
}
}
/**
* プッシュメッセージ送信依頼
*/
private void sendPushMessageRequest(long operationId) {
if (!ABVEnvironment.getInstance().networkAdapter.isNetworkConnected()) {
ABVToastUtil.showMakeText(this, R.string.request_network_connection, Toast.LENGTH_SHORT);
return;
}
//文字列チェック
EditText messageEditText = (EditText) mPushMessageSendDialog.findViewById(R.id.message);
String message = messageEditText.getText().toString();
String checkMessage = message.replace(" ", "");
if (checkMessage.length() == 0) {
// リソースパターンの適用
ABVToastUtil.showMakeText(this, PatternStringUtil.patternToString(getApplicationContext(),
R.string.push_message_input_null,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), Toast.LENGTH_SHORT);
return;
}
byte[] messageByte = message.getBytes(StandardCharsets.UTF_8);
if (messageByte.length >= 207) {
// リソースパターンの適用
ABVToastUtil.showMakeText(this, PatternStringUtil.patternToString(getApplicationContext(),
R.string.push_message_input_over,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), Toast.LENGTH_SHORT);
return;
}
// リソースパターンの適用
ProgressDialogHelper.showProgressPopup(this, true, PatternStringUtil.patternToString(getApplicationContext(),
R.string.file_initialization,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
try {
boolean result = pushMessageLogic.sendPushMessageRequest(mSendType, message, operationId);
if (result) {
mPushMessageSendDialog.dismiss();
// リソースパターンの適用
ABVToastUtil.showMakeText(this, PatternStringUtil.patternToString(getApplicationContext(),
R.string.push_message_send_success,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), Toast.LENGTH_SHORT);
} else {
// リソースパターンの適用
ABVToastUtil.showMakeText(this, PatternStringUtil.patternToString(getApplicationContext(),
R.string.push_message_send_fail,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), Toast.LENGTH_SHORT);
}
} catch (Exception e) {
Logger.e(TAG, e);
// リソースパターンの適用
ABVToastUtil.showMakeText(this, PatternStringUtil.patternToString(getApplicationContext(),
R.string.push_message_send_fail,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), Toast.LENGTH_SHORT);
} finally {
ProgressDialogHelper.closeProgressPopup();
}
}
private void showFixPushMessageView() {
if (!ABVEnvironment.getInstance().networkAdapter.isNetworkConnected()) {
ABVToastUtil.showMakeText(this, R.string.request_network_connection, Toast.LENGTH_SHORT);
return;
}
EditText messageEditText = (EditText) mPushMessageSendDialog.findViewById(R.id.message);
KeyboardUtils.hide(this, messageEditText);
// リソースパターンの適用
ProgressDialogHelper.showProgressPopup(this, true, PatternStringUtil.patternToString(getApplicationContext(),
R.string.file_initialization,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
try {
List<FixPushMessageDto> fixPushMessageList = pushMessageLogic.getFixPushMessage();
FixPushMessageDto dto = new FixPushMessageDto();
// リソースパターンの適用
dto.name = PatternStringUtil.patternToString(getApplicationContext(),
R.string.free_input,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0));
fixPushMessageList.add(0, dto);
mFixPushMessageListView.setAdapter(new FixPushMessageAdapter(this, fixPushMessageList, mSelectedFixPuchMessagePosition));
mFixPushMessageListView.invalidate();
mFixPushMessageListView.setClickable(true);
mFixPushMessageListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
mSelectedFixPuchMessagePosition = position;
FixPushMessageDto item = (FixPushMessageDto)parent.getItemAtPosition(position);
TextView messageTitleTextView = (TextView) mPushMessageSendDialog.findViewById(R.id.message_title);
messageTitleTextView.setText(item.name + " > ");
EditText messageEditText = (EditText) mPushMessageSendDialog.findViewById(R.id.message);
messageEditText.setText(item.value);
messageEditText.setSelection(messageEditText.getText().length());
showSendPushMessgeView(true);
}
});
showSendPushMessgeView(false);
} catch (Exception e) {
Logger.e(TAG, e);
// リソースパターンの適用
ABVToastUtil.showMakeText(this, PatternStringUtil.patternToString(getApplicationContext(),
R.string.respons_fix_push_message_fail,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), Toast.LENGTH_SHORT);
} finally {
ProgressDialogHelper.closeProgressPopup();
}
}
// コミュニケーションのアイコン設定(未既読があれば、バッチ付きアイコンでセット)
protected void setCommunicationImageButton(ImageButton communicationButton) {
List<PushMessageDto> pushMessageDtoList = pushMessageLogic.getAllPushMessageList();
boolean existUnreadFlg = false;
for (PushMessageDto pushMessageDto : pushMessageDtoList) {
if (!pushMessageDto.readingFlg) {
existUnreadFlg = true;
break;
}
}
communicationButton.setImageResource(existUnreadFlg ? R.drawable.ic_communication_menu_with_badge : R.drawable.ic_communication_menu);
}
} }
...@@ -16,6 +16,8 @@ import jp.agentec.abook.abv.bl.common.ABVEnvironment; ...@@ -16,6 +16,8 @@ import jp.agentec.abook.abv.bl.common.ABVEnvironment;
import jp.agentec.abook.abv.bl.common.log.Logger; import jp.agentec.abook.abv.bl.common.log.Logger;
import jp.agentec.abook.abv.bl.download.ContentFileExtractor; import jp.agentec.abook.abv.bl.download.ContentFileExtractor;
import jp.agentec.abook.abv.launcher.android.R; import jp.agentec.abook.abv.launcher.android.R;
import jp.agentec.abook.abv.ui.common.activity.ABVUIActivity;
import jp.agentec.abook.abv.ui.home.helper.ActivityHandlingHelper;
import jp.agentec.adf.util.FileUtil; import jp.agentec.adf.util.FileUtil;
public class ABookSettingActivity extends PreferenceActivity { public class ABookSettingActivity extends PreferenceActivity {
...@@ -69,7 +71,8 @@ public class ABookSettingActivity extends PreferenceActivity { ...@@ -69,7 +71,8 @@ public class ABookSettingActivity extends PreferenceActivity {
} }
private void backToHome() { private void backToHome() {
Intent intent = new Intent(getApplicationContext(), OperationListActivity.class); ABVUIActivity activity = ActivityHandlingHelper.getInstance().getPreviousOfSettingActivity();
Intent intent = new Intent(this, (activity != null ? activity.getClass() : OperationListActivity.class));
intent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP); intent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
startActivity(intent); startActivity(intent);
......
...@@ -98,6 +98,7 @@ import jp.agentec.abook.abv.ui.common.appinfo.AppDefType; ...@@ -98,6 +98,7 @@ import jp.agentec.abook.abv.ui.common.appinfo.AppDefType;
import jp.agentec.abook.abv.ui.common.appinfo.AppDefType.ViewMode; import jp.agentec.abook.abv.ui.common.appinfo.AppDefType.ViewMode;
import jp.agentec.abook.abv.ui.common.constant.ErrorCode; import jp.agentec.abook.abv.ui.common.constant.ErrorCode;
import jp.agentec.abook.abv.ui.common.constant.ErrorMessage; import jp.agentec.abook.abv.ui.common.constant.ErrorMessage;
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.dialog.ABookAlertDialog;
import jp.agentec.abook.abv.ui.common.helper.ProgressDialogHelper; import jp.agentec.abook.abv.ui.common.helper.ProgressDialogHelper;
import jp.agentec.abook.abv.ui.common.util.ABVToastUtil; import jp.agentec.abook.abv.ui.common.util.ABVToastUtil;
...@@ -162,27 +163,13 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -162,27 +163,13 @@ public class OperationListActivity extends ABVUIActivity {
private OperationGroupMasterLogic mOperationGroupMasterLogic = AbstractLogic.getLogic(OperationGroupMasterLogic.class); private OperationGroupMasterLogic mOperationGroupMasterLogic = AbstractLogic.getLogic(OperationGroupMasterLogic.class);
private TaskDao mTaskDao = AbstractDao.getDao(TaskDao.class); private TaskDao mTaskDao = AbstractDao.getDao(TaskDao.class);
private PushMessageLogic mPushMessageLogic = AbstractLogic.getLogic(PushMessageLogic.class);
private ImageView mPanoCotnentImageView; private ImageView mPanoCotnentImageView;
private TextView mPanoContentNameTextView; private TextView mPanoContentNameTextView;
private Uri mSelectPanoContentUri; private Uri mSelectPanoContentUri;
private final static int ABOOK_CHECK_OPERATION_PANO_CONTENT_IMAGE = 201; private final static int ABOOK_CHECK_OPERATION_PANO_CONTENT_IMAGE = 201;
private Dialog mCommunicationMenuDialog;
private Dialog mOperationSelectDialog;
private ListView mOperationSelectListView;
private Dialog mPushMessageListDialog;
private ListView mPushMessageListView;
private OperationSelectAdapter mOperationSelectAdapter;
private PushMessageListAdapter mPushMessageListAdapter;
private File mLocalFile; private File mLocalFile;
private boolean activityResultFlg; private boolean activityResultFlg;
private ListView mFixPushMessageListView;
private Dialog mPushMessageSendDialog;
private int mSelectedFixPuchMessagePosition;
private int mSendType;
private OperationListHelper mListHelper = null; private OperationListHelper mListHelper = null;
...@@ -237,6 +224,10 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -237,6 +224,10 @@ public class OperationListActivity extends ABVUIActivity {
// 定期点検で同期ボタンタップの日付と現在の日付が異なる且つ、作業するデータが存在しない場合、needSyncFlgをtrueに更新 // 定期点検で同期ボタンタップの日付と現在の日付が異なる且つ、作業するデータが存在しない場合、needSyncFlgをtrueに更新
updateNeedSyncRoutineOperation(); updateNeedSyncRoutineOperation();
// 非活性化する(ホーム画面ではホームボタンが必要ないため)
ImageButton operationHomeButton = (ImageButton) findViewById(R.id.btn_operation_home);
operationHomeButton.setEnabled(false);
// ビュー変更ボタンのタッチイベント // ビュー変更ボタンのタッチイベント
mViewModeButton.setOnClickListener(new View.OnClickListener() { mViewModeButton.setOnClickListener(new View.OnClickListener() {
@Override @Override
...@@ -261,9 +252,6 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -261,9 +252,6 @@ public class OperationListActivity extends ABVUIActivity {
} }
}); });
mSelectedFixPuchMessagePosition = 0;
mSendType = 0;
// コミュニケーションボタン // コミュニケーションボタン
mCommunicationButton.setOnClickListener(new View.OnClickListener() { mCommunicationButton.setOnClickListener(new View.OnClickListener() {
@Override @Override
...@@ -369,34 +357,13 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -369,34 +357,13 @@ public class OperationListActivity extends ABVUIActivity {
private void showCommonContent() { private void showCommonContent() {
Intent intent = new Intent(); Intent intent = new Intent();
intent.setClass(OperationListActivity.this, OperationRelatedContentActivity.class); intent.setClass(OperationListActivity.this, OperationRelatedContentActivity.class);
startActivity(intent); startActivity(intent, NaviConsts.Right);
} }
private void configurationToolbarIcon() { private void configurationToolbarIcon() {
List<PushMessageDto> pushMessageDtoList = mPushMessageLogic.getAllPushMessageList(); // バッチを付けるか判定して、イメージを設定
setCommunicationImageButton(mCommunicationButton);
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));
}
if (mOperationLogic.isExistCommonContent()) {
mCommonContentButton.setImageDrawable(getRDrawable(R.drawable.ic_common_content_on));
mCommonContentButton.setEnabled(true);
} else {
mCommonContentButton.setImageDrawable(getRDrawable(R.drawable.ic_common_content_off));
mCommonContentButton.setEnabled(false);
}
// 作業種別表示・非表示 // 作業種別表示・非表示
if (mOperationGroupMasterServiceOperationFlg) { if (mOperationGroupMasterServiceOperationFlg) {
...@@ -404,18 +371,19 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -404,18 +371,19 @@ public class OperationListActivity extends ABVUIActivity {
// アイコンの変更 // アイコンの変更
if (getABVUIDataCache().getOperationGroupMasterMode() == OperationLocationType.CATEGORY) { if (getABVUIDataCache().getOperationGroupMasterMode() == OperationLocationType.CATEGORY) {
setCategoryImage(true);
mOperationTitle.setText(R.string.title_category); mOperationTitle.setText(R.string.title_category);
// 検索ワード削除 // 検索ワード削除
clearSearch(); clearSearch();
// 検索ボタンを無効にする // 検索ボタンを無効にする
mSearchButton.setImageDrawable(getRDrawable(R.drawable.ic_operation_search)); mSearchButton.setEnabled(false);
setEnabledImageButton(mSearchButton, false);
// 一括同期ボタン表示 // 一括同期ボタン表示
mOperationBatchSyncButton.setVisibility(View.VISIBLE); mOperationBatchSyncButton.setVisibility(View.VISIBLE);
} else { } else {
// 全て // 全て
// ボタンを活性化 // 検索ボタンを活性化
setEnabledImageButton(mSearchButton, true); mSearchButton.setEnabled(true);
setCategoryImage(false);
// 一括同期ボタン非表示 // 一括同期ボタン非表示
mOperationBatchSyncButton.setVisibility(View.GONE); mOperationBatchSyncButton.setVisibility(View.GONE);
mOperationTitle.setText(R.string.title_all_operation); mOperationTitle.setText(R.string.title_all_operation);
...@@ -423,11 +391,17 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -423,11 +391,17 @@ public class OperationListActivity extends ABVUIActivity {
} else { } else {
mOperationTitle.setText(R.string.title_all_operation); mOperationTitle.setText(R.string.title_all_operation);
// アイコン非表示 // アイコン非表示
setCategoryImage(false);
mCategoryLocationButton.setVisibility(View.GONE); mCategoryLocationButton.setVisibility(View.GONE);
// 一括同期ボタンを非表示 // 一括同期ボタンを非表示
mOperationBatchSyncButton.setVisibility(View.GONE); mOperationBatchSyncButton.setVisibility(View.GONE);
// ボタンを活性化 // 検索ボタンを活性化
setEnabledImageButton(mSearchButton, true); mSearchButton.setEnabled(true);
}
// 検索済みの場合、タイトルを「検索結果」にする
if (isSearched()) {
mOperationTitle.setText(R.string.search_result);
} }
} }
...@@ -438,6 +412,12 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -438,6 +412,12 @@ public class OperationListActivity extends ABVUIActivity {
mEndDateStr = null; mEndDateStr = null;
clearData(); clearData();
} }
// 検索済みかどうかチェック
private boolean isSearched() {
return !(StringUtil.isNullOrEmpty(mSearchWord) && StringUtil.isNullOrEmpty(mStartDateStr) && StringUtil.isNullOrEmpty(mEndDateStr));
}
// イメージボタンを無効/有効にする // イメージボタンを無効/有効にする
private void setEnabledImageButton(ImageButton button, boolean enabled) { private void setEnabledImageButton(ImageButton button, boolean enabled) {
if (enabled) { if (enabled) {
...@@ -451,6 +431,11 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -451,6 +431,11 @@ public class OperationListActivity extends ABVUIActivity {
} }
} }
// カテゴリのアイコンイメージ設定
private void setCategoryImage(boolean isCategory) {
mCategoryLocationButton.setImageResource(isCategory ? R.drawable.ic_category_on : R.drawable.ic_category_off);
}
/** /**
* ビューを作り直す。 * ビューを作り直す。
*/ */
...@@ -611,10 +596,13 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -611,10 +596,13 @@ public class OperationListActivity extends ABVUIActivity {
refreshOperationList(); refreshOperationList();
mSearchDialog.dismiss(); mSearchDialog.dismiss();
// リソースパターンの適用 // 検索条件に条件がある場合のみ、件数のトーストメッセージは表示する
ABVToastUtil.showMakeText(OperationListActivity.this, String.format(PatternStringUtil.patternToString(getApplicationContext(), if (isSearched()) {
R.string.operation_search_count, // リソースパターンの適用
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), mListHelper.getOperationCount() + ""), Toast.LENGTH_SHORT); ABVToastUtil.showMakeText(OperationListActivity.this, String.format(PatternStringUtil.patternToString(getApplicationContext(),
R.string.operation_search_count,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), mListHelper.getOperationCount() + ""), Toast.LENGTH_SHORT);
}
} }
}); });
...@@ -916,9 +904,6 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -916,9 +904,6 @@ public class OperationListActivity extends ABVUIActivity {
showSetting(); showSetting();
} }
public void onClickShowHelpView(View v) {
showHelpViewDialog(Constant.HelpViewType.OperationListReporter);
}
/** /**
* 360編集画面表示 * 360編集画面表示
* *
...@@ -1350,378 +1335,6 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -1350,378 +1335,6 @@ public class OperationListActivity extends ABVUIActivity {
} }
} }
private void showCommunicationMenuDialog() {
mCommunicationMenuDialog = new Dialog(OperationListActivity.this);
mCommunicationMenuDialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
mCommunicationMenuDialog.setCanceledOnTouchOutside(false);
mCommunicationMenuDialog.setContentView(R.layout.communication_menu_dialog);
List<PushMessageDto> pushMessageDtoList = mPushMessageLogic.getAllPushMessageList();
boolean existUnreadFlg = false;
for (PushMessageDto pushMessageDto : pushMessageDtoList) {
if (!pushMessageDto.readingFlg) {
existUnreadFlg = true;
break;
}
}
ImageView ivIcon = (ImageView)mCommunicationMenuDialog.findViewById(R.id.btn_push_message_list);
if (existUnreadFlg) {
ivIcon.setBackgroundResource(R.drawable.ic_communication_push_message_list_with_badge);
} else {
ivIcon.setBackgroundResource(R.drawable.ic_communication_push_message_list);
}
LinearLayout ll_menuItem_meeting = (LinearLayout)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();
}
});
LinearLayout ll_menuItem_push_message = (LinearLayout)mCommunicationMenuDialog.findViewById(R.id.ll_item_push_message);
ll_menuItem_push_message.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
showOperationSelectDialog();
mCommunicationMenuDialog.dismiss();
}
});
LinearLayout ll_menuItem_push_message_list = (LinearLayout)mCommunicationMenuDialog.findViewById(R.id.ll_item_push_message_list);
ll_menuItem_push_message_list.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
showPushMessageListDialog();
mCommunicationMenuDialog.dismiss();
}
});
mCommunicationMenuDialog.findViewById(R.id.close_btn).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mCommunicationMenuDialog.dismiss();
}
});
mCommunicationMenuDialog.show();
}
private void showOperationSelectDialog() {
mOperationSelectDialog = new Dialog(OperationListActivity.this);
mOperationSelectDialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
mOperationSelectDialog.setCanceledOnTouchOutside(false);
mOperationSelectDialog.setContentView(R.layout.operation_select_dialog);
mOperationSelectListView = (ListView) mOperationSelectDialog.findViewById(R.id.lv_operation_select);
mOperationSelectAdapter = new OperationSelectAdapter(OperationListActivity.this, mListHelper.getOperationList());
mOperationSelectListView.setAdapter(mOperationSelectAdapter);
mOperationSelectListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
OperationDto operationDto = mOperationSelectAdapter.getItem(position);
showPushMessageSendDialog(operationDto);
mOperationSelectDialog.dismiss();
}
});
// リソースパターンを適用
TextView operationSelect = (TextView) mOperationSelectDialog.findViewById(R.id.tv_toolbar_title);
operationSelect.setText(PatternStringUtil.patternToInt(getApplicationContext(),
R.string.operation_select,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
mOperationSelectDialog.findViewById(R.id.close_btn).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mOperationSelectDialog.dismiss();
}
});
mOperationSelectDialog.show();
}
private 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);
mPushMessageListAdapter.setAdapterListener(new PushMessageListAdapter.PushMessageListAdapterListener() {
@Override
public void onDetailView(final PushMessageDto dto) {
showPushMessageDetailView(dto);
}
});
mPushMessageListView.invalidate();
mPushMessageListView.setClickable(false);
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();
}
});
showPushMessgeListView(true);
mPushMessageListDialog.show();
}
private void showPushMessageDetailView(final PushMessageDto dto) {
dto.readingFlg = true;
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);
TextView sendUserTextView = (TextView)mPushMessageListDialog.findViewById(R.id.tv_send_user);
messageTextView.setText(dto.pushMessage);
sendDateTextView.setText(DateTimeUtil.toString(dto.pushSendDate, DateTimeFormat.yyyyMMddHHmm_slash));
sendOperationNameTextView.setText(dto.operationName);
sendUserTextView.setText(dto.pushSendLoginId);
mPushMessageLogic.updateReadingFlg(dto.pushMessageId);
showPushMessgeListView(false);
}
private void showPushMessgeListView(boolean pushMessageListViewFlg) {
TextView titleTextView = (TextView)mPushMessageListDialog.findViewById(R.id.tv_toolbar_title);
if (pushMessageListViewFlg) {
mPushMessageListView.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 {
mPushMessageListView.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)));
}
}
/**
* プッシュメッセージ送信ダイヤログ表示
*/
private void showPushMessageSendDialog(final OperationDto operationDto) {
mPushMessageSendDialog = new Dialog(OperationListActivity.this);
mPushMessageSendDialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
mPushMessageSendDialog.setCanceledOnTouchOutside(false);
mPushMessageSendDialog.setContentView(R.layout.push_message_send_dialog);
mFixPushMessageListView = (ListView) mPushMessageSendDialog.findViewById(R.id.listView);
mPushMessageSendDialog.findViewById(R.id.back_btn).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
showOperationSelectDialog();
mPushMessageSendDialog.dismiss();
}
});
mPushMessageSendDialog.findViewById(R.id.close_btn).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mPushMessageSendDialog.dismiss();
}
});
mPushMessageSendDialog.findViewById(R.id.send_btn).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
sendPushMessageRequest(operationDto.operationId);
}
});
RadioGroup searchTarget = (RadioGroup) mPushMessageSendDialog.findViewById(R.id.send_target_group);
searchTarget.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(RadioGroup group, int checkedId) {
if (checkedId == R.id.in_gourp) {
mSendType = PushMessageSendType.InGroup;
} else {
mSendType = PushMessageSendType.AllOperation;
}
}
});
mPushMessageSendDialog.findViewById(R.id.fix_push_message_layout).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
showFixPushMessageView();
}
});
TextView messageTitleTextView = (TextView) mPushMessageSendDialog.findViewById(R.id.message_title);
// リソースパターンの適用
messageTitleTextView.setText(PatternStringUtil.patternToString(getApplicationContext(),
R.string.free_input,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)) + " > ");
TextView tvOperationName = (TextView) mPushMessageSendDialog.findViewById(R.id.operation_name);
tvOperationName.setText(operationDto.operationName);
mPushMessageSendDialog.show();
}
/**
* プッシュメッセージ送信画面、定型文一覧画面切り替え
* @param sendPushMessageViewFlg (true : プッシュメッセージ送信画面、false : 定型文一覧画面)
*/
private void showSendPushMessgeView(boolean sendPushMessageViewFlg) {
if (sendPushMessageViewFlg) {
mFixPushMessageListView.setVisibility(View.GONE);
mPushMessageSendDialog.findViewById(R.id.back_btn).setVisibility(View.GONE);
mPushMessageSendDialog.findViewById(R.id.push_send_layout).setVisibility(View.VISIBLE);
mPushMessageSendDialog.findViewById(R.id.close_btn).setVisibility(View.VISIBLE);
EditText messageEditText = (EditText) mPushMessageSendDialog.findViewById(R.id.message);
KeyboardUtils.show(OperationListActivity.this, messageEditText);
} else {
mFixPushMessageListView.setVisibility(View.VISIBLE);
mPushMessageSendDialog.findViewById(R.id.back_btn).setVisibility(View.VISIBLE);
mPushMessageSendDialog.findViewById(R.id.push_send_layout).setVisibility(View.GONE);
mPushMessageSendDialog.findViewById(R.id.close_btn).setVisibility(View.GONE);
}
}
/**
* プッシュメッセージ送信依頼
*/
private void sendPushMessageRequest(long operationId) {
if (!ABVEnvironment.getInstance().networkAdapter.isNetworkConnected()) {
ABVToastUtil.showMakeText(OperationListActivity.this, R.string.request_network_connection, Toast.LENGTH_SHORT);
return;
}
//文字列チェック
EditText messageEditText = (EditText) mPushMessageSendDialog.findViewById(R.id.message);
String message = messageEditText.getText().toString();
String checkMessage = message.replace(" ", "");
if (checkMessage.length() == 0) {
// リソースパターンの適用
ABVToastUtil.showMakeText(OperationListActivity.this, PatternStringUtil.patternToString(getApplicationContext(),
R.string.push_message_input_null,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), Toast.LENGTH_SHORT);
return;
}
byte[] messageByte = message.getBytes(StandardCharsets.UTF_8);
if (messageByte.length >= 207) {
// リソースパターンの適用
ABVToastUtil.showMakeText(OperationListActivity.this, PatternStringUtil.patternToString(getApplicationContext(),
R.string.push_message_input_over,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), Toast.LENGTH_SHORT);
return;
}
// リソースパターンの適用
ProgressDialogHelper.showProgressPopup(OperationListActivity.this, true, PatternStringUtil.patternToString(getApplicationContext(),
R.string.file_initialization,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
try {
boolean result = mPushMessageLogic.sendPushMessageRequest(mSendType, message, operationId);
if (result) {
mPushMessageSendDialog.dismiss();
// リソースパターンの適用
ABVToastUtil.showMakeText(OperationListActivity.this, PatternStringUtil.patternToString(getApplicationContext(),
R.string.push_message_send_success,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), Toast.LENGTH_SHORT);
} else {
// リソースパターンの適用
ABVToastUtil.showMakeText(OperationListActivity.this, PatternStringUtil.patternToString(getApplicationContext(),
R.string.push_message_send_fail,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), Toast.LENGTH_SHORT);
}
} catch (Exception e) {
Logger.e(TAG, e);
// リソースパターンの適用
ABVToastUtil.showMakeText(OperationListActivity.this, PatternStringUtil.patternToString(getApplicationContext(),
R.string.push_message_send_fail,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), Toast.LENGTH_SHORT);
} finally {
ProgressDialogHelper.closeProgressPopup();
}
}
private void showFixPushMessageView() {
if (!ABVEnvironment.getInstance().networkAdapter.isNetworkConnected()) {
ABVToastUtil.showMakeText(OperationListActivity.this, R.string.request_network_connection, Toast.LENGTH_SHORT);
return;
}
EditText messageEditText = (EditText) mPushMessageSendDialog.findViewById(R.id.message);
KeyboardUtils.hide(OperationListActivity.this, messageEditText);
// リソースパターンの適用
ProgressDialogHelper.showProgressPopup(OperationListActivity.this, true, PatternStringUtil.patternToString(getApplicationContext(),
R.string.file_initialization,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
try {
List<FixPushMessageDto> fixPushMessageList = mPushMessageLogic.getFixPushMessage();
FixPushMessageDto dto = new FixPushMessageDto();
// リソースパターンの適用
dto.name = PatternStringUtil.patternToString(getApplicationContext(),
R.string.free_input,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0));
fixPushMessageList.add(0, dto);
mFixPushMessageListView.setAdapter(new FixPushMessageAdapter(OperationListActivity.this, fixPushMessageList, mSelectedFixPuchMessagePosition));
mFixPushMessageListView.invalidate();
mFixPushMessageListView.setClickable(true);
mFixPushMessageListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
mSelectedFixPuchMessagePosition = position;
FixPushMessageDto item = (FixPushMessageDto)parent.getItemAtPosition(position);
TextView messageTitleTextView = (TextView) mPushMessageSendDialog.findViewById(R.id.message_title);
messageTitleTextView.setText(item.name + " > ");
EditText messageEditText = (EditText) mPushMessageSendDialog.findViewById(R.id.message);
messageEditText.setText(item.value);
messageEditText.setSelection(messageEditText.getText().length());
showSendPushMessgeView(true);
}
});
showSendPushMessgeView(false);
} catch (Exception e) {
Logger.e(TAG, e);
// リソースパターンの適用
ABVToastUtil.showMakeText(OperationListActivity.this, PatternStringUtil.patternToString(getApplicationContext(),
R.string.respons_fix_push_message_fail,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), Toast.LENGTH_SHORT);
} finally {
ProgressDialogHelper.closeProgressPopup();
}
}
/** /**
* listDtoの中に第2引数のdtoが存在するかチェックメソッド * listDtoの中に第2引数のdtoが存在するかチェックメソッド
* @param listDto リストDto * @param listDto リストDto
......
...@@ -4,6 +4,7 @@ import android.content.DialogInterface; ...@@ -4,6 +4,7 @@ import android.content.DialogInterface;
import android.content.Intent; import android.content.Intent;
import android.os.AsyncTask; import android.os.AsyncTask;
import android.os.Bundle; import android.os.Bundle;
import android.view.KeyEvent;
import android.view.View; import android.view.View;
import android.widget.Button; import android.widget.Button;
import android.widget.ImageButton; import android.widget.ImageButton;
...@@ -32,6 +33,7 @@ import jp.agentec.abook.abv.ui.common.activity.ABVUIActivity; ...@@ -32,6 +33,7 @@ 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.appinfo.AppDefType;
import jp.agentec.abook.abv.ui.common.constant.ErrorCode; import jp.agentec.abook.abv.ui.common.constant.ErrorCode;
import jp.agentec.abook.abv.ui.common.constant.ErrorMessage; import jp.agentec.abook.abv.ui.common.constant.ErrorMessage;
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.dialog.ABookAlertDialog;
import jp.agentec.abook.abv.ui.common.util.ABVToastUtil; import jp.agentec.abook.abv.ui.common.util.ABVToastUtil;
import jp.agentec.abook.abv.ui.common.util.AlertDialogUtil; import jp.agentec.abook.abv.ui.common.util.AlertDialogUtil;
...@@ -49,19 +51,16 @@ public class OperationRelatedContentActivity extends ABVUIActivity { ...@@ -49,19 +51,16 @@ public class OperationRelatedContentActivity extends ABVUIActivity {
private OperationRelatedContentSectionAdapter mOperationRelatedContentSectionAdapter; private OperationRelatedContentSectionAdapter mOperationRelatedContentSectionAdapter;
private ImageButton mOperationHomeButton; private ImageButton mOperationHomeButton; // ホームボタン
private ImageView mRefreshButton; private ImageButton mOperationRelatedContentButton; // 関連資料ボタン
private ImageButton mOperationHelpButton; private ImageButton mCommunicationButton; // コミュニケーションボタン
private TextView mTxtOperationRelatedContent; private TextView mTxtOperationRelatedContent;
private TextView mTxtOperationName;
private Button mAllSaveButton; private Button mAllSaveButton;
private ListView mContentListView; private ListView mContentListView;
private List<CategoryContentDto> mOperationContentList; private List<CategoryContentDto> mOperationContentList;
private Long operationId;
private String operationName;
private OperationLogic mOperationLogic = AbstractLogic.getLogic(OperationLogic.class); private OperationLogic mOperationLogic = AbstractLogic.getLogic(OperationLogic.class);
@Override @Override
...@@ -69,40 +68,45 @@ public class OperationRelatedContentActivity extends ABVUIActivity { ...@@ -69,40 +68,45 @@ public class OperationRelatedContentActivity extends ABVUIActivity {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setContentView(R.layout.ac_operation_related_content); setContentView(R.layout.ac_operation_related_content);
// ホームボタン(作業一覧へ遷移ボタン)
mOperationHomeButton = (ImageButton) findViewById(R.id.btn_operation_home); mOperationHomeButton = (ImageButton) findViewById(R.id.btn_operation_home);
mOperationHelpButton = (ImageButton) findViewById(R.id.btn_operation_help); // 共通資料ボタン
mOperationRelatedContentButton = (ImageButton) findViewById(R.id.btn_common_content);
mTxtOperationName = (TextView) findViewById(R.id.txt_operation_name); // コミュニケーションボタン
mCommunicationButton = (ImageButton) findViewById(R.id.btn_communication_menu);
// 一括保存ボタン
mAllSaveButton = (Button) findViewById(R.id.btn_all_save); mAllSaveButton = (Button) findViewById(R.id.btn_all_save);
mContentListView = (ListView) findViewById(R.id.lv_content_list); mContentListView = (ListView) findViewById(R.id.lv_content_list);
Intent i = getIntent();
operationId = i.getLongExtra(ABookKeys.OPERATION_ID, 0);
operationName = i.getStringExtra(ABookKeys.OPERATION_NAME);
Logger.i(TAG, "operationId=" + operationId + ", operationName=" + operationName);
mTxtOperationRelatedContent = (TextView) findViewById(R.id.txt_operation_related_content); mTxtOperationRelatedContent = (TextView) findViewById(R.id.txt_operation_related_content);
if (operationId == 0) {
LinearLayout llOperationName = (LinearLayout) findViewById(R.id.ll_operation_name);
llOperationName.setVisibility(View.GONE);
LinearLayout llLine = (LinearLayout) findViewById(R.id.linear_full_border);
llLine.setVisibility(View.GONE);
// リソースパターンの適用 // リソースパターンの適用
mTxtOperationRelatedContent.setText("" + PatternStringUtil.patternToString(getApplicationContext(), mTxtOperationRelatedContent.setText("" + PatternStringUtil.patternToString(getApplicationContext(),
R.string.title_common_content, R.string.title_common_content,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0))); getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
} else {
mTxtOperationRelatedContent.setText("" + PatternStringUtil.patternToString(getApplicationContext(),
R.string.operation_related_content,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
}
mTxtOperationName.setText(operationName);
mAllSaveButton.setVisibility(View.GONE); mAllSaveButton.setVisibility(View.GONE);
settingBottomToolbar();
setOnButtonEvent(); setOnButtonEvent();
}
// 下辺のツールバー設定
private void settingBottomToolbar() {
// ホームボタン活性化
mOperationHomeButton.setEnabled(true);
// 共通資料ボタンの非活性化
mOperationRelatedContentButton.setEnabled(false);
// バッチを付けるか判定して、イメージを設定
setCommunicationImageButton(mCommunicationButton);
// コミュニケーションボタン
mCommunicationButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
showCommunicationMenuDialog();
}
});
} }
@Override @Override
...@@ -249,7 +253,6 @@ public class OperationRelatedContentActivity extends ABVUIActivity { ...@@ -249,7 +253,6 @@ public class OperationRelatedContentActivity extends ABVUIActivity {
} }
Intent intent = new Intent(); Intent intent = new Intent();
intent.putExtra(ABookKeys.OPERATION_ID, operationId);
ActivityHandlingHelper.getInstance().checkContentActivity(contentId, 0, intent); ActivityHandlingHelper.getInstance().checkContentActivity(contentId, 0, intent);
} }
} catch (Exception e) { } catch (Exception e) {
...@@ -288,11 +291,11 @@ public class OperationRelatedContentActivity extends ABVUIActivity { ...@@ -288,11 +291,11 @@ public class OperationRelatedContentActivity extends ABVUIActivity {
* ボタンイベント設定 * ボタンイベント設定
*/ */
private void setOnButtonEvent() { private void setOnButtonEvent() {
// プロジェクトホーム画面へ // 作業のホーム画面へ
mOperationHomeButton.setOnClickListener(new View.OnClickListener() { mOperationHomeButton.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
finish(); backToHome();
} }
}); });
...@@ -353,6 +356,16 @@ public class OperationRelatedContentActivity extends ABVUIActivity { ...@@ -353,6 +356,16 @@ public class OperationRelatedContentActivity extends ABVUIActivity {
showAlertDialog(contentsDeleteDialog); showAlertDialog(contentsDeleteDialog);
} }
/**
* 作業一覧へ戻る
*/
private void backToHome() {
Intent intent = new Intent(getApplicationContext(), OperationListActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
startActivity(intent, NaviConsts.Left);
finish();
}
public void showCancelDownloadDialog(final ContentDto contentDto) { public void showCancelDownloadDialog(final ContentDto contentDto) {
// リソースパターンの適用 // リソースパターンの適用
ABookAlertDialog cancelDownloadDialog = AlertDialogUtil.createAlertDialog(this, ABookAlertDialog cancelDownloadDialog = AlertDialogUtil.createAlertDialog(this,
...@@ -373,6 +386,15 @@ public class OperationRelatedContentActivity extends ABVUIActivity { ...@@ -373,6 +386,15 @@ public class OperationRelatedContentActivity extends ABVUIActivity {
showAlertDialog(cancelDownloadDialog); showAlertDialog(cancelDownloadDialog);
} }
@Override
public boolean onKeyUp(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_BACK) {
Logger.d(TAG, "onKeyUp.Back");
backToHome();
}
return super.onKeyUp(keyCode, event);
}
private void updateViewStatus(ContentDto contentDto) { private void updateViewStatus(ContentDto contentDto) {
final ContentDto updatedContentDto = contentDto; final ContentDto updatedContentDto = contentDto;
handler.post(new Runnable() { handler.post(new Runnable() {
...@@ -410,11 +432,8 @@ public class OperationRelatedContentActivity extends ABVUIActivity { ...@@ -410,11 +432,8 @@ public class OperationRelatedContentActivity extends ABVUIActivity {
showOperationRelatedContentList(); showOperationRelatedContentList();
} }
public void onClickShowHelpView(View v) { // 設定画面へ遷移
if (operationId == 0) { public void onClickSetting(View v) {
showHelpViewDialog(Constant.HelpViewType.CommonContent); showSetting();
} else {
showHelpViewDialog(Constant.HelpViewType.OperationDetail);
}
} }
} }
...@@ -61,6 +61,7 @@ import jp.agentec.abook.abv.launcher.android.R; ...@@ -61,6 +61,7 @@ import jp.agentec.abook.abv.launcher.android.R;
import jp.agentec.abook.abv.ui.common.activity.ABVActivity; import jp.agentec.abook.abv.ui.common.activity.ABVActivity;
import jp.agentec.abook.abv.ui.common.activity.ABVAuthenticatedActivity; import jp.agentec.abook.abv.ui.common.activity.ABVAuthenticatedActivity;
import jp.agentec.abook.abv.ui.common.activity.ABVContentViewActivity; import jp.agentec.abook.abv.ui.common.activity.ABVContentViewActivity;
import jp.agentec.abook.abv.ui.common.activity.ABVUIActivity;
import jp.agentec.abook.abv.ui.common.activity.ShowPushMessageDailogActivity; import jp.agentec.abook.abv.ui.common.activity.ShowPushMessageDailogActivity;
import jp.agentec.abook.abv.ui.common.appinfo.AppDefType; import jp.agentec.abook.abv.ui.common.appinfo.AppDefType;
import jp.agentec.abook.abv.ui.common.appinfo.AppDefType.DefPrefKey; import jp.agentec.abook.abv.ui.common.appinfo.AppDefType.DefPrefKey;
...@@ -118,6 +119,7 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve ...@@ -118,6 +119,7 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
private ABookAlertDialog promotionRequestAlertDialog; private ABookAlertDialog promotionRequestAlertDialog;
private long lastDisconnect; private long lastDisconnect;
private static Dialog meetingAlertDialog; private static Dialog meetingAlertDialog;
private ABVUIActivity previousOfSettingActivity;
protected ContentRefresher contentRefresher = ContentRefresher.getInstance(); protected ContentRefresher contentRefresher = ContentRefresher.getInstance();
...@@ -1713,4 +1715,20 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve ...@@ -1713,4 +1715,20 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
} }
return context; return context;
} }
/**
* 設定画面から戻る用
* @return 設定画面へ遷移前の画面
*/
public ABVUIActivity getPreviousOfSettingActivity() {
return previousOfSettingActivity;
}
/**
* 設定画面遷移前に設定
* @param activity
*/
public void setPreviousOfSettingActivity(ABVUIActivity activity) {
this.previousOfSettingActivity = activity;
}
} }
...@@ -3,6 +3,7 @@ package jp.agentec.abook.abv.ui.home.helper; ...@@ -3,6 +3,7 @@ package jp.agentec.abook.abv.ui.home.helper;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import jp.agentec.abook.abv.bl.acms.type.OperationSortingType;
import jp.agentec.abook.abv.bl.common.ABVEnvironment; import jp.agentec.abook.abv.bl.common.ABVEnvironment;
import jp.agentec.abook.abv.bl.common.log.Logger; import jp.agentec.abook.abv.bl.common.log.Logger;
import jp.agentec.abook.abv.bl.data.dao.AbstractDao; import jp.agentec.abook.abv.bl.data.dao.AbstractDao;
...@@ -76,8 +77,10 @@ public class OperationGroupMasterListHelper extends HierarchyOperationListHelper ...@@ -76,8 +77,10 @@ public class OperationGroupMasterListHelper extends HierarchyOperationListHelper
OperationGroupMasterDto peekOperationGroupMasterDto = stack.peek(); OperationGroupMasterDto peekOperationGroupMasterDto = stack.peek();
mAppActivity.checkBatchNeedSyncButton(peekOperationGroupMasterDto.operationGroupMasterId); mAppActivity.checkBatchNeedSyncButton(peekOperationGroupMasterDto.operationGroupMasterId);
int operationSortType = getUserPref(mAppActivity, AppDefType.UserPrefKey.OPERATION_SORT_CONDITION, 0);
OperationSortingType operationSortingType = convertSortType(operationSortType);
// 作業種別IDで紐づく作業リストを取得 // 作業種別IDで紐づく作業リストを取得
return mOperationGroupMasterLogic.getOperationByOperationGroupMasterId(peekOperationGroupMasterDto.operationGroupMasterId); return mOperationGroupMasterLogic.getOperationByOperationGroupMasterId(peekOperationGroupMasterDto.operationGroupMasterId, operationSortingType);
} }
/** /**
......
...@@ -1780,13 +1780,13 @@ public class ContentViewActivity extends ABVContentViewActivity { ...@@ -1780,13 +1780,13 @@ public class ContentViewActivity extends ABVContentViewActivity {
if (isVisable) { if (isVisable) {
operationHomeButton.setVisibility(View.INVISIBLE); operationHomeButton.setVisibility(View.INVISIBLE);
taskListButton.setVisibility(View.INVISIBLE); taskListButton.setVisibility(View.INVISIBLE);
helpButton.setVisibility(View.INVISIBLE); // helpButton.setVisibility(View.INVISIBLE);
if (exitMeetingBtn != null && exitMeetingBtn.getVisibility() == View.VISIBLE) { if (exitMeetingBtn != null && exitMeetingBtn.getVisibility() == View.VISIBLE) {
RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(WC, WC); // RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(WC, WC);
params.addRule(RelativeLayout.ALIGN_PARENT_RIGHT); // params.addRule(RelativeLayout.ALIGN_PARENT_RIGHT);
params.addRule(RelativeLayout.CENTER_VERTICAL); // params.addRule(RelativeLayout.CENTER_VERTICAL);
params.rightMargin = (int) (getResources().getDisplayMetrics().density * 5); // params.rightMargin = (int) (getResources().getDisplayMetrics().density * 5);
helpButton.setLayoutParams(params); // helpButton.setLayoutParams(params);
exitMeetingBtn.setVisibility(View.GONE); exitMeetingBtn.setVisibility(View.GONE);
} }
...@@ -1797,13 +1797,13 @@ public class ContentViewActivity extends ABVContentViewActivity { ...@@ -1797,13 +1797,13 @@ public class ContentViewActivity extends ABVContentViewActivity {
} else { } else {
operationHomeButton.setVisibility(View.VISIBLE); operationHomeButton.setVisibility(View.VISIBLE);
taskListButton.setVisibility(View.VISIBLE); taskListButton.setVisibility(View.VISIBLE);
helpButton.setVisibility(View.VISIBLE); // helpButton.setVisibility(View.VISIBLE);
if (exitMeetingBtn != null && meetingManager.isSendable()) { if (exitMeetingBtn != null && meetingManager.isSendable()) {
RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(WC, WC); // RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(WC, WC);
params.addRule(RelativeLayout.LEFT_OF, R.id.btn_exitMeeting); // params.addRule(RelativeLayout.LEFT_OF, R.id.btn_exitMeeting);
params.addRule(RelativeLayout.CENTER_VERTICAL); // params.addRule(RelativeLayout.CENTER_VERTICAL);
params.rightMargin = (int) (getResources().getDisplayMetrics().density * 5); // params.rightMargin = (int) (getResources().getDisplayMetrics().density * 5);
helpButton.setLayoutParams(params); // helpButton.setLayoutParams(params);
exitMeetingBtn.setVisibility(View.VISIBLE); exitMeetingBtn.setVisibility(View.VISIBLE);
} }
...@@ -4908,14 +4908,14 @@ public class ContentViewActivity extends ABVContentViewActivity { ...@@ -4908,14 +4908,14 @@ public class ContentViewActivity extends ABVContentViewActivity {
@Override @Override
protected void commonConfigureRemote() { protected void commonConfigureRemote() {
taskListButton = (ImageButton) findViewById(R.id.btn_show_task_list); taskListButton = (ImageButton) findViewById(R.id.btn_show_task_list);
helpButton = (ImageButton) findViewById(R.id.btn_help); // helpButton = (ImageButton) findViewById(R.id.btn_help);
if (mXWalkOpenType == Constant.XWalkOpenType.DEFAULT) { if (mXWalkOpenType == Constant.XWalkOpenType.DEFAULT) {
helpButton.setVisibility(View.GONE); // helpButton.setVisibility(View.GONE);
operationHomeButton.setVisibility(View.GONE); operationHomeButton.setVisibility(View.GONE);
taskListButton.setVisibility(View.GONE); taskListButton.setVisibility(View.GONE);
} else { } else {
helpButton.setVisibility(View.VISIBLE); // helpButton.setVisibility(View.VISIBLE);
operationHomeButton.setVisibility(View.VISIBLE); operationHomeButton.setVisibility(View.VISIBLE);
subMenuBtn.setVisibility(View.GONE); subMenuBtn.setVisibility(View.GONE);
......
...@@ -73,7 +73,7 @@ public class ParentWebViewActivity extends ABVContentViewActivity { ...@@ -73,7 +73,7 @@ public class ParentWebViewActivity extends ABVContentViewActivity {
historyLayout = (LinearLayout) findViewById(R.id.historyLayout); historyLayout = (LinearLayout) findViewById(R.id.historyLayout);
addSceneButton = (ImageButton) findViewById(R.id.btn_add_scene); addSceneButton = (ImageButton) findViewById(R.id.btn_add_scene);
taskListButton = (ImageButton) findViewById(R.id.btn_show_task_list); taskListButton = (ImageButton) findViewById(R.id.btn_show_task_list);
helpButton = (ImageButton) findViewById(R.id.btn_help); // helpButton = (ImageButton) findViewById(R.id.btn_help);
btnWebClose = (ImageButton) findViewById(R.id.btnWebClose); btnWebClose = (ImageButton) findViewById(R.id.btnWebClose);
closeButton = (Button) findViewById(R.id.closeBtn); closeButton = (Button) findViewById(R.id.closeBtn);
historyListBtn = (Button) findViewById(R.id.btn_history_list); historyListBtn = (Button) findViewById(R.id.btn_history_list);
...@@ -132,11 +132,11 @@ public class ParentWebViewActivity extends ABVContentViewActivity { ...@@ -132,11 +132,11 @@ public class ParentWebViewActivity extends ABVContentViewActivity {
@Override @Override
protected void commonConfigureHeader() { protected void commonConfigureHeader() {
if (mStatusCode == Constant.XWalkWebViewDisplayStatus.InitView) { //フォームが非表示時のみヘルプボタン表示 // if (mStatusCode == Constant.XWalkWebViewDisplayStatus.InitView) { //フォームが非表示時のみヘルプボタン表示
helpButton.setVisibility(View.VISIBLE); // helpButton.setVisibility(View.VISIBLE);
} else { // } else {
helpButton.setVisibility(View.INVISIBLE); // helpButton.setVisibility(View.INVISIBLE);
} // }
if (Constant.XWalkWebViewDisplayStatus.TaskView == mStatusCode) { if (Constant.XWalkWebViewDisplayStatus.TaskView == mStatusCode) {
operationHomeButton.setVisibility(View.GONE); operationHomeButton.setVisibility(View.GONE);
...@@ -159,21 +159,21 @@ public class ParentWebViewActivity extends ABVContentViewActivity { ...@@ -159,21 +159,21 @@ public class ParentWebViewActivity extends ABVContentViewActivity {
} }
addSceneButton = (ImageButton) findViewById(R.id.btn_add_scene); addSceneButton = (ImageButton) findViewById(R.id.btn_add_scene);
taskListButton = (ImageButton) findViewById(R.id.btn_show_task_list); taskListButton = (ImageButton) findViewById(R.id.btn_show_task_list);
helpButton = (ImageButton) findViewById(R.id.btn_help); // helpButton = (ImageButton) findViewById(R.id.btn_help);
operationHomeButton = (Button) findViewById(R.id.btn_operation_home); operationHomeButton = (Button) findViewById(R.id.btn_operation_home);
if (mXWalkOpenType == Constant.XWalkOpenType.DEFAULT) { if (mXWalkOpenType == Constant.XWalkOpenType.DEFAULT) {
helpButton.setVisibility(View.GONE); // helpButton.setVisibility(View.GONE);
operationHomeButton.setVisibility(View.GONE); operationHomeButton.setVisibility(View.GONE);
addSceneButton.setVisibility(View.GONE); addSceneButton.setVisibility(View.GONE);
taskListButton.setVisibility(View.GONE); taskListButton.setVisibility(View.GONE);
} else { } else {
if (mOperationType == OperationType.LIST && operationDto.reportType != Constant.ReportType.RoutineTask && operationDto.enableAddReport == Constant.EnableAddReport.NO) { // if (mOperationType == OperationType.LIST && operationDto.reportType != Constant.ReportType.RoutineTask && operationDto.enableAddReport == Constant.EnableAddReport.NO) {
// リストタイプ且つ報告タイプが定期点検以外で作業追加区分が無しの場合、ヘルプボタンを非表示 // // リストタイプ且つ報告タイプが定期点検以外で作業追加区分が無しの場合、ヘルプボタンを非表示
helpButton.setVisibility(View.INVISIBLE); // helpButton.setVisibility(View.INVISIBLE);
} else { // } else {
helpButton.setVisibility(View.VISIBLE); // helpButton.setVisibility(View.VISIBLE);
} // }
operationHomeButton.setVisibility(View.VISIBLE); operationHomeButton.setVisibility(View.VISIBLE);
btnWebBack.setVisibility(View.GONE); btnWebBack.setVisibility(View.GONE);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment