Commit e7453f77 by Kim Jinsung

Merge branch 'features/1.2.0_34869' into 'features/1.2.0'

Features/1.2.0 34869

See merge request !34
parents 9ce2a1f8 39f2df68
package jp.agentec.abook.abv.bl.acms.type;
/**
* Created by leej on 2019/08/21.
*/
public enum OperationSortingType {
OperationName(0),
OperationStartDateDESC(1),
OperationStartDateASC(2),
OperationType(3),
ReadingDate(4);
private final int operationSorting;
OperationSortingType(int operationSorting) {
this.operationSorting = operationSorting;
}
/**
* 検索をかける項目の番号を返します。
* @return 検索をかける項目の番号です。
* @since 1.0.0
*/
public int type() {
return operationSorting;
}
/**
* 指定した数字に対応するSecurityPolicyCodeの値を返します。
* @param operationSorting 数字のコードです。
* @return 指定した数字に対応するSearchDivisionTypeの値です。
* @since 1.0.0
*/
public static OperationSortingType parse(int operationSorting) {
OperationSortingType sortingType;
switch (operationSorting) {
case 0: // 作業名
sortingType = OperationSortingType.OperationName;
break;
case 1: // 作業期間が新しい順
sortingType = OperationSortingType.OperationStartDateDESC;
break;
case 2: // 作業時間が古い順
sortingType = OperationSortingType.OperationStartDateASC;
break;
case 3: // 報告タイプ
sortingType = OperationSortingType.OperationType;
break;
case 4: // 閲覧日が新しい順
sortingType = OperationSortingType.ReadingDate;
break;
default: // 作業名(デフォルト)
sortingType = OperationSortingType.OperationName;
break;
}
return sortingType;
}
}
...@@ -19,7 +19,7 @@ import jp.agentec.abook.abv.bl.common.db.SQLiteDatabase; ...@@ -19,7 +19,7 @@ import jp.agentec.abook.abv.bl.common.db.SQLiteDatabase;
public class DBConnector { public class DBConnector {
private static volatile DBConnector dbConnector = null; private static volatile DBConnector dbConnector = null;
public static final String DatabaseName = "ABVJE"; public static final String DatabaseName = "ABVJE";
public static final int DatabaseVersion = DatabaseVersions.Ver1_1_0; public static final int DatabaseVersion = DatabaseVersions.Ver1_2_0;
protected SQLiteDatabase db = null; protected SQLiteDatabase db = null;
......
package jp.agentec.abook.abv.bl.data; package jp.agentec.abook.abv.bl.data;
// バージョンが上がるごとに+10すること // バージョンが上がるごとに+10すること(途中でバージョン追加になる恐れがあるため)
public class DatabaseVersions { public class DatabaseVersions {
public static final int Ver1_0_0 = 1; public static final int Ver1_0_0 = 1;
public static final int Ver1_1_0 = 11; public static final int Ver1_1_0 = 11;
public static final int Ver1_2_0 = 21;
} }
...@@ -4,9 +4,11 @@ import java.util.ArrayList; ...@@ -4,9 +4,11 @@ import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import jp.agentec.abook.abv.bl.acms.type.OperationSortingType;
import jp.agentec.abook.abv.bl.common.Constant; import jp.agentec.abook.abv.bl.common.Constant;
import jp.agentec.abook.abv.bl.common.db.Cursor; import jp.agentec.abook.abv.bl.common.db.Cursor;
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.SortDirection;
import jp.agentec.abook.abv.bl.dto.OperationDto; import jp.agentec.abook.abv.bl.dto.OperationDto;
import jp.agentec.adf.util.DateTimeFormat; import jp.agentec.adf.util.DateTimeFormat;
import jp.agentec.adf.util.DateTimeUtil; import jp.agentec.adf.util.DateTimeUtil;
...@@ -114,8 +116,12 @@ public class OperationDao extends AbstractDao { ...@@ -114,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() {
...@@ -211,6 +217,15 @@ public class OperationDao extends AbstractDao { ...@@ -211,6 +217,15 @@ public class OperationDao extends AbstractDao {
} }
/** /**
* 作業閲覧日付
* @param operationId
* @return 正常:true 異常:false
*/
public boolean updateReadingDate(Long operationId) {
return update("update t_operation set operation_open_date=? WHERE operation_id=?", new Object[]{DateTimeUtil.getCurrentTimestamp(), operationId}) > 0;
}
/**
* 該当作業を削除(関連テーブルを含む) * 該当作業を削除(関連テーブルを含む)
* @param dto * @param dto
*/ */
...@@ -242,21 +257,22 @@ public class OperationDao extends AbstractDao { ...@@ -242,21 +257,22 @@ public class OperationDao extends AbstractDao {
* @param searchOperationName * @param searchOperationName
* @param searchStartDateStr * @param searchStartDateStr
* @param searchEndDateStr * @param searchEndDateStr
* @param reportTypeStr * @param operationSortType
* @return * @return
*/ */
public List<OperationDto> getOperations(String searchOperationName, String searchStartDateStr, String searchEndDateStr, String reportTypeStr) { public List<OperationDto> getOperations(String searchOperationName, String searchStartDateStr, String searchEndDateStr, OperationSortingType operationSortType) {
String sql = generateGetOperationQuery(searchOperationName, searchStartDateStr, searchEndDateStr, reportTypeStr, null); String sql = generateGetOperationQuery(searchOperationName, searchStartDateStr, searchEndDateStr, operationSortType, null);
return rawQueryGetDtoList(sql, null, OperationDto.class); return rawQueryGetDtoList(sql, null, OperationDto.class);
} }
/** /**
* カテゴリの作業一覧検索用 * カテゴリの作業一覧検索用
* @param operationGroupMasterId * @param operationGroupMasterId カテゴリID
* @return * @param operationSortingType ソートタイプ
* @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);
} }
...@@ -266,10 +282,10 @@ public class OperationDao extends AbstractDao { ...@@ -266,10 +282,10 @@ public class OperationDao extends AbstractDao {
* @param searchOperationName * @param searchOperationName
* @param searchStartDateStr * @param searchStartDateStr
* @param searchEndDateStr * @param searchEndDateStr
* @param reportTypeStr * @param operationSortingType
* @return * @return
*/ */
private String generateGetOperationQuery(String searchOperationName, String searchStartDateStr, String searchEndDateStr, String reportTypeStr, Integer operationGroupMasterId) { private String generateGetOperationQuery(String searchOperationName, String searchStartDateStr, String searchEndDateStr, OperationSortingType operationSortingType, Integer operationGroupMasterId) {
String curDate = DateTimeUtil.toStringInTimeZone(new Date(), DateTimeFormat.yyyyMMddHHmmss_hyphen, "UTC"); String curDate = DateTimeUtil.toStringInTimeZone(new Date(), DateTimeFormat.yyyyMMddHHmmss_hyphen, "UTC");
StringBuffer sql = new StringBuffer(); StringBuffer sql = new StringBuffer();
...@@ -337,11 +353,33 @@ public class OperationDao extends AbstractDao { ...@@ -337,11 +353,33 @@ public class OperationDao extends AbstractDao {
sql.append(" AND top.operation_start_date <= '" + DateTimeUtil.toString(endDate, DateTimeFormat.yyyyMMdd_hyphen) + "'"); sql.append(" AND top.operation_start_date <= '" + DateTimeUtil.toString(endDate, DateTimeFormat.yyyyMMdd_hyphen) + "'");
} }
if (reportTypeStr != null) { // 並び順
sql.append(" AND top.report_type in ("+ reportTypeStr +")"); if (operationSortingType != null) {
switch (operationSortingType) {
case OperationName:
sql.append(" ORDER BY top.operation_name ASC ");
break;
case OperationStartDateASC:
sql.append(" ORDER BY top.operation_start_date ASC ");
break;
case OperationStartDateDESC:
sql.append(" ORDER BY top.operation_start_date DESC ");
break;
case OperationType:
sql.append(" ORDER BY top.report_type ASC ");
break;
case ReadingDate:
sql.append(" ORDER BY top.operation_open_date DESC ");
break;
default:
sql.append(" ORDER BY top.operation_name ASC ");
break;
}
} else {
sql.append(" ORDER BY top.operation_name ASC ");
} }
// 必ずORDER BYが存在する 2次ソート
sql.append(" ORDER BY top.operation_start_date DESC, top.operation_id DESC"); sql.append(", top.operation_id DESC");
Logger.v(TAG, "sql=%s", sql); Logger.v(TAG, "sql=%s", sql);
......
...@@ -38,6 +38,7 @@ public class TOperation extends SQLiteTableScript { ...@@ -38,6 +38,7 @@ public class TOperation extends SQLiteTableScript {
sql.append(" , enable_report_history SMALLINT NOT NULL DEFAULT 0 "); sql.append(" , enable_report_history SMALLINT NOT NULL DEFAULT 0 ");
sql.append(" , enable_report_edit SMALLINT NOT NULL DEFAULT 0 "); sql.append(" , enable_report_edit SMALLINT NOT NULL DEFAULT 0 ");
sql.append(" , enable_add_report SMALLINT NOT NULL DEFAULT 0 "); sql.append(" , enable_add_report SMALLINT NOT NULL DEFAULT 0 ");
sql.append(" , operation_open_date DATETIME ");
sql.append(" , PRIMARY KEY (operation_id) "); sql.append(" , PRIMARY KEY (operation_id) ");
sql.append(" ) "); sql.append(" ) ");
ddl.add(sql.toString()); ddl.add(sql.toString());
...@@ -48,22 +49,12 @@ public class TOperation extends SQLiteTableScript { ...@@ -48,22 +49,12 @@ public class TOperation extends SQLiteTableScript {
@Override @Override
public List<String> getUpgradeScript(int oldVersion, int newVersion) { public List<String> getUpgradeScript(int oldVersion, int newVersion) {
// List<String> ddl = new ArrayList<String>(); List<String> ddl = new ArrayList<String>();
// if (oldVersion < DatabaseVersions.Plus_1_9_3) {
// ddl.addAll(getCreateScript(newVersion)); if (oldVersion < DatabaseVersions.Ver1_2_0) { // カラムの追加
// } ddl.add("ALTER TABLE t_operation ADD COLUMN operation_open_date DATETIME");
// }
// if (oldVersion < DatabaseVersions.Plus_1_9_3_5) { // カラムの追加 return ddl;
// ddl.add(" ALTER TABLE t_operation ADD COLUMN report_update_type INTEGER NOT NULL DEFAULT 0 ");
// }
//
// if (oldVersion < DatabaseVersions.Plus_1_9_4) { // カラムの追加
// ddl.add(" ALTER TABLE t_operation ADD COLUMN project_report_type INTEGER NOT NULL DEFAULT 0 ");
// ddl.add(" ALTER TABLE t_operation ADD COLUMN report_cycle INTEGER NOT NULL DEFAULT 0 ");
// ddl.add(" ALTER TABLE t_operation ADD COLUMN enable_report_update INTEGER NOT NULL DEFAULT 0 ");
// }
// return ddl;
return null;
} }
@Override @Override
......
...@@ -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;
...@@ -141,7 +142,7 @@ public class OperationGroupMasterLogic extends AbstractLogic { ...@@ -141,7 +142,7 @@ public class OperationGroupMasterLogic extends AbstractLogic {
/** /**
* 親の階層パスをリストでセット * 親の階層パスをリストでセット
* @param operationGroupMasterId * @param operationGroupMasterId カテゴリID
* @return * @return
*/ */
public List<OperationGroupMasterDto> getParentOperationGroupMasterForPath (Integer operationGroupMasterId) { public List<OperationGroupMasterDto> getParentOperationGroupMasterForPath (Integer operationGroupMasterId) {
...@@ -162,10 +163,11 @@ public class OperationGroupMasterLogic extends AbstractLogic { ...@@ -162,10 +163,11 @@ public class OperationGroupMasterLogic extends AbstractLogic {
/** /**
* 作業種別IDで関連する作業リストを取得 * 作業種別IDで関連する作業リストを取得
* @param operationGroupMasterId * @param operationGroupMasterId カテゴリID
* @param operationSortingType ソートタイプ
* @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);
} }
} }
...@@ -23,6 +23,7 @@ import jp.agentec.abook.abv.bl.acms.client.json.SceneEntryJSON; ...@@ -23,6 +23,7 @@ import jp.agentec.abook.abv.bl.acms.client.json.SceneEntryJSON;
import jp.agentec.abook.abv.bl.acms.client.json.WorkerGroupJSON; import jp.agentec.abook.abv.bl.acms.client.json.WorkerGroupJSON;
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.client.parameters.GetTaskFileParameters; import jp.agentec.abook.abv.bl.acms.client.parameters.GetTaskFileParameters;
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.Constant; import jp.agentec.abook.abv.bl.common.Constant;
import jp.agentec.abook.abv.bl.common.Callback; import jp.agentec.abook.abv.bl.common.Callback;
...@@ -1068,16 +1069,17 @@ public class OperationLogic extends AbstractLogic { ...@@ -1068,16 +1069,17 @@ public class OperationLogic extends AbstractLogic {
} }
/** /**
* プロジェクト一覧取得 * 作業一覧取得
* *
* @param searchWord * @param searchWord 検索条件:作業名
* @param searchStartDateStr * @param searchStartDateStr 検索条件:作業日範囲(開始)
* @param searchEndDateStr * @param searchEndDateStr  検索条件:作業日範囲(終了)
* @return * @param operationSortingType ソート順
* @return 作業リスト
*/ */
public List<OperationDto> getRefreshOperation(String searchWord, String searchStartDateStr, String searchEndDateStr, String reportTypeStr) { public List<OperationDto> getRefreshOperation(String searchWord, String searchStartDateStr, String searchEndDateStr, OperationSortingType operationSortingType) {
List<OperationDto> operationDtoList; List<OperationDto> operationDtoList;
operationDtoList = mOperationDao.getOperations(searchWord, searchStartDateStr, searchEndDateStr, reportTypeStr); operationDtoList = mOperationDao.getOperations(searchWord, searchStartDateStr, searchEndDateStr, operationSortingType);
for (OperationDto operationDto : operationDtoList) { for (OperationDto operationDto : operationDtoList) {
// 作業送信フラグが存在する場合またはホットスポット更新フラグが存在する場合、needSyncFlgをtrueにセット // 作業送信フラグが存在する場合またはホットスポット更新フラグが存在する場合、needSyncFlgをtrueにセット
if (mTaskReportDao.isExistSendTaskData(operationDto.operationId) || mTaskReportDao.isExistUpdateTargetHotSpotTaskData(operationDto.operationId)) { if (mTaskReportDao.isExistSendTaskData(operationDto.operationId) || mTaskReportDao.isExistUpdateTargetHotSpotTaskData(operationDto.operationId)) {
...@@ -1088,9 +1090,9 @@ public class OperationLogic extends AbstractLogic { ...@@ -1088,9 +1090,9 @@ public class OperationLogic extends AbstractLogic {
} }
/** /**
* プロジェクト関連資料または共通資料一覧取得 * 作業関連資料または共通資料一覧取得
* *
* @return * @return ジャンル毎の共通資料
*/ */
public List<CategoryContentDto> getOperationRelatedContent() { public List<CategoryContentDto> getOperationRelatedContent() {
List<ContentDto> contentDtoList; List<ContentDto> contentDtoList;
...@@ -1174,8 +1176,8 @@ public class OperationLogic extends AbstractLogic { ...@@ -1174,8 +1176,8 @@ public class OperationLogic extends AbstractLogic {
/** /**
* 作業報告履歴データ送信(全体) * 作業報告履歴データ送信(全体)
* @param operationId * @param operationId 作業ID
* @param progressCallback * @param progressCallback コールバック用
* @return * @return
* @throws Exception * @throws Exception
*/ */
...@@ -1185,8 +1187,9 @@ public class OperationLogic extends AbstractLogic { ...@@ -1185,8 +1187,9 @@ public class OperationLogic extends AbstractLogic {
/** /**
* 作業報告履歴データ送信 * 作業報告履歴データ送信
* @param operationId * @param operationId 作業ID
* @param taskKey * @param taskKey 報告・回答のキー
* @param progressCallback コールバック用
* @throws Exception * @throws Exception
*/ */
public void sendTaskReportSendData(long operationId, String taskKey, Integer taskReportLevel, Callback progressCallback) throws Exception { public void sendTaskReportSendData(long operationId, String taskKey, Integer taskReportLevel, Callback progressCallback) throws Exception {
...@@ -1299,9 +1302,10 @@ public class OperationLogic extends AbstractLogic { ...@@ -1299,9 +1302,10 @@ public class OperationLogic extends AbstractLogic {
/** /**
* 作業関連ディレクトリ削除 * 作業関連ディレクトリ削除
* *
* @param operationId * @param operationId 作業ID
* @param contentId * @param contentId 資料ID
* @param taskKey * @param taskKey 報告・回答のキー
* @param taskReportLevel 報告・回答のレベル
*/ */
public void deleteTaskFileData(long operationId, long contentId, String taskKey, int taskReportLevel) { public void deleteTaskFileData(long operationId, long contentId, String taskKey, int taskReportLevel) {
FileUtil.delete(ABVEnvironment.getInstance().getTempTaskDirPath(contentId, taskKey)); FileUtil.delete(ABVEnvironment.getInstance().getTempTaskDirPath(contentId, taskKey));
...@@ -1537,9 +1541,9 @@ public class OperationLogic extends AbstractLogic { ...@@ -1537,9 +1541,9 @@ public class OperationLogic extends AbstractLogic {
/** /**
* 作業報告の取得 * 作業報告の取得
* @param taskKey * @param taskKey 報告・回答キー
* @param taskReportlevel * @param taskReportlevel 作業レベル
* @return * @return TaskReportDto 作業報告
*/ */
public TaskReportDto getTaskReport(String taskKey, int taskReportlevel) { public TaskReportDto getTaskReport(String taskKey, int taskReportlevel) {
return mTaskReportDao.getTaskReport(taskKey, taskReportlevel); return mTaskReportDao.getTaskReport(taskKey, taskReportlevel);
......
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
<stroke
android:width="1px"
android:color="#000000" />
<solid android:color="@color/bottom_toolbar"/>
</shape>
<?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>
...@@ -519,10 +519,6 @@ ...@@ -519,10 +519,6 @@
<string name="msg_help_360_move">このボタンを押すと作業コードラベルを移動させることができるようになります。</string> <string name="msg_help_360_move">このボタンを押すと作業コードラベルを移動させることができるようになります。</string>
<string name="msg_help_360_touch">このボタンを押すと作業コードボタンのタップが可能になり、報告できるようになります。</string> <string name="msg_help_360_touch">このボタンを押すと作業コードボタンのタップが可能になり、報告できるようになります。</string>
<!-- 1.1.0 -->
<string name="operation_category">カテゴリ</string>
<string name="type_all">全て</string>
<!-- 1.2.0 --> <!-- 1.2.0 -->
<string name="msg_operation_enable_meeting_room_connected">会議室入室中の為、このボタンは利用できません。\n共通資料画面から資料を選択してください。</string> <string name="msg_operation_enable_meeting_room_connected">会議室入室中の為、このボタンは利用できません。\n共通資料画面から資料を選択してください。</string>
<string name="batch_sync">一括同期</string> <string name="batch_sync">一括同期</string>
...@@ -533,6 +529,9 @@ ...@@ -533,6 +529,9 @@
<string name="msg_batch_sync_new_content_updating">新着更新処理中の為、一括同期できません。</string> <string name="msg_batch_sync_new_content_updating">新着更新処理中の為、一括同期できません。</string>
<string name="msg_batch_sync_error">「%1$s」の同期に失敗しました。同期処理を中止します。\n</string> <string name="msg_batch_sync_error">「%1$s」の同期に失敗しました。同期処理を中止します。\n</string>
<string name="msg_batch_sync_move_operation_view">一括同期中には点検作業報告画面へ遷移できません。</string> <string name="msg_batch_sync_move_operation_view">一括同期中には点検作業報告画面へ遷移できません。</string>
<string name="select_category">カテゴリ選択</string>
<string name="title_category">カテゴリ</string>
<string name="title_all_operation">全作業</string>
<!-- 1.0.1 Resource Pattern 1 --> <!-- 1.0.1 Resource Pattern 1 -->
<!-- 1.9.0.0--> <!-- 1.9.0.0-->
......
...@@ -521,10 +521,6 @@ ...@@ -521,10 +521,6 @@
<string name="msg_help_360_move">이 버튼을 누르면 작업 코드 버튼의 이동이 가능하게 됩니다.</string> <string name="msg_help_360_move">이 버튼을 누르면 작업 코드 버튼의 이동이 가능하게 됩니다.</string>
<string name="msg_help_360_touch">이 버튼을 누르면 작업 코드 버튼의 탭이 가능하게 되므로 보고 화면 표시가 가능하게 됩니다.</string> <string name="msg_help_360_touch">이 버튼을 누르면 작업 코드 버튼의 탭이 가능하게 되므로 보고 화면 표시가 가능하게 됩니다.</string>
<!-- 1.1.0 -->
<string name="operation_category">분류</string>
<string name="type_all">전체</string>
<!-- 1.2.0 --> <!-- 1.2.0 -->
<string name="msg_operation_enable_meeting_room_connected">회의실 접속 중에는 이 버튼을 사용하실수 없습니다. \n공통자료화면에서 자료를 선택해 주세요.</string> <string name="msg_operation_enable_meeting_room_connected">회의실 접속 중에는 이 버튼을 사용하실수 없습니다. \n공통자료화면에서 자료를 선택해 주세요.</string>
<string name="batch_sync">일괄 동기</string> <string name="batch_sync">일괄 동기</string>
...@@ -535,6 +531,9 @@ ...@@ -535,6 +531,9 @@
<string name="msg_batch_sync_new_content_updating">새로운 정보갱신 중에는 일괄 동기을 하실 수 없습니다.</string> <string name="msg_batch_sync_new_content_updating">새로운 정보갱신 중에는 일괄 동기을 하실 수 없습니다.</string>
<string name="msg_batch_sync_error">「%1$s」정보갱신에 실패하였습니다. 동기처리을 중지합니다.\n</string> <string name="msg_batch_sync_error">「%1$s」정보갱신에 실패하였습니다. 동기처리을 중지합니다.\n</string>
<string name="msg_batch_sync_move_operation_view">일괄 동기 처리 중에는 점검작업 보고화면으로 이동하실 수 없습니다.</string> <string name="msg_batch_sync_move_operation_view">일괄 동기 처리 중에는 점검작업 보고화면으로 이동하실 수 없습니다.</string>
<string name="select_category">カテゴリ選択</string>
<string name="title_category">カテゴリ</string>
<string name="title_all_operation">全作業</string>
<!-- 1.0.1 Resource Pattern 1 --> <!-- 1.0.1 Resource Pattern 1 -->
<!-- 1.9.0.0--> <!-- 1.9.0.0-->
......
...@@ -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
...@@ -525,10 +525,7 @@ ...@@ -525,10 +525,7 @@
<string name="msg_help_360_move">Press this button to move the work code label.</string> <string name="msg_help_360_move">Press this button to move the work code label.</string>
<string name="msg_help_360_touch">If you press this button, you will be able to touch the work code button, so you can report the work.</string> <string name="msg_help_360_touch">If you press this button, you will be able to touch the work code button, so you can report the work.</string>
<!-- 1.1.0 --> <!-- 1.2.0 -->
<string name="operation_category">Category</string>
<string name="type_all">All</string>
<string name="msg_operation_enable_meeting_room_connected">Because you are in a conference room, this button is not available right now. \n Please select the document from common document</string> <string name="msg_operation_enable_meeting_room_connected">Because you are in a conference room, this button is not available right now. \n Please select the document from common document</string>
<string name="batch_sync">batch sync</string> <string name="batch_sync">batch sync</string>
<string name="batch_syncing">batch syncing...</string> <string name="batch_syncing">batch syncing...</string>
...@@ -538,6 +535,9 @@ ...@@ -538,6 +535,9 @@
<string name="msg_batch_sync_new_content_updating">Batch synchronization can not be performed because new data is being updated.</string> <string name="msg_batch_sync_new_content_updating">Batch synchronization can not be performed because new data is being updated.</string>
<string name="msg_batch_sync_error">「%1$s」 failed. Cancel synchronization processing.\n</string> <string name="msg_batch_sync_error">「%1$s」 failed. Cancel synchronization processing.\n</string>
<string name="msg_batch_sync_move_operation_view">You can not transition to the inspection work report screen because you are in a batch synchronization.</string> <string name="msg_batch_sync_move_operation_view">You can not transition to the inspection work report screen because you are in a batch synchronization.</string>
<string name="select_category">カテゴリ選択</string>
<string name="title_category">カテゴリ</string>
<string name="title_all_operation">全作業</string>
<!-- 1.0.1 Resource Pattern 1 --> <!-- 1.0.1 Resource Pattern 1 -->
<!-- 1.9.0.0--> <!-- 1.9.0.0-->
......
...@@ -10,154 +10,144 @@ ...@@ -10,154 +10,144 @@
android:id="@+id/toolbar" android:id="@+id/toolbar"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center"
android:background="@color/operation_color" android:background="@color/operation_color"
android:minHeight="50dp" android:minHeight="50dp"
android:visibility="visible"> android:visibility="visible">
<ImageButton <RelativeLayout
android:id="@+id/btn_view_mode" android:layout_width="match_parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:layout_marginLeft="10dp" android:layout_marginLeft="20dp"
android:background="@drawable/ic_display_list" /> android:layout_marginRight="20dp"
android:orientation="horizontal">
<ImageButton
android:id="@+id/icon_filter" <ImageButton
android:layout_width="wrap_content" android:id="@+id/btn_view_mode"
android:layout_height="wrap_content" android:layout_alignParentLeft="true"
android:layout_centerVertical="true" style="@style/ToolBarIcon"
android:layout_marginLeft="15dp" android:src="@drawable/ic_display_list" />
android:layout_toRightOf="@+id/btn_view_mode"
android:onClick="onClickOperationFilterList" <ImageButton
android:background="@drawable/ic_filter" /> android:id="@+id/btn_category_location"
style="@style/ToolBarIcon"
<ImageButton android:layout_toRightOf="@+id/btn_view_mode"
android:id="@+id/btn_search" android:onClick="onClickGroupLocationByTablet"
android:layout_width="wrap_content" android:src="@drawable/ic_category_off" />
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="15dp"
android:layout_toRightOf="@+id/icon_filter"
android:background="@drawable/ic_operation_search" />
<RadioGroup
android:id="@+id/segment_group"
android:layout_width="wrap_content"
android:layout_height="30dp"
android:layout_centerVertical="true"
android:layout_marginLeft="15dp"
android:layout_toRightOf="@+id/btn_search"
android:orientation="horizontal"
android:visibility="visible">
<RadioButton
android:id="@+id/operation_location_type_all"
android:layout_width="80dp"
android:layout_height="match_parent"
android:background="@drawable/operation_location_segment_background"
android:button="@null"
android:checked="true"
android:gravity="center"
android:onClick="onClickOperationLocationType"
android:textColor="@drawable/operation_location_text_color"
android:text="@string/type_all"
android:textStyle="bold" />
<RadioButton
android:id="@+id/operation_location_type_group"
android:layout_width="80dp"
android:layout_height="match_parent"
android:background="@drawable/operation_location_segment_background"
android:button="@null"
android:gravity="center"
android:onClick="onClickOperationLocationType"
android:textColor="@drawable/operation_location_text_color"
android:text="@string/operation_category"
android:textStyle="bold" />
</RadioGroup>
<ImageButton
android:id="@+id/btc_batch_sync"
style="@style/ToolBarIcon"
android:layout_centerVertical="true"
android:layout_marginLeft="10dp"
android:layout_toRightOf="@+id/segment_group"
android:src="@drawable/ic_batch_sync"
android:visibility="gone"/>
<LinearLayout
android:id="@+id/search_result"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginRight="15dp"
android:layout_marginTop="5dp"
android:layout_toLeftOf="@+id/btn_communication_menu"
android:background="@drawable/radius_frame"
android:gravity="center"
android:visibility="gone">
<TextView <TextView
android:id="@+id/operation_title"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingBottom="5dp" android:maxWidth="250dp"
android:paddingLeft="10dp" android:ellipsize="end"
android:paddingRight="10dp" android:singleLine="true"
android:paddingTop="5dp" android:layout_centerHorizontal="true"
android:text="@string/search_result" android:layout_centerVertical="true"
android:textColor="@color/app_color" android:textColor="@color/operation_bg"
android:textSize="@dimen/app_normal_text_size" android:textSize="@dimen/app_normal_text_size"
android:textStyle="bold" /> android:textStyle="bold" />
</LinearLayout> <ImageButton
android:id="@+id/btn_batch_sync"
<ImageButton style="@style/ToolBarIcon"
android:id="@+id/btn_communication_menu" android:layout_toLeftOf="@+id/btn_sort"
android:layout_width="wrap_content" android:src="@drawable/ic_batch_sync"
android:layout_height="wrap_content" android:visibility="gone" />
android:layout_centerVertical="true"
android:layout_marginRight="15dp" <ImageButton
android:layout_toLeftOf="@+id/btn_sub_menu" android:id="@+id/btn_sort"
android:background="@drawable/ic_communication_menu" /> style="@style/ToolBarIcon"
android:layout_toLeftOf="@+id/btn_search"
<ImageButton android:onClick="onClickSortMenuByTablet"
android:id="@+id/btn_sub_menu" android:src="@drawable/ic_sort" />
android:layout_width="wrap_content"
android:layout_height="wrap_content" <ImageButton
android:layout_centerVertical="true" android:id="@+id/btn_search"
android:layout_marginRight="15dp" style="@style/ToolBarIcon"
android:layout_toLeftOf="@+id/btn_common_content" android:layout_alignParentRight="true"
android:background="@drawable/ic_operation_setting" android:src="@drawable/btn_operation_search" />
android:onClick="onClickOperationSubMenu" /> </RelativeLayout>
<ImageButton
android:id="@+id/btn_common_content"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginRight="15dp"
android:layout_toLeftOf="@+id/btn_help"
android:background="@drawable/ic_common_content_off" />
<ImageButton
android:id="@+id/btn_help"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="10dp"
android:background="@drawable/ic_operation_help"
android:onClick="onClickShowHelpView" />
</RelativeLayout> </RelativeLayout>
<FrameLayout <FrameLayout
android:id="@+id/operation_list_layout" android:id="@+id/operation_list_layout"
style="@style/operation_list_bg" style="@style/content_list_bg"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_alignParentLeft="true" android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" android:layout_alignParentStart="true"
android:layout_alignParentTop="true" /> android:layout_weight="1"></FrameLayout>
<LinearLayout
android:id="@+id/toolbar2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:background="@drawable/bottom_toolbar_border"
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
...@@ -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
...@@ -10,161 +10,146 @@ ...@@ -10,161 +10,146 @@
android:id="@+id/toolbar" android:id="@+id/toolbar"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center"
android:background="@color/operation_color" android:background="@color/operation_color"
android:minHeight="50dp" android:minHeight="50dp"
android:visibility="visible"> android:visibility="visible">
<ImageButton <RelativeLayout
android:id="@+id/btn_view_mode" android:layout_width="match_parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:layout_marginLeft="10dp" android:layout_marginLeft="20dp"
android:background="@drawable/ic_display_list" /> android:layout_marginRight="20dp"
android:orientation="horizontal">
<ImageButton
android:id="@+id/icon_filter" <ImageButton
style="@style/ToolBarIcon" android:id="@+id/btn_view_mode"
android:layout_centerVertical="true" android:layout_alignParentLeft="true"
android:layout_marginLeft="10dp" style="@style/ToolBarIcon"
android:layout_toRightOf="@+id/btn_view_mode" android:layout_marginRight="10dp"
android:onClick="onClickOperationFilterList" android:src="@drawable/ic_display_list" />
android:src="@drawable/ic_filter" />
<ImageButton
<RadioGroup android:id="@+id/btn_category_location"
android:id="@+id/segment_group" style="@style/ToolBarIcon"
android:layout_width="wrap_content" android:layout_toRightOf="@+id/btn_view_mode"
android:layout_height="30dp" android:onClick="onClickGroupLocationByNormalSize"
android:layout_centerVertical="true" android:src="@drawable/ic_category_off" />
android:layout_marginLeft="15dp"
android:layout_toRightOf="@+id/icon_filter"
android:orientation="horizontal"
android:visibility="visible">
<RadioButton
android:id="@+id/operation_location_type_all"
android:layout_width="60dp"
android:layout_height="match_parent"
android:background="@drawable/operation_location_segment_background"
android:button="@null"
android:checked="true"
android:gravity="center"
android:onClick="onClickOperationLocationType"
android:textColor="@drawable/operation_location_text_color"
android:text="@string/type_all"
android:textSize="10sp"
android:textStyle="bold" />
<RadioButton <TextView
android:id="@+id/operation_location_type_group" android:id="@+id/operation_title"
android:layout_width="60dp" android:layout_width="wrap_content"
android:layout_height="match_parent" android:layout_height="wrap_content"
android:background="@drawable/operation_location_segment_background" android:maxWidth="100dp"
android:button="@null" android:ellipsize="end"
android:gravity="center" android:singleLine="true"
android:textSize="10sp" android:layout_centerHorizontal="true"
android:onClick="onClickOperationLocationType" android:layout_centerVertical="true"
android:textColor="@drawable/operation_location_text_color" android:textColor="@color/operation_bg"
android:text="@string/operation_category" android:textSize="@dimen/app_normal_text_size"
android:textStyle="bold" /> android:textStyle="bold" />
</RadioGroup>
<ImageButton <ImageButton
android:id="@+id/btc_batch_sync" android:id="@+id/btn_batch_sync"
style="@style/ToolBarIcon" style="@style/ToolBarIcon"
android:layout_centerVertical="true" android:layout_marginRight="10dp"
android:layout_marginLeft="10dp" android:layout_toLeftOf="@+id/btn_sort"
android:layout_toRightOf="@+id/segment_group" android:src="@drawable/ic_batch_sync"
android:src="@drawable/ic_batch_sync" /> android:visibility="gone" />
<ImageButton <ImageButton
android:id="@+id/btn_common_content" android:id="@+id/btn_sort"
android:layout_width="wrap_content" style="@style/ToolBarIcon"
android:layout_height="wrap_content" android:layout_toLeftOf="@+id/btn_search"
android:layout_centerVertical="true" android:layout_marginRight="10dp"
android:layout_marginRight="15dp" android:onClick="onClickSortMenuByNormalSize"
android:layout_toLeftOf="@+id/btn_help" android:src="@drawable/ic_sort" />
android:background="@drawable/ic_common_content_off" />
<ImageButton
android:id="@+id/btn_search"
style="@style/ToolBarIcon"
android:layout_alignParentRight="true"
android:src="@drawable/btn_operation_search" />
</RelativeLayout>
</RelativeLayout>
<ImageButton <FrameLayout
android:id="@+id/btn_help" android:id="@+id/operation_list_layout"
android:layout_width="wrap_content" style="@style/content_list_bg"
android:layout_height="wrap_content" android:layout_width="match_parent"
android:layout_alignParentRight="true" android:layout_height="match_parent"
android:layout_centerVertical="true" android:layout_alignParentLeft="true"
android:layout_marginRight="10dp" android:layout_alignParentStart="true"
android:background="@drawable/ic_operation_help" android:layout_weight="1">
android:onClick="onClickShowHelpView"/>
</RelativeLayout> </FrameLayout>
<RelativeLayout <LinearLayout
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="@drawable/bottom_toolbar_border"
android:minHeight="50dp" android:minHeight="50dp"
android:visibility="visible"> android:visibility="visible">
<ImageButton <LinearLayout
android:id="@+id/btn_communication_menu"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentLeft="true" android:layout_gravity="center"
android:layout_centerVertical="true" android:layout_weight="1"
android:layout_marginLeft="20dp" android:gravity="center">
android:background="@drawable/ic_communication_menu" />
<ImageButton
android:id="@+id/btn_operation_home"
style="@style/ToolBarIcon"
android:src="@drawable/btn_operation_home" />
</LinearLayout>
<LinearLayout <LinearLayout
android:id="@+id/search_result"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:layout_gravity="center" android:layout_gravity="center"
android:layout_toLeftOf="@+id/btn_search" android:layout_weight="1"
android:layout_marginRight="10dp" android:gravity="center">
android:background="@drawable/radius_frame"
android:visibility="gone">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingBottom="5dp"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:paddingTop="5dp"
android:text="@string/search_result"
android:textColor="@color/app_color"
android:textSize="@dimen/app_normal_text_size"
android:textStyle="bold" />
<ImageButton
android:id="@+id/btn_common_content"
style="@style/ToolBarIcon"
android:src="@drawable/btn_common_content" />
</LinearLayout> </LinearLayout>
<ImageButton
android:id="@+id/btn_search"
<LinearLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerVertical="true" android:layout_gravity="center"
android:layout_centerInParent="true" android:layout_weight="1"
android:background="@drawable/ic_operation_search" android:gravity="center">
android:contentDescription="@string/list" />
<ImageButton
android:id="@+id/btn_communication_menu"
style="@style/ToolBarIcon"
android:layout_centerVertical="true"
android:src="@drawable/ic_communication_menu" />
</LinearLayout>
<ImageButton <LinearLayout
android:id="@+id/btn_sub_menu"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerVertical="true" android:layout_gravity="center"
android:layout_marginRight="10dp" android:layout_weight="1"
android:layout_alignParentRight="true" android:gravity="center">
android:background="@drawable/ic_operation_setting"
android:onClick="onClickOperationSubMenu" /> <ImageButton
android:id="@+id/btn_setting"
</RelativeLayout> style="@style/ToolBarIcon"
android:layout_centerVertical="true"
android:src="@drawable/ic_operation_setting"
android:onClick="onClickSetting" />
</LinearLayout>
<FrameLayout </LinearLayout>
android:id="@+id/operation_list_layout"
style="@style/content_list_bg"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</LinearLayout> </LinearLayout>
\ No newline at end of file
...@@ -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"
......
<?xml version="1.0" encoding="utf-8"?>
<CheckedTextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/text1"
android:layout_width="match_parent"
android:layout_height="50dp"
android:textAppearance="?android:attr/textAppearanceMedium"
android:gravity="center_vertical"
android:paddingLeft="6dip"
android:paddingRight="6dip"
android:textColor="@color/text_select"
android:text="@string/dummy_str"
/>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<CheckedTextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/text1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:gravity="center_vertical"
android:checkMark="?android:attr/listChoiceIndicatorSingle"
android:padding="6dp"
/>
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
android:id="@+id/LinearLayout1" android:id="@+id/LinearLayout1"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@color/mydata_bg" android:background="@color/operation_color"
android:orientation="vertical" > android:orientation="vertical" >
<RelativeLayout <RelativeLayout
......
...@@ -2,74 +2,15 @@ ...@@ -2,74 +2,15 @@
<resources> <resources>
<string-array name="sort_names"> <string-array name="sort_names">
<item>コンテンツ名(あいうえお)順</item> <item>作業名(あいうえお)順</item>
<item>コンテンツ番号が小さい順</item> <item>作業期間が新しい順</item>
<item>公開日が新しい順</item> <item>作業期間が古い順</item>
<item>コンテンツサイズが大きい順</item> <item>報告タイプ順</item>
<item>ダウンロード日が新しい順</item>
<item>閲覧回数が多い順</item>
<item>閲覧日が新しい順</item> <item>閲覧日が新しい順</item>
</string-array> </string-array>
<string-array name="sort_names_cloud">
<item>コンテンツ名(あいうえお)順</item>
<item>コンテンツ番号が小さい順</item>
<item>公開日が最新順</item>
<item>コンテンツサイズが大きい順</item>
</string-array>
<string-array name="content_submenu_names">
<item>コンテンツ詳細</item>
<item>コンテンツを開く</item>
<item>コンテンツをWebで開く</item>
<item>コンテンツダウンロード</item>
<item>コンテンツダウンロードキャンセル</item>
<item>コンテンツアップデート</item>
<item>コンテンツ削除</item>
<item>マイデータコピー</item>
<item>マイデータ貼付</item>
<item>フォルダへ移動</item>
<item>お気に入りに追加</item>
<item>お気に入り削除</item>
<item>コンテンツ共有</item>
</string-array>
<string-array name="image_change_effect">
<item>スライド</item>
<item>フェード</item>
<item>リヴィール&amp;ムーブイン</item>
</string-array>
<string-array name="toolbar_submenu">
<item>プリント</item>
<item>お気に入り追加</item>
<item>テキストコピー</item>
</string-array>
<string-array name="avaliable_share_app">
<item>facebook</item>
<item>line</item>
<item>mail</item>
<item>mms</item><!-- SMS -->
<item>message</item><!-- SMS:Sharp端末 -->
<item>conversation</item><!-- SMS:sony端末 -->
<item>android.gm</item><!-- Gmail -->
<item>kakao.talk</item>
<item>twitter</item>
</string-array>
<string-array name="tap_action_on_update"> <string-array name="category_types">
<item>都度選択</item> <item>全て</item>
<item>そのまま開く</item> <item>カテゴリ</item>
<item>自動アップデート</item>
</string-array>
<string-array name="tap_action_on_delivery_select">
<item>ダウンロード</item>
<item>Webを開く</item>
<item>都度選択</item>
</string-array>
<string-array name="fix_orientation">
<item>なし</item>
<item></item>
<item></item>
<item>縦(反転)</item>
</string-array> </string-array>
</resources> </resources>
\ No newline at end of file
...@@ -2,76 +2,15 @@ ...@@ -2,76 +2,15 @@
<resources> <resources>
<string-array name="sort_names"> <string-array name="sort_names">
        <item>콘텐츠명(가나다)순</item>         <item>작업명(가나다)</item>
        <item>콘텐츠 번호가 작은 순서</item>         <item>최신 작업순</item>
        <item>공개일이 최근인 순서</item>         <item>오래된 작업순</item>
        <item>콘텐츠 용량이 큰 순서</item>         <item>보고타입</item>
        <item>다운로드 날짜가 최근인 순서</item>         <item>최신 열람순</item>
        <item>많이 본 순서</item>
        <item>최근에 본 순서</item>
</string-array>
<string-array name="sort_names_cloud">
<item>콘텐츠명(가나다)순</item>
<item>콘텐츠 번호가 작은 순서</item>
<item>공개일이 최근인 순서</item>
<item>콘텐츠 용량이 큰 순서</item>
</string-array>
<string-array name="content_submenu_names">
<item>콘텐츠 상세</item>
<item>콘텐츠 열람</item>
<item>콘텐츠 열람 by Web</item>
<item>콘텐츠 다운로드</item>
<item>콘텐츠 다운로드 취소</item>
<item>콘텐츠 업데이트</item>
<item>콘텐츠 삭제</item>
<item>메모/마킹/북마크 복사</item>
<item>메모/마킹/북마크 붙여 넣기</item>
<item>폴더에 이동</item>
<item>즐겨 찾기에 추가</item>
<item>즐겨 찾기 제거</item>
<item>콘텐츠 공유</item>
</string-array>
<string-array name="image_change_effect">
<item>Slide</item>
<item>Fade</item>
<item>Reveal&amp;Move In</item>
</string-array>
<string-array name="toolbar_submenu">
<item>인쇄</item>
<item>즐겨찾기</item>
<item>본문 추출</item>
</string-array>
<string-array name="avaliable_share_app">
<item>facebook</item>
<item>line</item>
<item>mail</item>
<item>mms</item><!-- SMS -->
<item>message</item><!-- SMS:Sharp端末 -->
<item>conversation</item><!-- SMS:sony端末 -->
<item>daum.android.air</item><!-- mypeople -->
<item>android.gm</item>
<item>kakao.talk</item>
<item>twitter</item>
</string-array> </string-array>
<string-array name="tap_action_on_update"> <string-array name="category_types">
<item>매번 선택</item> <item>전체</item>
<item>열람</item> <item>분류</item>
<item>자동 업데이트</item>
</string-array>
<string-array name="tap_action_on_delivery_select">
<item>다운로드</item>
<item>Web으로 보기</item>
<item>매번 선택</item>
</string-array>
<string-array name="fix_orientation">
<item>미설정</item>
<item>가로</item>
<item>세로</item>
<item>세로(역방향)</item>
</string-array> </string-array>
</resources> </resources>
...@@ -3,114 +3,15 @@ ...@@ -3,114 +3,15 @@
<!-- String Array --> <!-- String Array -->
<string-array name="sort_names"> <string-array name="sort_names">
<item>Content Name</item> <item>Order by name</item>
<item>Content ID</item> <item>Order by start date(descend)</item>
<item>Released date</item> <item>Order by start date(ascend)</item>
<item>Content size</item> <item>Order by operation Type</item>
<item>Downloaded date</item> <item>Order by browse date(descend)</item>
<item>Viewed count</item>
<item>Viewed date</item>
</string-array>
<string-array name="sort_names_cloud">
<item>Content Name</item>
<item>Content ID</item>
<item>Release Date (Desc)</item>
<item>Content Size (Desc)</item>
</string-array>
<string-array name="content_submenu_names">
<item>Content Detail</item>
<item>Content Open</item>
<item>Content Open by Web</item>
<item>Content Download</item>
<item>Cancel Content Download</item>
<item>Update Content</item>
<item>Delete Content</item>
<item>Copy MyData</item>
<item>Paste MyData</item>
<item>Move To Folder</item>
<item>Add Favorite</item>
<item>Delete Favorite</item>
<item>Share Content</item>
</string-array>
<string-array name="image_change_effect">
<item>Slide</item>
<item>Fade</item>
<item>Reviel &amp; Move in</item>
</string-array>
<string-array name="toolbar_submenu">
<item>Print</item>
<item>Add Favorite</item>
<item>Copy Text</item>
</string-array>
<string-array name="reader_dashboard_preset">
<item>recent</item>
<item>most_viewed</item>
<item>favorite</item>
<item>myfolder</item>
</string-array>
<string-array name="avaliable_share_app">
<item>facebook</item>
<item>line</item>
<item>mail</item>
<item>mms</item><!-- SMS -->
<item>message</item><!-- SMS:Sharp端末 -->
<item>conversation</item><!-- SMS:sony端末 -->
<item>android.gm</item>
<item>kakao.talk</item>
<item>twitter</item>
</string-array> </string-array>
<string-array name="tap_action_on_update"> <string-array name="category_types">
<item>Select each time</item> <item>All</item>
<item>Open</item> <item>Category</item>
<item>Auto update</item>
</string-array>
<string-array name="tap_action_on_update_values">
<item>0</item>
<item>1</item>
<item>2</item>
</string-array>
<string-array name="tap_action_on_delivery_select">
<item>Download</item>
<item>Streaming</item>
<item>Select each time</item>
</string-array>
<string-array name="tap_action_on_delivery_select_values">
<item>0</item>
<item>1</item>
<item>2</item>
</string-array>
<string-array name="pdf_image_size_values">
<item>1280x720</item>
<item>1280x1024</item>
<item>1366x768</item>
<item>1920x1080</item>
</string-array>
<string-array name="fix_orientation">
<item>None</item>
<item>Landscape</item>
<item>Portrait</item>
<item>Portrait(Reverse)</item>
</string-array>
<string-array name="fix_orientation_values">
<item>0</item>
<item>1</item>
<item>2</item>
<item>3</item>
</string-array>
<string-array name="monitorTouchMode_values">
<item>0</item>
<item>1</item>
</string-array>
<string-array name="operation_report_types">
<item>Report</item>
<item>Routine</item>
<item>ReportReply</item>
</string-array> </string-array>
</resources> </resources>
\ No newline at end of file
...@@ -114,6 +114,23 @@ public class ABVUIDataCache { ...@@ -114,6 +114,23 @@ public class ABVUIDataCache {
} }
/** /**
* ソート条件をセット
* @param sortCondition ソートタイプ
*/
public void setSortCondition(int sortCondition) {
/* ロケーションタイプ毎にソート条件を保存する */
PreferenceUtil.putUserPref(context, UserPrefKey.OPERATION_SORT_CONDITION, sortCondition);
}
/**
* ソート条件を取得
* @return ソートタイプ(デフォルト : 0)
*/
public int getSortCondition() {
return PreferenceUtil.getUserPref(context, UserPrefKey.OPERATION_SORT_CONDITION, 0);
}
/**
* xmlに書き込みされた作業種別IDを取得 * xmlに書き込みされた作業種別IDを取得
* @return * @return
*/ */
...@@ -160,41 +177,4 @@ public class ABVUIDataCache { ...@@ -160,41 +177,4 @@ public class ABVUIDataCache {
returnContentIdList.clear(); returnContentIdList.clear();
} }
} }
public void setOperationReportTypes(ArrayList<Integer> operationReportTypes) {
this.mReportTypes = operationReportTypes;
String val = null;
if (operationReportTypes.size() > 0) {
// カンマ区切りで保存
StringBuffer sb = new StringBuffer();
for (int contentType : operationReportTypes) {
sb.append(contentType);
sb.append(",");
}
val = sb.substring(0, sb.length() - 1);
}
PreferenceUtil.putUserPref(context, UserPrefKey.OPERATION_REPORT_TYPES, val);
}
public ArrayList<Integer> getOperationReportTypes() {
String operationReportTypesStr = PreferenceUtil.getUserPref(context, UserPrefKey.OPERATION_REPORT_TYPES, null);
if (operationReportTypesStr != null) {
ArrayList<Integer> operationReportTypes = new ArrayList<>();
String[] operationReportTypesStrList = operationReportTypesStr.split(",");
for (String contentType : operationReportTypesStrList) {
if (!StringUtil.isNullOrEmpty(contentType)) {
operationReportTypes.add(Integer.parseInt(contentType));
}
}
mReportTypes = operationReportTypes;
} else {
mReportTypes = new ArrayList<Integer>();
mReportTypes.add(ReportType.Report);
mReportTypes.add(ReportType.RoutineTask);
mReportTypes.add(ReportType.ReportReply);
}
return mReportTypes;
}
} }
...@@ -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;
} }
//更新する場合中止させる。 //更新する場合中止させる。
...@@ -476,12 +520,409 @@ public abstract class ABVUIActivity extends ABVAuthenticatedActivity { ...@@ -476,12 +520,409 @@ public abstract class ABVUIActivity extends ABVAuthenticatedActivity {
} }
// 設定画面表示 // 設定画面表示
public void showSettingPopup() { public void showSetting() {
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);
}
} }
...@@ -15,7 +15,7 @@ public interface AppDefType { ...@@ -15,7 +15,7 @@ public interface AppDefType {
// 作業種別モードフラグ // 作業種別モードフラグ
interface OperationLocationType { interface OperationLocationType {
int ALL = 0; int ALL = 0;
int GROUP = 1; int CATEGORY = 1;
} }
interface DefPrefKey { interface DefPrefKey {
...@@ -59,34 +59,15 @@ public interface AppDefType { ...@@ -59,34 +59,15 @@ public interface AppDefType {
String SYNCED_OPERATION_ID = "syncedOperationId_%d";//一日一回情報更新が出来るように String SYNCED_OPERATION_ID = "syncedOperationId_%d";//一日一回情報更新が出来るように
String VIEW_MODE = "viewMode"; String VIEW_MODE = "viewMode";
String OPERATION_REPORT_TYPES = "operationReportTypes";
String RESOURCE_PATTERN_TYPE = "resourcePatternType"; // 文言リソースパターン String RESOURCE_PATTERN_TYPE = "resourcePatternType"; // 文言リソースパターン
String OPERATION_GROUP_MASERT_MODE = "operation_group_master"; // 通常・作業種別モード(画面) String OPERATION_GROUP_MASERT_MODE = "operation_group_master"; // 通常・作業種別モード(画面)
String OPERATION_GROUP_MASERT_ID = "operation_group_master_id"; // 作業種別のID String OPERATION_GROUP_MASERT_ID = "operation_group_master_id"; // 作業種別のID
String APERTURE_MASTER_DATA_FETCH_DATE = "apertureMasterDataFetchDate"; // 絞り検索マスタデータのFetchDate String OPERATION_SORT_CONDITION = "operation_sort_condition"; // 作業のソート
}
/** String APERTURE_MASTER_DATA_FETCH_DATE = "apertureMasterDataFetchDate"; // 絞り検索マスタデータのFetchDate
* 表示するデータタイプ
* 全て、クラウド、デバイス
*/
interface ContentLocationType{
int CLOUD = 1;
int DEVICE = 2;
int ALL = 9;
}
interface SortType{
int CONTENT_NAME = 0; //コンテンツ名
int CONTENT_ID = 1; //コンテンツ番号
int DELIVERY_STARTDATE = 2; //公開日
int CONTENT_SIZE = 3; //コンテンツサイズ
int DOWNLOAD_DATE = 4; //ダウンロード日
int READING_COUNT = 5; //閲覧回数
int READING_DATE = 6; //閲覧日
} }
interface SubMenuType { interface SubMenuType {
......
...@@ -164,7 +164,7 @@ public class ABVPopupListWindow extends PopupWindow { ...@@ -164,7 +164,7 @@ public class ABVPopupListWindow extends PopupWindow {
int maxWidth = 0; int maxWidth = 0;
View view = null; View view = null;
FrameLayout fakeParent = new FrameLayout(context); FrameLayout fakeParent = new FrameLayout(context);
for (int i=0, count=adapter.getCount(); i<count; i++) { for (int i = 0, count = adapter.getCount(); i < count; i++) {
view = adapter.getView(i, view, fakeParent); view = adapter.getView(i, view, fakeParent);
view.measure(View.MeasureSpec.UNSPECIFIED, View.MeasureSpec.UNSPECIFIED); view.measure(View.MeasureSpec.UNSPECIFIED, View.MeasureSpec.UNSPECIFIED);
int width = view.getMeasuredWidth(); int width = view.getMeasuredWidth();
......
...@@ -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);
......
...@@ -271,26 +271,27 @@ public class ABookSettingFragment extends PreferenceFragment { ...@@ -271,26 +271,27 @@ public class ABookSettingFragment extends PreferenceFragment {
} }
Preference abookCheckManual = findPreference(ABOOK_CHECK_MANUAL); Preference abookCheckManual = findPreference(ABOOK_CHECK_MANUAL);
// リソースパターンの適用 appInfo.removePreference(abookCheckManual);
abookCheckManual.setTitle(PatternStringUtil.patternToString(getActivity().getApplicationContext(), // // リソースパターンの適用
R.string.operation_manual, // abookCheckManual.setTitle(PatternStringUtil.patternToString(getActivity().getApplicationContext(),
getUserPref(getActivity().getApplicationContext(), AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0))); // R.string.operation_manual,
abookCheckManual.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() { // getUserPref(getActivity().getApplicationContext(), AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
@Override // abookCheckManual.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
public boolean onPreferenceClick(Preference preference) { // @Override
try { // public boolean onPreferenceClick(Preference preference) {
Intent intent = new Intent(); // try {
intent.putExtra(ABookKeys.CONTENT_ID, 0L); // Intent intent = new Intent();
intent.putExtra("FILEPATH", ABVEnvironment.getInstance().getContentCacheDirectoryPath(0L)); // intent.putExtra(ABookKeys.CONTENT_ID, 0L);
intent.putExtra("page", 0); // intent.putExtra("FILEPATH", ABVEnvironment.getInstance().getContentCacheDirectoryPath(0L));
intent.setClass(getActivity(), GuideViewActivity.class); // intent.putExtra("page", 0);
startActivity(intent); // intent.setClass(getActivity(), GuideViewActivity.class);
} catch (Exception e) { // startActivity(intent);
Logger.e(TAG, e); // } catch (Exception e) {
} // Logger.e(TAG, e);
return true; // }
} // return true;
}); // }
// });
} }
private void showLicenseDialog() { private void showLicenseDialog() {
......
...@@ -11,7 +11,7 @@ import android.graphics.BitmapFactory; ...@@ -11,7 +11,7 @@ import android.graphics.BitmapFactory;
import android.net.Uri; import android.net.Uri;
import android.os.Bundle; import android.os.Bundle;
import android.provider.MediaStore; import android.provider.MediaStore;
import android.util.SparseBooleanArray; import android.view.Gravity;
import android.view.KeyEvent; import android.view.KeyEvent;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
...@@ -19,15 +19,12 @@ import android.view.Window; ...@@ -19,15 +19,12 @@ import android.view.Window;
import android.widget.AbsListView; import android.widget.AbsListView;
import android.widget.AdapterView; import android.widget.AdapterView;
import android.widget.ArrayAdapter; import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.CheckedTextView;
import android.widget.DatePicker; import android.widget.DatePicker;
import android.widget.EditText; import android.widget.EditText;
import android.widget.FrameLayout; import android.widget.FrameLayout;
import android.widget.GridView; import android.widget.GridView;
import android.widget.ImageButton; import android.widget.ImageButton;
import android.widget.ImageView; import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ListView; import android.widget.ListView;
import android.widget.RadioGroup; import android.widget.RadioGroup;
import android.widget.TextView; import android.widget.TextView;
...@@ -43,7 +40,6 @@ import java.io.File; ...@@ -43,7 +40,6 @@ import java.io.File;
import java.io.FileNotFoundException; import java.io.FileNotFoundException;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.nio.charset.StandardCharsets;
import java.security.NoSuchAlgorithmException; import java.security.NoSuchAlgorithmException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
...@@ -65,7 +61,6 @@ import jp.agentec.abook.abv.bl.common.CommonExecutor; ...@@ -65,7 +61,6 @@ import jp.agentec.abook.abv.bl.common.CommonExecutor;
import jp.agentec.abook.abv.bl.common.Constant; import jp.agentec.abook.abv.bl.common.Constant;
import jp.agentec.abook.abv.bl.common.Constant.ReportType; import jp.agentec.abook.abv.bl.common.Constant.ReportType;
import jp.agentec.abook.abv.bl.common.Constant.TaskReportLevel; import jp.agentec.abook.abv.bl.common.Constant.TaskReportLevel;
import jp.agentec.abook.abv.bl.common.Constant.PushMessageSendType;
import jp.agentec.abook.abv.bl.common.constant.ABookKeys; import jp.agentec.abook.abv.bl.common.constant.ABookKeys;
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;
...@@ -81,18 +76,14 @@ import jp.agentec.abook.abv.bl.data.dao.TaskReportDao; ...@@ -81,18 +76,14 @@ import jp.agentec.abook.abv.bl.data.dao.TaskReportDao;
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.OperationContentDto; import jp.agentec.abook.abv.bl.dto.OperationContentDto;
import jp.agentec.abook.abv.bl.dto.OperationDto; import jp.agentec.abook.abv.bl.dto.OperationDto;
import jp.agentec.abook.abv.bl.dto.OperationGroupMasterDto; import jp.agentec.abook.abv.bl.dto.OperationGroupMasterDto;
import jp.agentec.abook.abv.bl.dto.PushMessageDto;
import jp.agentec.abook.abv.bl.dto.TaskDto; import jp.agentec.abook.abv.bl.dto.TaskDto;
import jp.agentec.abook.abv.bl.dto.TaskReportDto; import jp.agentec.abook.abv.bl.dto.TaskReportDto;
import jp.agentec.abook.abv.bl.logic.AbstractLogic; import jp.agentec.abook.abv.bl.logic.AbstractLogic;
import jp.agentec.abook.abv.bl.logic.OperationGroupMasterLogic; import jp.agentec.abook.abv.bl.logic.OperationGroupMasterLogic;
import jp.agentec.abook.abv.bl.logic.ApertureMasterDataLogic;
import jp.agentec.abook.abv.bl.logic.OperationLogic; import jp.agentec.abook.abv.bl.logic.OperationLogic;
import jp.agentec.abook.abv.bl.logic.PushMessageLogic;
import jp.agentec.abook.abv.cl.util.PreferenceUtil; import jp.agentec.abook.abv.cl.util.PreferenceUtil;
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.common.activity.ABVUIActivity;
...@@ -101,19 +92,15 @@ import jp.agentec.abook.abv.ui.common.appinfo.AppDefType; ...@@ -101,19 +92,15 @@ 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.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.PatternStringUtil; import jp.agentec.abook.abv.ui.common.util.PatternStringUtil;
import jp.agentec.abook.abv.ui.common.view.ABVBatchSyncView; import jp.agentec.abook.abv.ui.common.view.ABVBatchSyncView;
import jp.agentec.abook.abv.ui.common.view.ABVListDialog; import jp.agentec.abook.abv.ui.common.view.ABVListDialog;
import jp.agentec.abook.abv.ui.common.view.ABVPopupListWindow; import jp.agentec.abook.abv.ui.common.view.ABVPopupListWindow;
import jp.agentec.abook.abv.ui.home.adapter.FixPushMessageAdapter;
import jp.agentec.abook.abv.ui.home.adapter.HierarchyOperationGroupListAdapter; import jp.agentec.abook.abv.ui.home.adapter.HierarchyOperationGroupListAdapter;
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.ABookCheckWebViewHelper; import jp.agentec.abook.abv.ui.home.helper.ABookCheckWebViewHelper;
import jp.agentec.abook.abv.ui.home.helper.ActivityHandlingHelper; import jp.agentec.abook.abv.ui.home.helper.ActivityHandlingHelper;
import jp.agentec.abook.abv.ui.home.helper.HomeOperationListHelper; import jp.agentec.abook.abv.ui.home.helper.HomeOperationListHelper;
...@@ -125,7 +112,6 @@ import jp.agentec.adf.util.DateTimeUtil; ...@@ -125,7 +112,6 @@ import jp.agentec.adf.util.DateTimeUtil;
import jp.agentec.adf.util.FileUtil; import jp.agentec.adf.util.FileUtil;
import jp.agentec.adf.util.StringUtil; import jp.agentec.adf.util.StringUtil;
import static jp.agentec.abook.abv.cl.util.PreferenceUtil.getUserPref;
/** /**
* Created by leej on 2018/08/17 * Created by leej on 2018/08/17
...@@ -134,27 +120,24 @@ import static jp.agentec.abook.abv.cl.util.PreferenceUtil.getUserPref; ...@@ -134,27 +120,24 @@ import static jp.agentec.abook.abv.cl.util.PreferenceUtil.getUserPref;
public class OperationListActivity extends ABVUIActivity { public class OperationListActivity extends ABVUIActivity {
private static final String TAG = "OperationListActivity"; private static final String TAG = "OperationListActivity";
private ImageButton mViewModeButton; // リスト・パンネル切り替えボタン private ImageButton mViewModeButton; // パンネル・リスト表示ボタン
private ImageButton mSearchButton; // 検索ボタン private ImageButton mSearchButton; // 検索ボタン
private ImageButton mFilterButton; // フィルタボタン private ImageButton mCommunicationButton; // コミュニケーションボタン
private ImageButton mCommunicationButton; // コミュニケーションボタン private ImageButton mCommonContentButton; // 共通資料ボタン
private ImageButton mCommonContentButton; // 共通資料ボタン private ImageButton mOperationBatchSyncButton; // カテゴリの一括同期ボタン
private ImageButton mOperationBatchSyncButton; // 一括同期ボタン private ImageButton mCategoryLocationButton; // カテゴリ選択ボタン
public String mSearchWord; private TextView mOperationTitle; // 一覧のタイトル
public String mStartDateStr;
public String mEndDateStr;
private EditText mSearchTextView;
private TextView mStartDate;
private TextView mEndDate;
private LinearLayout mSearchResultLayout;
private LinearLayout mReportTypeLayoutLabel; // 検索画面の条件(文字列)
private LinearLayout mReportTypeLayoutButton; public String mSearchWord; // 検索画面の値(作業名)
private Button mReportTypeAllButton; public String mStartDateStr; // 検索画面の値(作業開始日)
private Button mReportTypeDefaultButton; public String mEndDateStr; // 検索画面の値(作業終了日)
private Button mReportTypeRoutineTaskButton;
private EditText mSearchTextView; // 検索画面の作業名
private TextView mStartDate; // 検索画面の作業開始日
private TextView mEndDate; // 検索画面の作業終了日
private Dialog mSearchDialog; private Dialog mSearchDialog;
private Date mOperationLastEditDate; private Date mOperationLastEditDate;
...@@ -169,32 +152,16 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -169,32 +152,16 @@ 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;
private ArrayList<Integer> mAllOperationReportTypes;
private ABVListDialog mShowDialog; private ABVListDialog mShowDialog;
private Map<Integer, Integer> operationCountMap; private Map<Integer, Integer> operationCountMap;
...@@ -204,12 +171,6 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -204,12 +171,6 @@ public class OperationListActivity extends ABVUIActivity {
// 作業種別のサービスオプション値を保持用フラグ // 作業種別のサービスオプション値を保持用フラグ
private boolean mOperationGroupMasterServiceOperationFlg; private boolean mOperationGroupMasterServiceOperationFlg;
// 絞り検索マスタデータ
// private Date mApertureLastEditDate;
// 絞り検索マスタLogic
private ApertureMasterDataLogic mApertureMasterDataLogic = AbstractLogic.getLogic(ApertureMasterDataLogic.class);
// ビューの作成 // ビューの作成
private class ReloadHandler implements Runnable { private class ReloadHandler implements Runnable {
@Override @Override
...@@ -224,9 +185,9 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -224,9 +185,9 @@ public class OperationListActivity extends ABVUIActivity {
vg.addView(child); vg.addView(child);
// ツールバーのビューモードイメージ変更 // ツールバーのビューモードイメージ変更
if (getABVUIDataCache().getViewMode() == AppDefType.ViewMode.PANEL) { if (getABVUIDataCache().getViewMode() == AppDefType.ViewMode.PANEL) {
mViewModeButton.setBackground(getRDrawable(R.drawable.ic_display_list)); mViewModeButton.setImageResource(R.drawable.ic_display_list);
} else { } else {
mViewModeButton.setBackground(getRDrawable(R.drawable.ic_display_pannel)); mViewModeButton.setImageResource(R.drawable.ic_display_pannel);
} }
closeProgressPopup(); closeProgressPopup();
} }
...@@ -241,18 +202,21 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -241,18 +202,21 @@ public class OperationListActivity extends ABVUIActivity {
mViewModeButton = (ImageButton) findViewById(R.id.btn_view_mode); mViewModeButton = (ImageButton) findViewById(R.id.btn_view_mode);
// 検索ボタン // 検索ボタン
mSearchButton = (ImageButton) findViewById(R.id.btn_search); mSearchButton = (ImageButton) findViewById(R.id.btn_search);
// フィルターボタン // ツールバーのタイトル表示
mFilterButton = (ImageButton) findViewById(R.id.icon_filter); mOperationTitle = (TextView) findViewById(R.id.operation_title);
mOperationBatchSyncButton = (ImageButton) findViewById(R.id.btn_batch_sync);
mSearchResultLayout = (LinearLayout) findViewById(R.id.search_result);
mCommunicationButton = (ImageButton) findViewById(R.id.btn_communication_menu); mCommunicationButton = (ImageButton) findViewById(R.id.btn_communication_menu);
mCommonContentButton = (ImageButton) findViewById(R.id.btn_common_content); mCommonContentButton = (ImageButton) findViewById(R.id.btn_common_content);
mLocationTypeRadioGroup = (RadioGroup) findViewById(R.id.segment_group); mCategoryLocationButton = (ImageButton) findViewById(R.id.btn_category_location);
mOperationBatchSyncButton = (ImageButton) findViewById(R.id.btc_batch_sync);
// 定期点検で同期ボタンタップの日付と現在の日付が異なる且つ、作業するデータが存在しない場合、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
...@@ -269,9 +233,6 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -269,9 +233,6 @@ public class OperationListActivity extends ABVUIActivity {
// サービスオプション(作業種別使用)をセット // サービスオプション(作業種別使用)をセット
mOperationGroupMasterServiceOperationFlg = ABVDataCache.getInstance().serviceOption.isOperationGroupMaster(); mOperationGroupMasterServiceOperationFlg = ABVDataCache.getInstance().serviceOption.isOperationGroupMaster();
// 全て・作業種別のセグメントチェック設定
checkOperationGroupType(getABVUIDataCache().getOperationGroupMasterMode());
// 検索アイコンのクリックイベント // 検索アイコンのクリックイベント
mSearchButton.setOnClickListener(new View.OnClickListener() { mSearchButton.setOnClickListener(new View.OnClickListener() {
@Override @Override
...@@ -280,16 +241,6 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -280,16 +241,6 @@ public class OperationListActivity extends ABVUIActivity {
} }
}); });
mSearchResultLayout.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
showSearchDialog();
}
});
mSelectedFixPuchMessagePosition = 0;
mSendType = 0;
// コミュニケーションボタン // コミュニケーションボタン
mCommunicationButton.setOnClickListener(new View.OnClickListener() { mCommunicationButton.setOnClickListener(new View.OnClickListener() {
@Override @Override
...@@ -387,8 +338,6 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -387,8 +338,6 @@ public class OperationListActivity extends ABVUIActivity {
alertDialog.show(); alertDialog.show();
} }
} }
mAllOperationReportTypes = getOperationReportTypeList(true);
// リスト更新 // リスト更新
setOperationListView(); setOperationListView();
} }
...@@ -397,78 +346,54 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -397,78 +346,54 @@ 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); intent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
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);
}
// フィルター選択判定
checkSelectedFilterType();
// 作業種別表示・非表示 // 作業種別表示・非表示
if (mOperationGroupMasterServiceOperationFlg) { if (mOperationGroupMasterServiceOperationFlg) {
mLocationTypeRadioGroup.setVisibility(View.VISIBLE); mCategoryLocationButton.setVisibility(View.VISIBLE);
// アイコンの変更 // アイコンの変更
if (getABVUIDataCache().getOperationGroupMasterMode() == OperationLocationType.GROUP) { if (getABVUIDataCache().getOperationGroupMasterMode() == OperationLocationType.CATEGORY) {
setCategoryImage(true);
mOperationTitle.setText(R.string.title_category);
// 検索ワード削除 // 検索ワード削除
clearSearch(); clearSearch();
// フィルタのリセット
getABVUIDataCache().setOperationReportTypes(mAllOperationReportTypes);
// フィルターボタンを無効にする
mFilterButton.setImageDrawable(getRDrawable(R.drawable.ic_filter));
setEnabledImageButton(mFilterButton, false);
// 検索ボタンを無効にする // 検索ボタンを無効にする
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(mFilterButton, true); mSearchButton.setEnabled(true);
setEnabledImageButton(mSearchButton, true); setCategoryImage(false);
// 一括同期ボタン非表示 // 一括同期ボタン非表示
mOperationBatchSyncButton.setVisibility(View.GONE); mOperationBatchSyncButton.setVisibility(View.GONE);
mOperationTitle.setText(R.string.title_all_operation);
} }
// 全て・作業種別のセグメントチェック設定
checkOperationGroupType(getABVUIDataCache().getOperationGroupMasterMode());
} else { } else {
mOperationTitle.setText(R.string.title_all_operation);
// アイコン非表示 // アイコン非表示
mLocationTypeRadioGroup.setVisibility(View.GONE); setCategoryImage(false);
mCategoryLocationButton.setVisibility(View.GONE);
// 一括同期ボタンを非表示 // 一括同期ボタンを非表示
mOperationBatchSyncButton.setVisibility(View.GONE); mOperationBatchSyncButton.setVisibility(View.GONE);
// ボタンを活性化 // 検索ボタンを活性化
setEnabledImageButton(mFilterButton, true); mSearchButton.setEnabled(true);
setEnabledImageButton(mSearchButton, true);
} }
// ツールバーの検索結果レイアウトの表示・非表示 // 検索済みの場合、タイトルを「検索結果」にする
checkShowSearchResult(); if (isSearched()) {
mOperationTitle.setText(R.string.search_result);
}
} }
// 検索ワードのクリア // 検索ワードのクリア
...@@ -478,6 +403,12 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -478,6 +403,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) {
...@@ -491,6 +422,11 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -491,6 +422,11 @@ public class OperationListActivity extends ABVUIActivity {
} }
} }
// カテゴリのアイコンイメージ設定
private void setCategoryImage(boolean isCategory) {
mCategoryLocationButton.setImageResource(isCategory ? R.drawable.ic_category_on : R.drawable.ic_category_off);
}
/** /**
* ビューを作り直す。 * ビューを作り直す。
*/ */
...@@ -651,10 +587,13 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -651,10 +587,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);
}
} }
}); });
...@@ -753,17 +692,6 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -753,17 +692,6 @@ public class OperationListActivity extends ABVUIActivity {
return result; return result;
} }
// ツールバーの検索結果レイアウトの表示・非表示
private void checkShowSearchResult() {
if (StringUtil.isNullOrEmpty(mSearchWord) && StringUtil.isNullOrEmpty(mStartDateStr) && StringUtil.isNullOrEmpty(mEndDateStr)) {
// 検索ワードが存在しない場合、検索結果ではないので非表示
mSearchResultLayout.setVisibility(View.GONE);
} else {
// 検索ワードが存在するため、検索結果と見做し、表示
mSearchResultLayout.setVisibility(View.VISIBLE);
}
}
public void startTaskDirectionOrReportView(OperationDto operationDto) { public void startTaskDirectionOrReportView(OperationDto operationDto) {
ContentDto contentDto = contentDao.getContent(operationDto.contentId); ContentDto contentDto = contentDao.getContent(operationDto.contentId);
try { try {
...@@ -781,6 +709,8 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -781,6 +709,8 @@ public class OperationListActivity extends ABVUIActivity {
mOperationLogic.createJsonForOpenABookCheckPano(operationDto.operationId, operationDto.contentId, contentPath); mOperationLogic.createJsonForOpenABookCheckPano(operationDto.operationId, operationDto.contentId, contentPath);
mOperationLogic.createJsonForOperationContent(operationDto.operationId, contentPath, operationDto.reportType == ReportType.RoutineTask); mOperationLogic.createJsonForOperationContent(operationDto.operationId, contentPath, operationDto.reportType == ReportType.RoutineTask);
// 作業閲覧日付の更新
mOperationDao.updateReadingDate(operationDto.operationId);
// サーバ作業後、対応必要 // サーバ作業後、対応必要
StringBuffer path = new StringBuffer(); StringBuffer path = new StringBuffer();
...@@ -961,18 +891,10 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -961,18 +891,10 @@ public class OperationListActivity extends ABVUIActivity {
} }
// 設定画面へ遷移 // 設定画面へ遷移
public void onClickOperationSubMenu(View v) { public void onClickSetting(View v) {
showSettingPopup(); showSetting();
} }
public void onClickShowHelpView(View v) {
// if (mOperationAuthLevel == OperationAuthLevel.OPERATION_INSTRUCTOR) {
// showHelpViewDialog(Constant.HelpViewType.OperationListDirector);
// } else {
showHelpViewDialog(Constant.HelpViewType.OperationListReporter);
// }
}
/** /**
* 360編集画面表示 * 360編集画面表示
* *
...@@ -1404,378 +1326,6 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -1404,378 +1326,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
...@@ -1977,84 +1527,6 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -1977,84 +1527,6 @@ public class OperationListActivity extends ABVUIActivity {
}); });
} }
/**
* 並べ替え画面表示
*
* @param anchor
*/
public void onClickOperationFilterList(final View anchor) {
Logger.d(TAG, "onClickShowContentContainerList start");
final ABVPopupListWindow popup = new ABVPopupListWindow(this, R.layout.popup_simple_list);
popup.setTitle(getRString(R.string.filter));
popup.setWidth(getRDimensionSize(R.dimen.popup_size_xlarge));
// 表示するコンテンツタイプのリストを作成
List<String> members = Arrays.asList(getRStringArray(R.array.operation_report_types));
for (int i = 0; i < members.size(); i++) {
int rId = getResources().getIdentifier(members.get(i), "string", getPackageName());
// リソースパターンの適用
members.set(i, PatternStringUtil.patternToString(getApplicationContext(),
rId,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
}
ArrayList<Integer> selectedOperationReportTypes = getOperationReportTypeList(false);
ArrayAdapter<String> adapter = new ArrayAdapter<>(this, R.layout.item_checked_list, members);
popup.setListViewAdapter(adapter);
final ListView listView = popup.getListView();
listView.setChoiceMode(AbsListView.CHOICE_MODE_MULTIPLE);
for (int i = 0; i < mAllOperationReportTypes.size(); i++) {
for (Integer id : selectedOperationReportTypes) {
if (id.equals(mAllOperationReportTypes.get(i))) {
listView.setItemChecked(i, true);
}
}
}
listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long cid) {
// 並び替えの要素タップイベント
SparseBooleanArray checkedItemPositions = popup.getListView().getCheckedItemPositions();
ArrayList<Integer> selectedOperationReportTypeIds = new ArrayList<>();
for (int i = 0; i < checkedItemPositions.size(); i++) {
if (checkedItemPositions.valueAt(i)) {
selectedOperationReportTypeIds.add(mAllOperationReportTypes.get(checkedItemPositions.keyAt(i)));
}
}
if (selectedOperationReportTypeIds.size() > 0) {
getABVUIDataCache().setOperationReportTypes(selectedOperationReportTypeIds);
refreshOperationList();
} else {
((CheckedTextView)view).setChecked(true);
listView.getCheckedItemPositions().put(position, true);
}
}
});
listView.invalidate();
popup.showAsDropDown(anchor);
}
/**
* フィルター(報告タイプ)の項目取得
* @param isAll フィルターの全ての項目を取得するか、チェックのみ取得するか判定フラグ
* @return
*/
private ArrayList<Integer> getOperationReportTypeList(boolean isAll) {
ArrayList<Integer> operationReportTypes = new ArrayList<>();
if (isAll) {
operationReportTypes.add(ReportType.Report);
operationReportTypes.add(ReportType.RoutineTask);
operationReportTypes.add(ReportType.ReportReply);
} else {
operationReportTypes = getABVUIDataCache().getOperationReportTypes();
}
return operationReportTypes;
}
// ログイン成功した後、新着更新時の「ContentVersion」APIからリソースパターンを取得し、ローカルに保存する。 // ログイン成功した後、新着更新時の「ContentVersion」APIからリソースパターンを取得し、ローカルに保存する。
private void setResourcePattern() { private void setResourcePattern() {
Logger.d(TAG, "ABVEnvironment.getInstance().resourcePatternType : " + ABVEnvironment.getInstance().resourcePatternType); Logger.d(TAG, "ABVEnvironment.getInstance().resourcePatternType : " + ABVEnvironment.getInstance().resourcePatternType);
...@@ -2062,24 +1534,10 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -2062,24 +1534,10 @@ public class OperationListActivity extends ABVUIActivity {
} }
/** /**
* フィルターの選択があるか判定して、画像を変更
*/
private void checkSelectedFilterType() {
List<Integer> defaultTypeList = getOperationReportTypeList(true);
ArrayList<Integer> selectedOperationReportTypes = getOperationReportTypeList(false);
if (defaultTypeList.size() == selectedOperationReportTypes.size()) {
mFilterButton.setImageDrawable(getRDrawable(R.drawable.ic_filter));
} else {
mFilterButton.setImageDrawable(getRDrawable(R.drawable.ic_filter_selected));
}
}
/**
* 作業種別の選択のダイアログ画面表示 * 作業種別の選択のダイアログ画面表示
* @param isInit * @param isInit 初期表示
* @param autoClose 直下階層が存在しない場合、ダイアログを自動で閉じる
*/ */
public void showOperationGroupMasterDialog(boolean isInit, boolean autoClose) { public void showOperationGroupMasterDialog(boolean isInit) {
if (isInit || operationCountMap == null) { if (isInit || operationCountMap == null) {
// 最後の階層レベルを取得 // 最後の階層レベルを取得
Integer lastLevel = mOperationGroupMasterLogic.getLastGroupLevel(); Integer lastLevel = mOperationGroupMasterLogic.getLastGroupLevel();
...@@ -2111,11 +1569,6 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -2111,11 +1569,6 @@ public class OperationListActivity extends ABVUIActivity {
} }
}); });
// autoCloseがtrueの場合、下位階層が存在しなければreturnで以下の処理は行わない
if (autoClose && (operationGroupMasterDtoList == null || operationGroupMasterDtoList.size() < 1)) {
return;
}
boolean[] haveChildFlags = new boolean[operationGroupMasterDtoList.size()]; boolean[] haveChildFlags = new boolean[operationGroupMasterDtoList.size()];
int[] operationCounts = new int[operationGroupMasterDtoList.size()]; int[] operationCounts = new int[operationGroupMasterDtoList.size()];
int i = 0; int i = 0;
...@@ -2146,7 +1599,7 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -2146,7 +1599,7 @@ public class OperationListActivity extends ABVUIActivity {
helper.popList(1, true); helper.popList(1, true);
// ポップアップ再表示 // ポップアップ再表示
dialog.dismiss(); dialog.dismiss();
showOperationGroupMasterDialog(false, false); showOperationGroupMasterDialog(false);
} }
}); });
} else { } else {
...@@ -2162,7 +1615,7 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -2162,7 +1615,7 @@ public class OperationListActivity extends ABVUIActivity {
helper.pushList(operationGroupMasterDto); helper.pushList(operationGroupMasterDto);
// ポップアップ再表示 // ポップアップ再表示
dialog.dismiss(); dialog.dismiss();
showOperationGroupMasterDialog(false, true); showOperationGroupMasterDialog(false);
} }
}); });
...@@ -2181,7 +1634,7 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -2181,7 +1634,7 @@ public class OperationListActivity extends ABVUIActivity {
*/ */
private OperationListHelper getListHelper() { private OperationListHelper getListHelper() {
OperationListHelper operationListHelper; OperationListHelper operationListHelper;
if (mOperationGroupMasterServiceOperationFlg && getABVUIDataCache().getOperationGroupMasterMode() == OperationLocationType.GROUP) { if (mOperationGroupMasterServiceOperationFlg && getABVUIDataCache().getOperationGroupMasterMode() == OperationLocationType.CATEGORY) {
operationListHelper = new OperationGroupMasterListHelper(this); operationListHelper = new OperationGroupMasterListHelper(this);
} else { } else {
operationListHelper = new HomeOperationListHelper(this); operationListHelper = new HomeOperationListHelper(this);
...@@ -2215,51 +1668,12 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -2215,51 +1668,12 @@ public class OperationListActivity extends ABVUIActivity {
} }
/** /**
* セグメント(全て・カテゴリ)のクリックイベント
* @param view
*/
public void onClickOperationLocationType(View view) {
if (view.getId() == R.id.operation_location_type_group) {
// カテゴリ
getABVUIDataCache().setOperationGroupMasterMode(OperationLocationType.GROUP);
} else {
// 全て
getABVUIDataCache().setOperationGroupMasterMode(OperationLocationType.ALL);
}
// プログレスバー表示(ビューが作り終わるとcloseProgressPopup()が呼ばれる
showProgressPopup();
setOperationListView();
if (getABVUIDataCache().getOperationGroupMasterMode() == OperationLocationType.GROUP) {
//作業種別モードの場合は、作業種別選択ダイアログ画面を表示
showOperationGroupMasterDialog(true, false);
}
}
/**
* セグメントのチェック設定
* @param operationGroupType
*/
private void checkOperationGroupType(final int operationGroupType) {
switch (operationGroupType) {
case OperationLocationType.GROUP:
mLocationTypeRadioGroup.check(R.id.operation_location_type_group);
break;
case OperationLocationType.ALL:
default:
mLocationTypeRadioGroup.check(R.id.operation_location_type_all);
break;
}
}
/**
* 絞り検索の日付を設定 * 絞り検索の日付を設定
*/ */
private void setApertureMasterDataFetchDate() { private void setApertureMasterDataFetchDate() {
putUserPref(AppDefType.UserPrefKey.APERTURE_MASTER_DATA_FETCH_DATE, ABVDataCache.getInstance().getTempApertureMasterDataFetchDate()); putUserPref(AppDefType.UserPrefKey.APERTURE_MASTER_DATA_FETCH_DATE, ABVDataCache.getInstance().getTempApertureMasterDataFetchDate());
} }
/** /**
* カテゴリの一括同期ダイアログ表示 * カテゴリの一括同期ダイアログ表示
*/ */
...@@ -2374,7 +1788,187 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -2374,7 +1788,187 @@ public class OperationListActivity extends ABVUIActivity {
public void onDestroy() { public void onDestroy() {
Logger.d(TAG, "onDestroy"); Logger.d(TAG, "onDestroy");
contentDownloader.removeContentDownloadListener(this); contentDownloader.removeContentDownloadListener(this);
batchSyncView.setActivityDestroy(); if (batchSyncView != null) {
batchSyncView.setActivityDestroy();
}
super.onDestroy(); super.onDestroy();
} }
/**
* 並び替え設定メニュー(タブレット)
* @param anchor
*/
public void onClickSortMenuByTablet(View anchor) {
Logger.d(TAG, "onClickShowSortConditionList");
final ABVPopupListWindow popup = new ABVPopupListWindow(this, R.layout.popup_simple_list);
popup.setTitle(getRString(R.string.sort_title));
ListView listView = popup.getListView();
// ソート用のリストビューセット
ArrayAdapter<String> adapter = setSortListView(listView);
listView.setAdapter(adapter);
listView.setItemChecked(getABVUIDataCache().getSortCondition(), true);
// 横幅をフィットさせる
popup.setWidth((int)(ABVPopupListWindow.getWidestView(this, adapter) * 1.15));
popup.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
Logger.d(TAG, "onClickSortMenuByTablet id:" + id);
getABVUIDataCache().setSortCondition((int)id);
// ビューア更新
refreshOperationList();
}
});
if (anchor == null) {
// 呼び出したViewが存在しない場合、真ん中に表示する
popup.showAtLocation(getWindow().getDecorView().findViewById(android.R.id.content), Gravity.CENTER, 0,0);
} else {
popup.showAsDropDown(anchor);
}
}
/**
* 並び替え設定メニュー(スマートフォン)
* @param view
*/
public void onClickSortMenuByNormalSize(View view) {
final ABVListDialog dialog = new ABVListDialog(this, getString(R.string.sort_title));
// ダイアログ表示時、ダイアログ以外の画面をタップしても閉じられないように設定
dialog.setCanceledOnTouchOutside(false);
// ソート用のリストビューセット
ListView listView = dialog.getListView();
dialog.setListViewAdapter(setSortListView(listView));
listView.setItemChecked(getABVUIDataCache().getSortCondition(), true);
mShowDialog = dialog;
// 閉じるボタン
dialog.setRightItemOnClickListener(R.drawable.ic_operation_close, new View.OnClickListener() {
@Override
public void onClick(View v) {
dialog.dismiss();
}
});
dialog.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
// ポップアップ非表示
dialog.dismiss();
getABVUIDataCache().setSortCondition((int)id);
refreshOperationList();
}
});
if (isNormalSize()) {
dialog.showHalfSize();
} else {
dialog.show();
}
}
// 並び替えの表示するソートリスト
/**
* 並び替えの表示するソートリスト
* @param listView
* @return ArrayAdapter ソート名をセットしたアダプタ
*/
private ArrayAdapter<String> setSortListView(ListView listView) {
listView.setChoiceMode(AbsListView.CHOICE_MODE_SINGLE);
return new ArrayAdapter<>(this, R.layout.item_checked_list, Arrays.asList(getRStringArray(R.array.sort_names)));
}
/**
* 並べ替え画面表示
*
* @param anchor
*/
public void onClickGroupLocationByTablet(final View anchor) {
Logger.d(TAG, "onClickGroupLocationByTablet start");
final ABVPopupListWindow popup = new ABVPopupListWindow(this, R.layout.popup_simple_list);
popup.setTitle(getRString(R.string.select_category));
popup.setWidth(getRDimensionSize(R.dimen.popup_size_large));
// 表示するコンテンツタイプのリストを作成
ListView listView = popup.getListView();
ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, R.layout.item_dialog_list, Arrays.asList(getRStringArray(R.array.category_types)));
popup.setListViewAdapter(adapter);
popup.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
popup.dismiss();
setOperationLocation(id);
}
});
if (anchor == null) {
// 呼び出したViewが存在しない場合、真ん中に表示する
popup.showAtLocation(getWindow().getDecorView().findViewById(android.R.id.content), Gravity.CENTER, 0,0);
} else {
popup.showAsDropDown(anchor);
}
}
// 全て・カテゴリ選択画面(スマートフォン)
public void onClickGroupLocationByNormalSize(View view) {
final ABVListDialog dialog = new ABVListDialog(this);
// 外側タップしてもダイアログ画面が閉じられないように設定
final ArrayAdapter<String> adapter = new ArrayAdapter<>(this, R.layout.item_dialog_list, Arrays.asList(getRStringArray(R.array.category_types)));
dialog.setTitle(getRString(R.string.select_category));
dialog.setListViewAdapter(adapter);
dialog.setCanceledOnTouchOutside(false);
// 閉じるボタン
dialog.setRightItemOnClickListener(R.drawable.ic_operation_close, new View.OnClickListener() {
@Override
public void onClick(View v) {
dialog.dismiss();
}
});
dialog.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
// ポップアップ再表示
dialog.dismiss();
setOperationLocation(id);
}
});
if (isNormalSize()) {
dialog.showHalfSize();
} else {
dialog.show();
}
}
/**
* カテゴリ選択した内容で設定・表示する
* @param type 0 : 全て 1: カテゴリ
*/
private void setOperationLocation(long type) {
Logger.d(TAG, "setOperationLocation type :" + type);
int localType = getABVUIDataCache().getOperationGroupMasterMode();
// loadFlgがtrueの場合のみ、タイプを保存して画面を再作成する
if (localType != type) {
// typeの値をxmlに書き込み
getABVUIDataCache().setOperationGroupMasterMode((int) type);
// プログレスバー
showProgressPopup();
setOperationListView();
}
if (getABVUIDataCache().getOperationGroupMasterMode() == OperationLocationType.CATEGORY) {
//作業種別モードの場合は、作業種別選択ダイアログ画面を表示
showOperationGroupMasterDialog(true);
}
}
} }
...@@ -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();
} }
}); });
...@@ -335,6 +338,10 @@ public class OperationRelatedContentActivity extends ABVUIActivity { ...@@ -335,6 +338,10 @@ public class OperationRelatedContentActivity extends ABVUIActivity {
}); });
} }
/**
* 資料の削除ダイアログ表示
* @param contentDto 資料情報
*/
public void showContentDeleteDialog(final ContentDto contentDto) { public void showContentDeleteDialog(final ContentDto contentDto) {
ABookAlertDialog contentsDeleteDialog = AlertDialogUtil.deleteContentAlertDialog(this); ABookAlertDialog contentsDeleteDialog = AlertDialogUtil.deleteContentAlertDialog(this);
contentsDeleteDialog.setNegativeButton(R.string.cancel, null); contentsDeleteDialog.setNegativeButton(R.string.cancel, null);
...@@ -353,6 +360,15 @@ public class OperationRelatedContentActivity extends ABVUIActivity { ...@@ -353,6 +360,15 @@ public class OperationRelatedContentActivity extends ABVUIActivity {
showAlertDialog(contentsDeleteDialog); showAlertDialog(contentsDeleteDialog);
} }
/**
* 作業一覧へ戻る
*/
private void backToHome() {
finish();
// 終了後、アニメーション追加(左へ移動)
overridePendingTransition(R.anim.viewin_left_to_right, R.anim.viewout_left_to_right);
}
public void showCancelDownloadDialog(final ContentDto contentDto) { public void showCancelDownloadDialog(final ContentDto contentDto) {
// リソースパターンの適用 // リソースパターンの適用
ABookAlertDialog cancelDownloadDialog = AlertDialogUtil.createAlertDialog(this, ABookAlertDialog cancelDownloadDialog = AlertDialogUtil.createAlertDialog(this,
...@@ -373,6 +389,17 @@ public class OperationRelatedContentActivity extends ABVUIActivity { ...@@ -373,6 +389,17 @@ 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 true;
}
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 +437,8 @@ public class OperationRelatedContentActivity extends ABVUIActivity { ...@@ -410,11 +437,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;
}
} }
...@@ -24,7 +24,7 @@ import static jp.agentec.abook.abv.cl.util.PreferenceUtil.getUserPref; ...@@ -24,7 +24,7 @@ import static jp.agentec.abook.abv.cl.util.PreferenceUtil.getUserPref;
* @author jang * @author jang
* *
*/ */
public abstract class HierarchyOperationListHelper<StackObject> extends OperationListHelper implements OnClickListener { public abstract class CategoryOperationListHelper<StackObject> extends OperationListHelper implements OnClickListener {
private final int MP = LayoutParams.MATCH_PARENT; private final int MP = LayoutParams.MATCH_PARENT;
private final int WP = LayoutParams.WRAP_CONTENT; private final int WP = LayoutParams.WRAP_CONTENT;
protected Stack<StackObject> stack; protected Stack<StackObject> stack;
...@@ -39,7 +39,7 @@ public abstract class HierarchyOperationListHelper<StackObject> extends Operatio ...@@ -39,7 +39,7 @@ public abstract class HierarchyOperationListHelper<StackObject> extends Operatio
* 階層構造を持つ親クラス * 階層構造を持つ親クラス
* @param appActivity * @param appActivity
*/ */
public HierarchyOperationListHelper(OperationListActivity appActivity) { public CategoryOperationListHelper(OperationListActivity appActivity) {
super(appActivity); super(appActivity);
mHierarchyContentLayout = new LinearLayout(appActivity); mHierarchyContentLayout = new LinearLayout(appActivity);
...@@ -56,7 +56,7 @@ public abstract class HierarchyOperationListHelper<StackObject> extends Operatio ...@@ -56,7 +56,7 @@ public abstract class HierarchyOperationListHelper<StackObject> extends Operatio
panListLayout.findViewById(R.id.btn_show_list_view).setOnClickListener(new OnClickListener() { panListLayout.findViewById(R.id.btn_show_list_view).setOnClickListener(new OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
mAppActivity.showOperationGroupMasterDialog(true,false); mAppActivity.showOperationGroupMasterDialog(true);
} }
}); });
......
...@@ -2,6 +2,7 @@ package jp.agentec.abook.abv.ui.home.helper; ...@@ -2,6 +2,7 @@ package jp.agentec.abook.abv.ui.home.helper;
import java.util.List; import java.util.List;
import jp.agentec.abook.abv.bl.acms.type.OperationSortingType;
import jp.agentec.abook.abv.bl.common.log.Logger; import jp.agentec.abook.abv.bl.common.log.Logger;
import jp.agentec.abook.abv.bl.dto.ContentDto; import jp.agentec.abook.abv.bl.dto.ContentDto;
import jp.agentec.abook.abv.bl.dto.OperationDto; import jp.agentec.abook.abv.bl.dto.OperationDto;
...@@ -26,7 +27,8 @@ public class HomeOperationListHelper extends OperationListHelper { ...@@ -26,7 +27,8 @@ public class HomeOperationListHelper extends OperationListHelper {
@Override @Override
protected List<OperationDto> findOperationList() throws Exception { protected List<OperationDto> findOperationList() throws Exception {
String reportTypeStr = getUserPref(mAppActivity, AppDefType.UserPrefKey.OPERATION_REPORT_TYPES, null); int operationSortType = getUserPref(mAppActivity, AppDefType.UserPrefKey.OPERATION_SORT_CONDITION, 0);
return operationLogic.getRefreshOperation(mAppActivity.mSearchWord, mAppActivity.mStartDateStr, mAppActivity.mEndDateStr, reportTypeStr); OperationSortingType operationSortingType = OperationSortingType.parse(operationSortType);
return operationLogic.getRefreshOperation(mAppActivity.mSearchWord, mAppActivity.mStartDateStr, mAppActivity.mEndDateStr, operationSortingType);
} }
} }
package jp.agentec.abook.abv.ui.home.helper; package jp.agentec.abook.abv.ui.home.helper;
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;
...@@ -18,7 +18,7 @@ import jp.agentec.adf.util.CollectionUtil; ...@@ -18,7 +18,7 @@ import jp.agentec.adf.util.CollectionUtil;
import static jp.agentec.abook.abv.cl.util.PreferenceUtil.getUserPref; import static jp.agentec.abook.abv.cl.util.PreferenceUtil.getUserPref;
public class OperationGroupMasterListHelper extends HierarchyOperationListHelper<OperationGroupMasterDto> { public class OperationGroupMasterListHelper extends CategoryOperationListHelper<OperationGroupMasterDto> {
private static final String TAG = "OperationGroupMasterListHelper"; private static final String TAG = "OperationGroupMasterListHelper";
private OperationGroupMasterDao mOperationGroupMasterDao = AbstractDao.getDao(OperationGroupMasterDao.class); private OperationGroupMasterDao mOperationGroupMasterDao = AbstractDao.getDao(OperationGroupMasterDao.class);
...@@ -59,7 +59,7 @@ public class OperationGroupMasterListHelper extends HierarchyOperationListHelper ...@@ -59,7 +59,7 @@ public class OperationGroupMasterListHelper extends HierarchyOperationListHelper
/** /**
* データの取得処理(新着更新処理完了後行われる) * データの取得処理(新着更新処理完了後行われる)
* @return * @return 作業一覧に表示されるリスト
* @throws Exception * @throws Exception
*/ */
@Override @Override
...@@ -76,8 +76,10 @@ public class OperationGroupMasterListHelper extends HierarchyOperationListHelper ...@@ -76,8 +76,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 = OperationSortingType.parse(operationSortType);
// 作業種別IDで紐づく作業リストを取得 // 作業種別IDで紐づく作業リストを取得
return mOperationGroupMasterLogic.getOperationByOperationGroupMasterId(peekOperationGroupMasterDto.operationGroupMasterId); return mOperationGroupMasterLogic.getOperationByOperationGroupMasterId(peekOperationGroupMasterDto.operationGroupMasterId, operationSortingType);
} }
/** /**
......
...@@ -58,6 +58,7 @@ public abstract class OperationListHelper { ...@@ -58,6 +58,7 @@ public abstract class OperationListHelper {
mPullToRefreshGridView = new PullToRefreshGridView(activity); mPullToRefreshGridView = new PullToRefreshGridView(activity);
} }
/** /**
* 作業を検索してListを返す * 作業を検索してListを返す
* *
......
...@@ -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);
......
...@@ -92,78 +92,76 @@ public class Action3DImageView extends ImageView implements OnTouchListener { ...@@ -92,78 +92,76 @@ public class Action3DImageView extends ImageView implements OnTouchListener {
@Override @Override
public boolean onTouch(View v, MotionEvent event) { public boolean onTouch(View v, MotionEvent event) {
if (mEventFlg == false) { if (mEventFlg) {
((ZoomRelativeLayout)v.getParent()).onTouchEvent(event); if (((ZoomRelativeLayout) v.getParent()).isZooming() == false) {
} else {
if (((ZoomRelativeLayout)v.getParent()).isZooming() == false) {
v.getParent().requestDisallowInterceptTouchEvent(true); v.getParent().requestDisallowInterceptTouchEvent(true);
int x = (int) event.getRawX(); int x = (int) event.getRawX();
int y = (int) event.getRawY(); int y = (int) event.getRawY();
if (getTop() > y || getLeft() > x || (getLeft() + getWidth()) < x || (getTop() + getHeight()) < y) { if (getTop() > y || getLeft() > x || (getLeft() + getWidth()) < x || (getTop() + getHeight()) < y) {
setEvent(false, img3dIcon); setEvent(false, img3dIcon);
return true; return true;
} }
switch (event.getAction()) { switch (event.getAction()) {
case MotionEvent.ACTION_DOWN: case MotionEvent.ACTION_DOWN:
mOffsetX = x; mOffsetX = x;
mOffsetY = y; mOffsetY = y;
break; break;
case MotionEvent.ACTION_UP: case MotionEvent.ACTION_UP:
case MotionEvent.ACTION_CANCEL: case MotionEvent.ACTION_CANCEL:
setEvent(false, img3dIcon); setEvent(false, img3dIcon);
break; break;
case MotionEvent.ACTION_MOVE: case MotionEvent.ACTION_MOVE:
int diffX = mOffsetX - x; int diffX = mOffsetX - x;
int diffY = mOffsetY - y; int diffY = mOffsetY - y;
if (Math.abs(diffX) > MOVE_RANGE_X) { if (Math.abs(diffX) > MOVE_RANGE_X) {
if (diffX < 0) { if (diffX < 0) {
if (mCurrentJ < (maxJ - 1)) { if (mCurrentJ < (maxJ - 1)) {
mCurrentJ++; mCurrentJ++;
} else { } else {
mCurrentJ = 0; mCurrentJ = 0;
} }
} else {
if (mCurrentJ > 0) {
mCurrentJ--;
} else { } else {
mCurrentJ = maxJ - 1; if (mCurrentJ > 0) {
mCurrentJ--;
} else {
mCurrentJ = maxJ - 1;
}
} }
mOffsetX = x;
} }
mOffsetX = x; if (Math.abs(diffY) > MOVE_RANGE_Y) {
} if (diffY < 0) {
if (Math.abs(diffY) > MOVE_RANGE_Y) { if (mCurrentI < (maxI - 1)) {
if (diffY < 0) { mCurrentI++;
if (mCurrentI < (maxI - 1)) { } else {
mCurrentI++; mCurrentI = 0;
}
} else { } else {
mCurrentI = 0; if (mCurrentI > 0) {
mCurrentI--;
} else {
mCurrentI = maxI - 1;
}
} }
} else { mOffsetY = y;
if (mCurrentI > 0) { }
mCurrentI--; if (!(mCurrentI == mCurrentIBK && mCurrentJ == mCurrentJBK)) {
} else { MeetingManager meetingManager = MeetingManager.getInstance();
mCurrentI = maxI - 1; if (meetingManager.isSendable()) {
JSONObject json = new JSONObject();
json.put(MeetingManager.FILE_NAME, FileUtil.getFileName(arrayImagePath[mCurrentI][mCurrentJ]));
meetingManager.sendWs(MeetingManager.CMD_3DVIEWACTION, mContentId, mPage, mObjectId, json);
} }
setCurrentImagePath(arrayImagePath[mCurrentI][mCurrentJ]);
mCurrentIBK = mCurrentI;
mCurrentJBK = mCurrentJ;
} }
mOffsetY = y; break;
}
if (!(mCurrentI == mCurrentIBK && mCurrentJ == mCurrentJBK)) {
MeetingManager meetingManager = MeetingManager.getInstance();
if (meetingManager.isSendable()) {
JSONObject json = new JSONObject();
json.put(MeetingManager.FILE_NAME, FileUtil.getFileName(arrayImagePath[mCurrentI][mCurrentJ]));
meetingManager.sendWs(MeetingManager.CMD_3DVIEWACTION, mContentId, mPage, mObjectId, json);
}
setCurrentImagePath(arrayImagePath[mCurrentI][mCurrentJ]);
mCurrentIBK = mCurrentI;
mCurrentJBK = mCurrentJ;
}
break;
} }
} }
} }
......
...@@ -27,6 +27,7 @@ import android.os.Build; ...@@ -27,6 +27,7 @@ import android.os.Build;
import android.view.MotionEvent; import android.view.MotionEvent;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.webkit.WebSettings;
import android.webkit.WebView; import android.webkit.WebView;
import android.webkit.WebViewClient; import android.webkit.WebViewClient;
import android.widget.ImageButton; import android.widget.ImageButton;
...@@ -111,6 +112,26 @@ public class EnqueteLayout extends RelativeLayout { ...@@ -111,6 +112,26 @@ public class EnqueteLayout extends RelativeLayout {
} else { } else {
mWebView = new EnqueteWebView(context); mWebView = new EnqueteWebView(context);
mWebView.getSettings().setJavaScriptEnabled(true); mWebView.getSettings().setJavaScriptEnabled(true);
// OS 6でフォームの切り替え時(報告・回答)に、正常に表示されない問題が発生したため、OS 6は以下のWebViewに設定を行う
if (Build.VERSION.SDK_INT == Build.VERSION_CODES.M) {
WebSettings settings = mWebView.getSettings();
settings.setSupportMultipleWindows(true); // 新しいウィンドウを開くイベントを取得する
settings.setLoadsImagesAutomatically(true); // イメージを自動的にロードする
settings.setBuiltInZoomControls(true); // ズーム機能を有効にする
settings.setSupportZoom(true); // ズーム機能を有効にする
settings.setLoadWithOverviewMode(true); // 画面の横幅にページの横幅を合わせる
settings.setUseWideViewPort(true); // 画面の横幅にページの横幅を合わせる
//noinspection deprecation(API18から非推奨になった。無視)
settings.setPluginState(WebSettings.PluginState.ON); // 「EventHub.removeMessages(int what = 107) is not supported before the WebViewCore is set up.」のエラー対応(あまり効果ない?)
settings.setDomStorageEnabled(true); // WebStorage有効化
settings.setAppCacheEnabled(false);
settings.setCacheMode(WebSettings.LOAD_NO_CACHE);
}
if (Logger.isDebugEnabled()) {
mWebView.setWebContentsDebuggingEnabled(true); //デバッグモード(chromeからinspect可)
}
mWebView.setHorizontalScrollBarEnabled(true); mWebView.setHorizontalScrollBarEnabled(true);
mWebView.setVerticalScrollBarEnabled(true); mWebView.setVerticalScrollBarEnabled(true);
mWebView.setAlpha((int) (255 * INIT_ALPHA)); // 80%->100%に変更 mWebView.setAlpha((int) (255 * INIT_ALPHA)); // 80%->100%に変更
......
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