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;
public class DBConnector {
private static volatile DBConnector dbConnector = null;
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;
......
package jp.agentec.abook.abv.bl.data;
// バージョンが上がるごとに+10すること
// バージョンが上がるごとに+10すること(途中でバージョン追加になる恐れがあるため)
public class DatabaseVersions {
public static final int Ver1_0_0 = 1;
public static final int Ver1_1_0 = 11;
public static final int Ver1_2_0 = 21;
}
......@@ -4,9 +4,11 @@ import java.util.ArrayList;
import java.util.Date;
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.db.Cursor;
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.adf.util.DateTimeFormat;
import jp.agentec.adf.util.DateTimeUtil;
......@@ -114,8 +116,12 @@ public class OperationDao extends AbstractDao {
return dto;
}
/**
* 全作業を取得(operation_id降順)
* @return
*/
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() {
......@@ -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
*/
......@@ -242,21 +257,22 @@ public class OperationDao extends AbstractDao {
* @param searchOperationName
* @param searchStartDateStr
* @param searchEndDateStr
* @param reportTypeStr
* @param operationSortType
* @return
*/
public List<OperationDto> getOperations(String searchOperationName, String searchStartDateStr, String searchEndDateStr, String reportTypeStr) {
String sql = generateGetOperationQuery(searchOperationName, searchStartDateStr, searchEndDateStr, reportTypeStr, null);
public List<OperationDto> getOperations(String searchOperationName, String searchStartDateStr, String searchEndDateStr, OperationSortingType operationSortType) {
String sql = generateGetOperationQuery(searchOperationName, searchStartDateStr, searchEndDateStr, operationSortType, null);
return rawQueryGetDtoList(sql, null, OperationDto.class);
}
/**
* カテゴリの作業一覧検索用
* @param operationGroupMasterId
* @return
* @param operationGroupMasterId カテゴリID
* @param operationSortingType ソートタイプ
* @return カテゴリに紐づく作業リスト
*/
public List<OperationDto> getOperationsByGroupMasterId(Integer operationGroupMasterId) {
String sql = generateGetOperationQuery(null, null, null, null, operationGroupMasterId);
public List<OperationDto> getOperationsByGroupMasterId(Integer operationGroupMasterId, OperationSortingType operationSortingType) {
String sql = generateGetOperationQuery(null, null, null, operationSortingType, operationGroupMasterId);
return rawQueryGetDtoList(sql, null, OperationDto.class);
}
......@@ -266,10 +282,10 @@ public class OperationDao extends AbstractDao {
* @param searchOperationName
* @param searchStartDateStr
* @param searchEndDateStr
* @param reportTypeStr
* @param operationSortingType
* @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");
StringBuffer sql = new StringBuffer();
......@@ -337,11 +353,33 @@ public class OperationDao extends AbstractDao {
sql.append(" AND top.operation_start_date <= '" + DateTimeUtil.toString(endDate, DateTimeFormat.yyyyMMdd_hyphen) + "'");
}
if (reportTypeStr != null) {
sql.append(" AND top.report_type in ("+ reportTypeStr +")");
}
sql.append(" ORDER BY top.operation_start_date DESC, top.operation_id DESC");
// 並び順
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(", top.operation_id DESC");
Logger.v(TAG, "sql=%s", sql);
......
......@@ -38,6 +38,7 @@ public class TOperation extends SQLiteTableScript {
sql.append(" , enable_report_history 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(" , operation_open_date DATETIME ");
sql.append(" , PRIMARY KEY (operation_id) ");
sql.append(" ) ");
ddl.add(sql.toString());
......@@ -48,22 +49,12 @@ public class TOperation extends SQLiteTableScript {
@Override
public List<String> getUpgradeScript(int oldVersion, int newVersion) {
// List<String> ddl = new ArrayList<String>();
// if (oldVersion < DatabaseVersions.Plus_1_9_3) {
// ddl.addAll(getCreateScript(newVersion));
// }
//
// if (oldVersion < DatabaseVersions.Plus_1_9_3_5) { // カラムの追加
// 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;
List<String> ddl = new ArrayList<String>();
if (oldVersion < DatabaseVersions.Ver1_2_0) { // カラムの追加
ddl.add("ALTER TABLE t_operation ADD COLUMN operation_open_date DATETIME");
}
return ddl;
}
@Override
......
......@@ -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.json.OperationGroupMasterJSON;
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.exception.AcmsException;
import jp.agentec.abook.abv.bl.common.exception.NetworkDisconnectedException;
......@@ -141,7 +142,7 @@ public class OperationGroupMasterLogic extends AbstractLogic {
/**
* 親の階層パスをリストでセット
* @param operationGroupMasterId
* @param operationGroupMasterId カテゴリID
* @return
*/
public List<OperationGroupMasterDto> getParentOperationGroupMasterForPath (Integer operationGroupMasterId) {
......@@ -162,10 +163,11 @@ public class OperationGroupMasterLogic extends AbstractLogic {
/**
* 作業種別IDで関連する作業リストを取得
* @param operationGroupMasterId
* @param operationGroupMasterId カテゴリID
* @param operationSortingType ソートタイプ
* @return
*/
public List<OperationDto> getOperationByOperationGroupMasterId(Integer operationGroupMasterId) {
return mOperationDao.getOperationsByGroupMasterId(operationGroupMasterId);
public List<OperationDto> getOperationByOperationGroupMasterId(Integer operationGroupMasterId, OperationSortingType operationSortingType) {
return mOperationDao.getOperationsByGroupMasterId(operationGroupMasterId, operationSortingType);
}
}
......@@ -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.parameters.AcmsParameters;
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.Constant;
import jp.agentec.abook.abv.bl.common.Callback;
......@@ -1068,16 +1069,17 @@ public class OperationLogic extends AbstractLogic {
}
/**
* プロジェクト一覧取得
* 作業一覧取得
*
* @param searchWord
* @param searchStartDateStr
* @param searchEndDateStr
* @return
* @param searchWord 検索条件:作業名
* @param searchStartDateStr 検索条件:作業日範囲(開始)
* @param searchEndDateStr  検索条件:作業日範囲(終了)
* @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;
operationDtoList = mOperationDao.getOperations(searchWord, searchStartDateStr, searchEndDateStr, reportTypeStr);
operationDtoList = mOperationDao.getOperations(searchWord, searchStartDateStr, searchEndDateStr, operationSortingType);
for (OperationDto operationDto : operationDtoList) {
// 作業送信フラグが存在する場合またはホットスポット更新フラグが存在する場合、needSyncFlgをtrueにセット
if (mTaskReportDao.isExistSendTaskData(operationDto.operationId) || mTaskReportDao.isExistUpdateTargetHotSpotTaskData(operationDto.operationId)) {
......@@ -1088,9 +1090,9 @@ public class OperationLogic extends AbstractLogic {
}
/**
* プロジェクト関連資料または共通資料一覧取得
* 作業関連資料または共通資料一覧取得
*
* @return
* @return ジャンル毎の共通資料
*/
public List<CategoryContentDto> getOperationRelatedContent() {
List<ContentDto> contentDtoList;
......@@ -1174,8 +1176,8 @@ public class OperationLogic extends AbstractLogic {
/**
* 作業報告履歴データ送信(全体)
* @param operationId
* @param progressCallback
* @param operationId 作業ID
* @param progressCallback コールバック用
* @return
* @throws Exception
*/
......@@ -1185,8 +1187,9 @@ public class OperationLogic extends AbstractLogic {
/**
* 作業報告履歴データ送信
* @param operationId
* @param taskKey
* @param operationId 作業ID
* @param taskKey 報告・回答のキー
* @param 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 {
/**
* 作業関連ディレクトリ削除
*
* @param operationId
* @param contentId
* @param taskKey
* @param operationId 作業ID
* @param contentId 資料ID
* @param taskKey 報告・回答のキー
* @param taskReportLevel 報告・回答のレベル
*/
public void deleteTaskFileData(long operationId, long contentId, String taskKey, int taskReportLevel) {
FileUtil.delete(ABVEnvironment.getInstance().getTempTaskDirPath(contentId, taskKey));
......@@ -1537,9 +1541,9 @@ public class OperationLogic extends AbstractLogic {
/**
* 作業報告の取得
* @param taskKey
* @param taskReportlevel
* @return
* @param taskKey 報告・回答キー
* @param taskReportlevel 作業レベル
* @return TaskReportDto 作業報告
*/
public TaskReportDto getTaskReport(String taskKey, int 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 @@
<string name="msg_help_360_move">このボタンを押すと作業コードラベルを移動させることができるようになります。</string>
<string name="msg_help_360_touch">このボタンを押すと作業コードボタンのタップが可能になり、報告できるようになります。</string>
<!-- 1.1.0 -->
<string name="operation_category">カテゴリ</string>
<string name="type_all">全て</string>
<!-- 1.2.0 -->
<string name="msg_operation_enable_meeting_room_connected">会議室入室中の為、このボタンは利用できません。\n共通資料画面から資料を選択してください。</string>
<string name="batch_sync">一括同期</string>
......@@ -533,6 +529,9 @@
<string name="msg_batch_sync_new_content_updating">新着更新処理中の為、一括同期できません。</string>
<string name="msg_batch_sync_error">「%1$s」の同期に失敗しました。同期処理を中止します。\n</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.9.0.0-->
......
......@@ -521,10 +521,6 @@
<string name="msg_help_360_move">이 버튼을 누르면 작업 코드 버튼의 이동이 가능하게 됩니다.</string>
<string name="msg_help_360_touch">이 버튼을 누르면 작업 코드 버튼의 탭이 가능하게 되므로 보고 화면 표시가 가능하게 됩니다.</string>
<!-- 1.1.0 -->
<string name="operation_category">분류</string>
<string name="type_all">전체</string>
<!-- 1.2.0 -->
<string name="msg_operation_enable_meeting_room_connected">회의실 접속 중에는 이 버튼을 사용하실수 없습니다. \n공통자료화면에서 자료를 선택해 주세요.</string>
<string name="batch_sync">일괄 동기</string>
......@@ -535,6 +531,9 @@
<string name="msg_batch_sync_new_content_updating">새로운 정보갱신 중에는 일괄 동기을 하실 수 없습니다.</string>
<string name="msg_batch_sync_error">「%1$s」정보갱신에 실패하였습니다. 동기처리을 중지합니다.\n</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.9.0.0-->
......
......@@ -88,4 +88,5 @@
<color name="operation_related_content_new_mark">#ff0000</color>
<color name="operation_bg">#FFFFFF</color>
<color name="bottom_toolbar">#F2F2F2</color>
</resources>
\ No newline at end of file
......@@ -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_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 -->
<string name="operation_category">Category</string>
<string name="type_all">All</string>
<!-- 1.2.0 -->
<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_syncing">batch syncing...</string>
......@@ -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_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="select_category">カテゴリ選択</string>
<string name="title_category">カテゴリ</string>
<string name="title_all_operation">全作業</string>
<!-- 1.0.1 Resource Pattern 1 -->
<!-- 1.9.0.0-->
......
......@@ -10,154 +10,144 @@
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:background="@color/operation_color"
android:minHeight="50dp"
android:visibility="visible">
<ImageButton
android:id="@+id/btn_view_mode"
android:layout_width="wrap_content"
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="10dp"
android:background="@drawable/ic_display_list" />
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:orientation="horizontal">
<ImageButton
android:id="@+id/icon_filter"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="15dp"
android:layout_toRightOf="@+id/btn_view_mode"
android:onClick="onClickOperationFilterList"
android:background="@drawable/ic_filter" />
android:id="@+id/btn_view_mode"
android:layout_alignParentLeft="true"
style="@style/ToolBarIcon"
android:src="@drawable/ic_display_list" />
<ImageButton
android:id="@+id/btn_search"
android:layout_width="wrap_content"
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" />
android:id="@+id/btn_category_location"
style="@style/ToolBarIcon"
android:layout_toRightOf="@+id/btn_view_mode"
android:onClick="onClickGroupLocationByTablet"
android:src="@drawable/ic_category_off" />
<RadioGroup
android:id="@+id/segment_group"
<TextView
android:id="@+id/operation_title"
android:layout_width="wrap_content"
android:layout_height="30dp"
android:layout_height="wrap_content"
android:maxWidth="250dp"
android:ellipsize="end"
android:singleLine="true"
android:layout_centerHorizontal="true"
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:textColor="@color/operation_bg"
android:textSize="@dimen/app_normal_text_size"
android:textStyle="bold" />
</RadioGroup>
<ImageButton
android:id="@+id/btc_batch_sync"
android:id="@+id/btn_batch_sync"
style="@style/ToolBarIcon"
android:layout_centerVertical="true"
android:layout_marginLeft="10dp"
android:layout_toRightOf="@+id/segment_group"
android:layout_toLeftOf="@+id/btn_sort"
android:src="@drawable/ic_batch_sync"
android:visibility="gone"/>
android:visibility="gone" />
<ImageButton
android:id="@+id/btn_sort"
style="@style/ToolBarIcon"
android:layout_toLeftOf="@+id/btn_search"
android:onClick="onClickSortMenuByTablet"
android:src="@drawable/ic_sort" />
<ImageButton
android:id="@+id/btn_search"
style="@style/ToolBarIcon"
android:layout_alignParentRight="true"
android:src="@drawable/btn_operation_search" />
</RelativeLayout>
</RelativeLayout>
<FrameLayout
android:id="@+id/operation_list_layout"
style="@style/content_list_bg"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_weight="1"></FrameLayout>
<LinearLayout
android:id="@+id/search_result"
android:layout_width="wrap_content"
android:id="@+id/toolbar2"
android:layout_width="match_parent"
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">
android:layout_gravity="bottom"
android:background="@drawable/bottom_toolbar_border"
android:minHeight="50dp"
android:visibility="visible">
<TextView
android:layout_width="wrap_content"
<LinearLayout
android:layout_width="match_parent"
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" />
android:layout_gravity="center"
android:layout_marginLeft="30dp"
android:layout_marginRight="30dp">
</LinearLayout>
<ImageButton
android:id="@+id/btn_communication_menu"
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginRight="15dp"
android:layout_toLeftOf="@+id/btn_sub_menu"
android:background="@drawable/ic_communication_menu" />
android:layout_weight="1"
android:gravity="center">
<ImageButton
android:id="@+id/btn_sub_menu"
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_centerVertical="true"
android:layout_marginRight="15dp"
android:layout_toLeftOf="@+id/btn_common_content"
android:background="@drawable/ic_operation_setting"
android:onClick="onClickOperationSubMenu" />
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_centerVertical="true"
android:layout_marginRight="15dp"
android:layout_toLeftOf="@+id/btn_help"
android:background="@drawable/ic_common_content_off" />
android:layout_weight="1"
android:gravity="center">
<ImageButton
android:id="@+id/btn_help"
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_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="10dp"
android:background="@drawable/ic_operation_help"
android:onClick="onClickShowHelpView" />
</RelativeLayout>
android:layout_weight="1"
android:gravity="center">
<FrameLayout
android:id="@+id/operation_list_layout"
style="@style/operation_list_bg"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true" />
<ImageButton
android:id="@+id/btn_setting"
style="@style/ToolBarIcon"
android:onClick="onClickSetting"
android:src="@drawable/ic_operation_setting" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
......@@ -4,44 +4,34 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:orientation="vertical"
android:background="@color/basic_white1"
android:clickable="true" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
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" >
android:gravity="center"
>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="left|center"
android:gravity="left|center" >
android:layout_gravity="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" >
<ImageView
......@@ -61,57 +51,8 @@
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"
......@@ -142,4 +83,74 @@
</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>
\ No newline at end of file
......@@ -10,161 +10,146 @@
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:background="@color/operation_color"
android:minHeight="50dp"
android:visibility="visible">
<ImageButton
android:id="@+id/btn_view_mode"
android:layout_width="wrap_content"
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="10dp"
android:background="@drawable/ic_display_list" />
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:orientation="horizontal">
<ImageButton
android:id="@+id/icon_filter"
android:id="@+id/btn_view_mode"
android:layout_alignParentLeft="true"
style="@style/ToolBarIcon"
android:layout_marginRight="10dp"
android:src="@drawable/ic_display_list" />
<ImageButton
android:id="@+id/btn_category_location"
style="@style/ToolBarIcon"
android:layout_centerVertical="true"
android:layout_marginLeft="10dp"
android:layout_toRightOf="@+id/btn_view_mode"
android:onClick="onClickOperationFilterList"
android:src="@drawable/ic_filter" />
android:onClick="onClickGroupLocationByNormalSize"
android:src="@drawable/ic_category_off" />
<RadioGroup
android:id="@+id/segment_group"
<TextView
android:id="@+id/operation_title"
android:layout_width="wrap_content"
android:layout_height="30dp"
android:layout_height="wrap_content"
android:maxWidth="100dp"
android:ellipsize="end"
android:singleLine="true"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
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
android:id="@+id/operation_location_type_group"
android:layout_width="60dp"
android:layout_height="match_parent"
android:background="@drawable/operation_location_segment_background"
android:button="@null"
android:gravity="center"
android:textSize="10sp"
android:onClick="onClickOperationLocationType"
android:textColor="@drawable/operation_location_text_color"
android:text="@string/operation_category"
android:textColor="@color/operation_bg"
android:textSize="@dimen/app_normal_text_size"
android:textStyle="bold" />
</RadioGroup>
<ImageButton
android:id="@+id/btc_batch_sync"
android:id="@+id/btn_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:layout_marginRight="10dp"
android:layout_toLeftOf="@+id/btn_sort"
android:src="@drawable/ic_batch_sync"
android:visibility="gone" />
<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" />
android:id="@+id/btn_sort"
style="@style/ToolBarIcon"
android:layout_toLeftOf="@+id/btn_search"
android:layout_marginRight="10dp"
android:onClick="onClickSortMenuByNormalSize"
android:src="@drawable/ic_sort" />
<ImageButton
android:id="@+id/btn_help"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/btn_search"
style="@style/ToolBarIcon"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="10dp"
android:background="@drawable/ic_operation_help"
android:onClick="onClickShowHelpView"/>
android:src="@drawable/btn_operation_search" />
</RelativeLayout>
</RelativeLayout>
<RelativeLayout
<FrameLayout
android:id="@+id/operation_list_layout"
style="@style/content_list_bg"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_weight="1">
</FrameLayout>
<LinearLayout
android:id="@+id/toolbar2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/operation_color"
android:background="@drawable/bottom_toolbar_border"
android:minHeight="50dp"
android:visibility="visible">
<ImageButton
android:id="@+id/btn_communication_menu"
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:layout_marginLeft="20dp"
android:background="@drawable/ic_communication_menu" />
android:layout_gravity="center"
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:id="@+id/search_result"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:layout_gravity="center"
android:layout_toLeftOf="@+id/btn_search"
android:layout_marginRight="10dp"
android:background="@drawable/radius_frame"
android:visibility="gone">
android:layout_weight="1"
android:gravity="center">
<TextView
<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: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" />
android:layout_gravity="center"
android:layout_weight="1"
android:gravity="center">
</LinearLayout>
<ImageButton
android:id="@+id/btn_search"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/btn_communication_menu"
style="@style/ToolBarIcon"
android:layout_centerVertical="true"
android:layout_centerInParent="true"
android:background="@drawable/ic_operation_search"
android:contentDescription="@string/list" />
android:src="@drawable/ic_communication_menu" />
</LinearLayout>
<ImageButton
android:id="@+id/btn_sub_menu"
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginRight="10dp"
android:layout_alignParentRight="true"
android:background="@drawable/ic_operation_setting"
android:onClick="onClickOperationSubMenu" />
android:layout_gravity="center"
android:layout_weight="1"
android:gravity="center">
</RelativeLayout>
<ImageButton
android:id="@+id/btn_setting"
style="@style/ToolBarIcon"
android:layout_centerVertical="true"
android:src="@drawable/ic_operation_setting"
android:onClick="onClickSetting" />
</LinearLayout>
<FrameLayout
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 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:orientation="vertical"
android:background="@color/basic_white1"
android:clickable="true" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
android:layout_weight="1"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
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>
android:gravity="center"
android:minHeight="50dp">
<LinearLayout
android:layout_width="wrap_content"
......@@ -54,65 +42,14 @@
android:textSize="@dimen/app_normal_text_size"
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: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_marginRight="20dp"
android:orientation="vertical" >
android:layout_marginTop="10dp">
<Button
android:id="@+id/btn_all_save"
......@@ -136,4 +73,76 @@
</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>
\ No newline at end of file
......@@ -179,15 +179,6 @@
android:background="@drawable/ic_operation_task_list"
android:layout_marginRight="10dp"
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>
</RelativeLayout>
......
......@@ -184,15 +184,6 @@
android:background="@drawable/ic_operation_task_list"
android:layout_marginRight="10dp"
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>
</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 @@
android:layout_height="wrap_content"
android:background="@drawable/ic_operation_task_list"
android:layout_centerVertical="true"
android:layout_toLeftOf="@+id/btn_help"
android:layout_alignParentRight="true"
android:layout_marginRight="10dp"
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_centerVertical="true"
android:layout_alignParentRight="true"
android:layout_marginRight="5dp"
android:visibility="gone"
android:onClick="onClickShowHelpView"/>
<ImageButton
android:id="@+id/btn_exitMeeting"
android:layout_width="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 @@
android:id="@+id/LinearLayout1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/mydata_bg"
android:background="@color/operation_color"
android:orientation="vertical" >
<RelativeLayout
......
......@@ -2,74 +2,15 @@
<resources>
<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>
</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">
<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 name="category_types">
<item>全て</item>
<item>カテゴリ</item>
</string-array>
</resources>
\ No newline at end of file
......@@ -2,76 +2,15 @@
<resources>
<string-array name="sort_names">
        <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 name="tap_action_on_update">
<item>매번 선택</item>
<item>열람</item>
<item>자동 업데이트</item>
</string-array>
<string-array name="tap_action_on_delivery_select">
<item>다운로드</item>
<item>Web으로 보기</item>
<item>매번 선택</item>
        <item>작업명(가나다)</item>
        <item>최신 작업순</item>
        <item>오래된 작업순</item>
        <item>보고타입</item>
        <item>최신 열람순</item>
</string-array>
<string-array name="fix_orientation">
<item>미설정</item>
<item>가로</item>
<item>세로</item>
<item>세로(역방향)</item>
<string-array name="category_types">
<item>전체</item>
<item>분류</item>
</string-array>
</resources>
......@@ -3,114 +3,15 @@
<!-- String Array -->
<string-array name="sort_names">
<item>Content Name</item>
<item>Content ID</item>
<item>Released date</item>
<item>Content size</item>
<item>Downloaded date</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 name="tap_action_on_update">
<item>Select each time</item>
<item>Open</item>
<item>Auto update</item>
</string-array>
<string-array name="tap_action_on_update_values">
<item>0</item>
<item>1</item>
<item>2</item>
<item>Order by name</item>
<item>Order by start date(descend)</item>
<item>Order by start date(ascend)</item>
<item>Order by operation Type</item>
<item>Order by browse date(descend)</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 name="category_types">
<item>All</item>
<item>Category</item>
</string-array>
</resources>
\ No newline at end of file
......@@ -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を取得
* @return
*/
......@@ -160,41 +177,4 @@ public class ABVUIDataCache {
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 {
protected TextView operationNameTitle;
protected Button operationHomeButton;
protected ImageButton taskListButton;
protected ImageButton helpButton;
// protected ImageButton helpButton;
protected boolean isPageFinished;
protected Double latitude;
......@@ -462,9 +462,9 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
subMenuBtn.setLayoutParams(params);
exitMeetingBtn.setVisibility(View.VISIBLE);
if (helpButton != null && helpButton.getVisibility() == View.VISIBLE) {
helpButton.setLayoutParams(params);
}
// if (helpButton != null && helpButton.getVisibility() == View.VISIBLE) {
// helpButton.setLayoutParams(params);
// }
}
else { // 会議室退室ボタン非表示
exitMeetingBtn.setVisibility(View.GONE);
......@@ -474,9 +474,9 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
params.rightMargin = (int) (getResources().getDisplayMetrics().density * 5);
subMenuBtn.setLayoutParams(params);
if (helpButton != null && helpButton.getVisibility() == View.VISIBLE) {
helpButton.setLayoutParams(params);
}
// if (helpButton != null && helpButton.getVisibility() == View.VISIBLE) {
// helpButton.setLayoutParams(params);
// }
}
}
});
......@@ -793,78 +793,78 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
*/
protected void onActionOperationPdfWebView(Map<String, String> checkParam, OperationTaskDto operationTaskDto) {}
public void onClickShowHelpView(View v) {
int helpViewType = 0;
switch (mStatusCode) {
case Constant.XWalkWebViewDisplayStatus.InitView:
if (mXWalkOpenType == Constant.XWalkOpenType.PANO_EDIT) {
helpViewType = Constant.HelpViewType.PanoContentEdit;
} else {
switch (mOperationType) {
case OperationType.LIST:
switch (mXWalkOpenType) {
case Constant.XWalkOpenType.TASK_DERECTION:
helpViewType = Constant.HelpViewType.ListOperationDirector;
break;
case Constant.XWalkOpenType.TASK_REPORT:
if (operationDto.reportType == Constant.ReportType.RoutineTask) {
helpViewType = Constant.HelpViewType.RoutineTaskOperation;
} else {
helpViewType = Constant.HelpViewType.ListOperationReporter;
}
break;
}
break;
case OperationType.DRAWING:
case OperationType.PDF:
switch (mXWalkOpenType) {
case Constant.XWalkOpenType.TASK_DERECTION:
helpViewType = Constant.HelpViewType.DrawingOperationDirector;
break;
case Constant.XWalkOpenType.TASK_REPORT:
helpViewType = Constant.HelpViewType.DrawingOperationReporter;
break;
}
break;
case OperationType.PANO:
switch (mXWalkOpenType) {
case Constant.XWalkOpenType.TASK_DERECTION:
helpViewType = Constant.HelpViewType.PanoOperationDirector;
break;
case Constant.XWalkOpenType.TASK_REPORT:
helpViewType = Constant.HelpViewType.PanoOperationReporter;
break;
}
break;
}
}
break;
case Constant.XWalkWebViewDisplayStatus.TaskView:
if (mXWalkOpenType == Constant.XWalkOpenType.TASK_DERECTION) {
helpViewType = Constant.HelpViewType.DirectorTask;
} else if (mXWalkOpenType == Constant.XWalkOpenType.TASK_REPORT) {
if (operationDto.reportType == Constant.ReportType.RoutineTask) {
helpViewType = Constant.HelpViewType.RoutineTaskOperationReport;
} else {
helpViewType = Constant.HelpViewType.ReportTask;
}
}
break;
case Constant.XWalkWebViewDisplayStatus.ReportPreView:
helpViewType = Constant.HelpViewType.ReportPreview;
break;
case Constant.XWalkWebViewDisplayStatus.TaskListView:
if (mXWalkOpenType == Constant.XWalkOpenType.TASK_DERECTION) {
helpViewType = Constant.HelpViewType.DirectorTaskList;
} else if (mXWalkOpenType == Constant.XWalkOpenType.TASK_REPORT) {
helpViewType = Constant.HelpViewType.ReportTaskList;
}
break;
}
showHelpViewDialog(helpViewType);
}
// public void onClickShowHelpView(View v) {
// int helpViewType = 0;
// switch (mStatusCode) {
// case Constant.XWalkWebViewDisplayStatus.InitView:
// if (mXWalkOpenType == Constant.XWalkOpenType.PANO_EDIT) {
// helpViewType = Constant.HelpViewType.PanoContentEdit;
// } else {
// switch (mOperationType) {
// case OperationType.LIST:
// switch (mXWalkOpenType) {
// case Constant.XWalkOpenType.TASK_DERECTION:
// helpViewType = Constant.HelpViewType.ListOperationDirector;
// break;
// case Constant.XWalkOpenType.TASK_REPORT:
// if (operationDto.reportType == Constant.ReportType.RoutineTask) {
// helpViewType = Constant.HelpViewType.RoutineTaskOperation;
// } else {
// helpViewType = Constant.HelpViewType.ListOperationReporter;
// }
// break;
// }
// break;
// case OperationType.DRAWING:
// case OperationType.PDF:
// switch (mXWalkOpenType) {
// case Constant.XWalkOpenType.TASK_DERECTION:
// helpViewType = Constant.HelpViewType.DrawingOperationDirector;
// break;
// case Constant.XWalkOpenType.TASK_REPORT:
// helpViewType = Constant.HelpViewType.DrawingOperationReporter;
// break;
// }
// break;
// case OperationType.PANO:
// switch (mXWalkOpenType) {
// case Constant.XWalkOpenType.TASK_DERECTION:
// helpViewType = Constant.HelpViewType.PanoOperationDirector;
// break;
// case Constant.XWalkOpenType.TASK_REPORT:
// helpViewType = Constant.HelpViewType.PanoOperationReporter;
// break;
// }
//
// break;
// }
// }
// break;
// case Constant.XWalkWebViewDisplayStatus.TaskView:
// if (mXWalkOpenType == Constant.XWalkOpenType.TASK_DERECTION) {
// helpViewType = Constant.HelpViewType.DirectorTask;
// } else if (mXWalkOpenType == Constant.XWalkOpenType.TASK_REPORT) {
// if (operationDto.reportType == Constant.ReportType.RoutineTask) {
// helpViewType = Constant.HelpViewType.RoutineTaskOperationReport;
// } else {
// helpViewType = Constant.HelpViewType.ReportTask;
// }
// }
// break;
// case Constant.XWalkWebViewDisplayStatus.ReportPreView:
// helpViewType = Constant.HelpViewType.ReportPreview;
// break;
// case Constant.XWalkWebViewDisplayStatus.TaskListView:
// if (mXWalkOpenType == Constant.XWalkOpenType.TASK_DERECTION) {
// helpViewType = Constant.HelpViewType.DirectorTaskList;
// } else if (mXWalkOpenType == Constant.XWalkOpenType.TASK_REPORT) {
// helpViewType = Constant.HelpViewType.ReportTaskList;
// }
// break;
// }
//
// showHelpViewDialog(helpViewType);
// }
public void commonShouldOverrideUrlLoading (Uri uri, OperationTaskDto operationTaskDto) {
Logger.d(TAG, "Uri : %s", uri);
......
......@@ -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.common.ABVEnvironment;
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.ABVExceptionCode;
import jp.agentec.abook.abv.bl.common.exception.AcmsException;
......@@ -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.data.ABVDataCache;
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.ContentFileExtractor;
import jp.agentec.abook.abv.bl.download.ContentZipDownloadNotification;
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.util.AndroidStringUtil;
import jp.agentec.abook.abv.launcher.android.ABVApplication;
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.NaviConsts;
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.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.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.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.adf.util.DateTimeFormat;
import jp.agentec.adf.util.DateTimeUtil;
import android.app.Dialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.view.KeyEvent;
import android.view.View;
import android.view.Window;
import android.view.animation.Animation;
import android.view.animation.LinearInterpolator;
import android.view.animation.RotateAnimation;
import android.widget.AdapterView;
import android.widget.EditText;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.RadioGroup;
import android.widget.TextView;
import android.widget.Toast;
import com.handmark.pulltorefresh.library.PullToRefreshBase;
import java.nio.charset.StandardCharsets;
import java.util.List;
public abstract class ABVUIActivity extends ABVAuthenticatedActivity {
private final static String TAG = "ABVUIActivity";
......@@ -50,6 +76,21 @@ public abstract class ABVUIActivity extends ABVAuthenticatedActivity {
protected TextView mUpdatedDate; // 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;
......@@ -71,6 +112,9 @@ public abstract class ABVUIActivity extends ABVAuthenticatedActivity {
startRefresh = 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";
mSelectedFixPuchMessagePosition = 0;
mSendType = 0;
}
//更新する場合中止させる。
......@@ -476,12 +520,409 @@ public abstract class ABVUIActivity extends ABVAuthenticatedActivity {
}
// 設定画面表示
public void showSettingPopup() {
public void showSetting() {
Intent intent = new Intent();
intent.setClassName(getApplicationContext().getPackageName(), ABookSettingActivity.class.getName());
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
// 設定画面の前のActivityを保存する(設定画面から戻る用)
ActivityHandlingHelper.getInstance().setPreviousOfSettingActivity(this);
startActivity(intent);
// ※ 設定画面からログアウトした場合、このActivityも残らないように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 {
// 作業種別モードフラグ
interface OperationLocationType {
int ALL = 0;
int GROUP = 1;
int CATEGORY = 1;
}
interface DefPrefKey {
......@@ -59,34 +59,15 @@ public interface AppDefType {
String SYNCED_OPERATION_ID = "syncedOperationId_%d";//一日一回情報更新が出来るように
String VIEW_MODE = "viewMode";
String OPERATION_REPORT_TYPES = "operationReportTypes";
String RESOURCE_PATTERN_TYPE = "resourcePatternType"; // 文言リソースパターン
String OPERATION_GROUP_MASERT_MODE = "operation_group_master"; // 通常・作業種別モード(画面)
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"; // 作業のソート
/**
* 表示するデータタイプ
* 全て、クラウド、デバイス
*/
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; //閲覧日
String APERTURE_MASTER_DATA_FETCH_DATE = "apertureMasterDataFetchDate"; // 絞り検索マスタデータのFetchDate
}
interface SubMenuType {
......
......@@ -164,7 +164,7 @@ public class ABVPopupListWindow extends PopupWindow {
int maxWidth = 0;
View view = null;
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.measure(View.MeasureSpec.UNSPECIFIED, View.MeasureSpec.UNSPECIFIED);
int width = view.getMeasuredWidth();
......
......@@ -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.download.ContentFileExtractor;
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;
public class ABookSettingActivity extends PreferenceActivity {
......@@ -69,7 +71,8 @@ public class ABookSettingActivity extends PreferenceActivity {
}
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);
startActivity(intent);
......
......@@ -271,26 +271,27 @@ public class ABookSettingFragment extends PreferenceFragment {
}
Preference abookCheckManual = findPreference(ABOOK_CHECK_MANUAL);
// リソースパターンの適用
abookCheckManual.setTitle(PatternStringUtil.patternToString(getActivity().getApplicationContext(),
R.string.operation_manual,
getUserPref(getActivity().getApplicationContext(), AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
abookCheckManual.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
@Override
public boolean onPreferenceClick(Preference preference) {
try {
Intent intent = new Intent();
intent.putExtra(ABookKeys.CONTENT_ID, 0L);
intent.putExtra("FILEPATH", ABVEnvironment.getInstance().getContentCacheDirectoryPath(0L));
intent.putExtra("page", 0);
intent.setClass(getActivity(), GuideViewActivity.class);
startActivity(intent);
} catch (Exception e) {
Logger.e(TAG, e);
}
return true;
}
});
appInfo.removePreference(abookCheckManual);
// // リソースパターンの適用
// abookCheckManual.setTitle(PatternStringUtil.patternToString(getActivity().getApplicationContext(),
// R.string.operation_manual,
// getUserPref(getActivity().getApplicationContext(), AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
// abookCheckManual.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
// @Override
// public boolean onPreferenceClick(Preference preference) {
// try {
// Intent intent = new Intent();
// intent.putExtra(ABookKeys.CONTENT_ID, 0L);
// intent.putExtra("FILEPATH", ABVEnvironment.getInstance().getContentCacheDirectoryPath(0L));
// intent.putExtra("page", 0);
// intent.setClass(getActivity(), GuideViewActivity.class);
// startActivity(intent);
// } catch (Exception e) {
// Logger.e(TAG, e);
// }
// return true;
// }
// });
}
private void showLicenseDialog() {
......
......@@ -11,7 +11,7 @@ import android.graphics.BitmapFactory;
import android.net.Uri;
import android.os.Bundle;
import android.provider.MediaStore;
import android.util.SparseBooleanArray;
import android.view.Gravity;
import android.view.KeyEvent;
import android.view.View;
import android.view.ViewGroup;
......@@ -19,15 +19,12 @@ import android.view.Window;
import android.widget.AbsListView;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.CheckedTextView;
import android.widget.DatePicker;
import android.widget.EditText;
import android.widget.FrameLayout;
import android.widget.GridView;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.RadioGroup;
import android.widget.TextView;
......@@ -43,7 +40,6 @@ import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.nio.charset.StandardCharsets;
import java.security.NoSuchAlgorithmException;
import java.util.ArrayList;
import java.util.Arrays;
......@@ -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.ReportType;
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.exception.ABVException;
import jp.agentec.abook.abv.bl.common.exception.ABVExceptionCode;
......@@ -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.ContentZipDownloadNotification;
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.OperationDto;
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.TaskReportDto;
import jp.agentec.abook.abv.bl.logic.AbstractLogic;
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.PushMessageLogic;
import jp.agentec.abook.abv.cl.util.PreferenceUtil;
import jp.agentec.abook.abv.launcher.android.R;
import jp.agentec.abook.abv.ui.common.activity.ABVUIActivity;
......@@ -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.constant.ErrorCode;
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.helper.ProgressDialogHelper;
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.KeyboardUtils;
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.ABVListDialog;
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.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.ActivityHandlingHelper;
import jp.agentec.abook.abv.ui.home.helper.HomeOperationListHelper;
......@@ -125,7 +112,6 @@ import jp.agentec.adf.util.DateTimeUtil;
import jp.agentec.adf.util.FileUtil;
import jp.agentec.adf.util.StringUtil;
import static jp.agentec.abook.abv.cl.util.PreferenceUtil.getUserPref;
/**
* Created by leej on 2018/08/17
......@@ -134,27 +120,24 @@ import static jp.agentec.abook.abv.cl.util.PreferenceUtil.getUserPref;
public class OperationListActivity extends ABVUIActivity {
private static final String TAG = "OperationListActivity";
private ImageButton mViewModeButton; // リスト・パンネル切り替えボタン
private ImageButton mViewModeButton; // パンネル・リスト表示ボタン
private ImageButton mSearchButton; // 検索ボタン
private ImageButton mFilterButton; // フィルタボタン
private ImageButton mCommunicationButton; // コミュニケーションボタン
private ImageButton mCommonContentButton; // 共通資料ボタン
private ImageButton mOperationBatchSyncButton; // 一括同期ボタン
private ImageButton mOperationBatchSyncButton; // カテゴリの一括同期ボタン
private ImageButton mCategoryLocationButton; // カテゴリ選択ボタン
public String mSearchWord;
public String mStartDateStr;
public String mEndDateStr;
private TextView mOperationTitle; // 一覧のタイトル
private EditText mSearchTextView;
private TextView mStartDate;
private TextView mEndDate;
private LinearLayout mSearchResultLayout;
private LinearLayout mReportTypeLayoutLabel;
private LinearLayout mReportTypeLayoutButton;
private Button mReportTypeAllButton;
private Button mReportTypeDefaultButton;
private Button mReportTypeRoutineTaskButton;
// 検索画面の条件(文字列)
public String mSearchWord; // 検索画面の値(作業名)
public String mStartDateStr; // 検索画面の値(作業開始日)
public String mEndDateStr; // 検索画面の値(作業終了日)
private EditText mSearchTextView; // 検索画面の作業名
private TextView mStartDate; // 検索画面の作業開始日
private TextView mEndDate; // 検索画面の作業終了日
private Dialog mSearchDialog;
private Date mOperationLastEditDate;
......@@ -169,32 +152,16 @@ public class OperationListActivity extends ABVUIActivity {
private OperationGroupMasterLogic mOperationGroupMasterLogic = AbstractLogic.getLogic(OperationGroupMasterLogic.class);
private TaskDao mTaskDao = AbstractDao.getDao(TaskDao.class);
private PushMessageLogic mPushMessageLogic = AbstractLogic.getLogic(PushMessageLogic.class);
private ImageView mPanoCotnentImageView;
private TextView mPanoContentNameTextView;
private Uri mSelectPanoContentUri;
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 boolean activityResultFlg;
private ListView mFixPushMessageListView;
private Dialog mPushMessageSendDialog;
private int mSelectedFixPuchMessagePosition;
private int mSendType;
private OperationListHelper mListHelper = null;
private ArrayList<Integer> mAllOperationReportTypes;
private ABVListDialog mShowDialog;
private Map<Integer, Integer> operationCountMap;
......@@ -204,12 +171,6 @@ public class OperationListActivity extends ABVUIActivity {
// 作業種別のサービスオプション値を保持用フラグ
private boolean mOperationGroupMasterServiceOperationFlg;
// 絞り検索マスタデータ
// private Date mApertureLastEditDate;
// 絞り検索マスタLogic
private ApertureMasterDataLogic mApertureMasterDataLogic = AbstractLogic.getLogic(ApertureMasterDataLogic.class);
// ビューの作成
private class ReloadHandler implements Runnable {
@Override
......@@ -224,9 +185,9 @@ public class OperationListActivity extends ABVUIActivity {
vg.addView(child);
// ツールバーのビューモードイメージ変更
if (getABVUIDataCache().getViewMode() == AppDefType.ViewMode.PANEL) {
mViewModeButton.setBackground(getRDrawable(R.drawable.ic_display_list));
mViewModeButton.setImageResource(R.drawable.ic_display_list);
} else {
mViewModeButton.setBackground(getRDrawable(R.drawable.ic_display_pannel));
mViewModeButton.setImageResource(R.drawable.ic_display_pannel);
}
closeProgressPopup();
}
......@@ -241,18 +202,21 @@ public class OperationListActivity extends ABVUIActivity {
mViewModeButton = (ImageButton) findViewById(R.id.btn_view_mode);
// 検索ボタン
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);
mCommonContentButton = (ImageButton) findViewById(R.id.btn_common_content);
mLocationTypeRadioGroup = (RadioGroup) findViewById(R.id.segment_group);
mOperationBatchSyncButton = (ImageButton) findViewById(R.id.btc_batch_sync);
mCategoryLocationButton = (ImageButton) findViewById(R.id.btn_category_location);
// 定期点検で同期ボタンタップの日付と現在の日付が異なる且つ、作業するデータが存在しない場合、needSyncFlgをtrueに更新
updateNeedSyncRoutineOperation();
// 非活性化する(ホーム画面ではホームボタンが必要ないため)
ImageButton operationHomeButton = (ImageButton) findViewById(R.id.btn_operation_home);
operationHomeButton.setEnabled(false);
// ビュー変更ボタンのタッチイベント
mViewModeButton.setOnClickListener(new View.OnClickListener() {
@Override
......@@ -269,9 +233,6 @@ public class OperationListActivity extends ABVUIActivity {
// サービスオプション(作業種別使用)をセット
mOperationGroupMasterServiceOperationFlg = ABVDataCache.getInstance().serviceOption.isOperationGroupMaster();
// 全て・作業種別のセグメントチェック設定
checkOperationGroupType(getABVUIDataCache().getOperationGroupMasterMode());
// 検索アイコンのクリックイベント
mSearchButton.setOnClickListener(new View.OnClickListener() {
@Override
......@@ -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() {
@Override
......@@ -387,8 +338,6 @@ public class OperationListActivity extends ABVUIActivity {
alertDialog.show();
}
}
mAllOperationReportTypes = getOperationReportTypeList(true);
// リスト更新
setOperationListView();
}
......@@ -397,78 +346,54 @@ public class OperationListActivity extends ABVUIActivity {
private void showCommonContent() {
Intent intent = new Intent();
intent.setClass(OperationListActivity.this, OperationRelatedContentActivity.class);
startActivity(intent);
intent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
startActivity(intent, NaviConsts.Right);
}
// ツールバーの設定
private void configurationToolbarIcon() {
List<PushMessageDto> pushMessageDtoList = mPushMessageLogic.getAllPushMessageList();
boolean existUnreadFlg = false;
for (PushMessageDto pushMessageDto : pushMessageDtoList) {
if (!pushMessageDto.readingFlg) {
existUnreadFlg = true;
break;
}
}
if (existUnreadFlg) {
mCommunicationButton.setImageDrawable(getRDrawable(R.drawable.ic_communication_menu_with_badge));
} else {
mCommunicationButton.setImageDrawable(getRDrawable(R.drawable.ic_communication_menu));
}
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();
// バッチを付けるか判定して、イメージを設定
setCommunicationImageButton(mCommunicationButton);
// 作業種別表示・非表示
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();
// フィルタのリセット
getABVUIDataCache().setOperationReportTypes(mAllOperationReportTypes);
// フィルターボタンを無効にする
mFilterButton.setImageDrawable(getRDrawable(R.drawable.ic_filter));
setEnabledImageButton(mFilterButton, false);
// 検索ボタンを無効にする
mSearchButton.setImageDrawable(getRDrawable(R.drawable.ic_operation_search));
setEnabledImageButton(mSearchButton, false);
mSearchButton.setEnabled(false);
// 一括同期ボタン表示
mOperationBatchSyncButton.setVisibility(View.VISIBLE);
} else {
// 全て
// ボタンを活性化
setEnabledImageButton(mFilterButton, true);
setEnabledImageButton(mSearchButton, true);
// 検索ボタンを活性化
mSearchButton.setEnabled(true);
setCategoryImage(false);
// 一括同期ボタン非表示
mOperationBatchSyncButton.setVisibility(View.GONE);
mOperationTitle.setText(R.string.title_all_operation);
}
// 全て・作業種別のセグメントチェック設定
checkOperationGroupType(getABVUIDataCache().getOperationGroupMasterMode());
} else {
mOperationTitle.setText(R.string.title_all_operation);
// アイコン非表示
mLocationTypeRadioGroup.setVisibility(View.GONE);
setCategoryImage(false);
mCategoryLocationButton.setVisibility(View.GONE);
// 一括同期ボタンを非表示
mOperationBatchSyncButton.setVisibility(View.GONE);
// ボタンを活性化
setEnabledImageButton(mFilterButton, true);
setEnabledImageButton(mSearchButton, true);
// 検索ボタンを活性化
mSearchButton.setEnabled(true);
}
// ツールバーの検索結果レイアウトの表示・非表示
checkShowSearchResult();
// 検索済みの場合、タイトルを「検索結果」にする
if (isSearched()) {
mOperationTitle.setText(R.string.search_result);
}
}
// 検索ワードのクリア
......@@ -478,6 +403,12 @@ public class OperationListActivity extends ABVUIActivity {
mEndDateStr = null;
clearData();
}
// 検索済みかどうかチェック
private boolean isSearched() {
return !(StringUtil.isNullOrEmpty(mSearchWord) && StringUtil.isNullOrEmpty(mStartDateStr) && StringUtil.isNullOrEmpty(mEndDateStr));
}
// イメージボタンを無効/有効にする
private void setEnabledImageButton(ImageButton button, boolean enabled) {
if (enabled) {
......@@ -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,11 +587,14 @@ public class OperationListActivity extends ABVUIActivity {
refreshOperationList();
mSearchDialog.dismiss();
// 検索条件に条件がある場合のみ、件数のトーストメッセージは表示する
if (isSearched()) {
// リソースパターンの適用
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 {
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) {
ContentDto contentDto = contentDao.getContent(operationDto.contentId);
try {
......@@ -781,6 +709,8 @@ public class OperationListActivity extends ABVUIActivity {
mOperationLogic.createJsonForOpenABookCheckPano(operationDto.operationId, operationDto.contentId, contentPath);
mOperationLogic.createJsonForOperationContent(operationDto.operationId, contentPath, operationDto.reportType == ReportType.RoutineTask);
// 作業閲覧日付の更新
mOperationDao.updateReadingDate(operationDto.operationId);
// サーバ作業後、対応必要
StringBuffer path = new StringBuffer();
......@@ -961,18 +891,10 @@ public class OperationListActivity extends ABVUIActivity {
}
// 設定画面へ遷移
public void onClickOperationSubMenu(View v) {
showSettingPopup();
public void onClickSetting(View v) {
showSetting();
}
public void onClickShowHelpView(View v) {
// if (mOperationAuthLevel == OperationAuthLevel.OPERATION_INSTRUCTOR) {
// showHelpViewDialog(Constant.HelpViewType.OperationListDirector);
// } else {
showHelpViewDialog(Constant.HelpViewType.OperationListReporter);
// }
}
/**
* 360編集画面表示
*
......@@ -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が存在するかチェックメソッド
* @param listDto リストDto
......@@ -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からリソースパターンを取得し、ローカルに保存する。
private void setResourcePattern() {
Logger.d(TAG, "ABVEnvironment.getInstance().resourcePatternType : " + ABVEnvironment.getInstance().resourcePatternType);
......@@ -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 autoClose 直下階層が存在しない場合、ダイアログを自動で閉じる
* @param isInit 初期表示
*/
public void showOperationGroupMasterDialog(boolean isInit, boolean autoClose) {
public void showOperationGroupMasterDialog(boolean isInit) {
if (isInit || operationCountMap == null) {
// 最後の階層レベルを取得
Integer lastLevel = mOperationGroupMasterLogic.getLastGroupLevel();
......@@ -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()];
int[] operationCounts = new int[operationGroupMasterDtoList.size()];
int i = 0;
......@@ -2146,7 +1599,7 @@ public class OperationListActivity extends ABVUIActivity {
helper.popList(1, true);
// ポップアップ再表示
dialog.dismiss();
showOperationGroupMasterDialog(false, false);
showOperationGroupMasterDialog(false);
}
});
} else {
......@@ -2162,7 +1615,7 @@ public class OperationListActivity extends ABVUIActivity {
helper.pushList(operationGroupMasterDto);
// ポップアップ再表示
dialog.dismiss();
showOperationGroupMasterDialog(false, true);
showOperationGroupMasterDialog(false);
}
});
......@@ -2181,7 +1634,7 @@ public class OperationListActivity extends ABVUIActivity {
*/
private OperationListHelper getListHelper() {
OperationListHelper operationListHelper;
if (mOperationGroupMasterServiceOperationFlg && getABVUIDataCache().getOperationGroupMasterMode() == OperationLocationType.GROUP) {
if (mOperationGroupMasterServiceOperationFlg && getABVUIDataCache().getOperationGroupMasterMode() == OperationLocationType.CATEGORY) {
operationListHelper = new OperationGroupMasterListHelper(this);
} else {
operationListHelper = new HomeOperationListHelper(this);
......@@ -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() {
putUserPref(AppDefType.UserPrefKey.APERTURE_MASTER_DATA_FETCH_DATE, ABVDataCache.getInstance().getTempApertureMasterDataFetchDate());
}
/**
* カテゴリの一括同期ダイアログ表示
*/
......@@ -2374,7 +1788,187 @@ public class OperationListActivity extends ABVUIActivity {
public void onDestroy() {
Logger.d(TAG, "onDestroy");
contentDownloader.removeContentDownloadListener(this);
if (batchSyncView != null) {
batchSyncView.setActivityDestroy();
}
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;
import android.content.Intent;
import android.os.AsyncTask;
import android.os.Bundle;
import android.view.KeyEvent;
import android.view.View;
import android.widget.Button;
import android.widget.ImageButton;
......@@ -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.constant.ErrorCode;
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.util.ABVToastUtil;
import jp.agentec.abook.abv.ui.common.util.AlertDialogUtil;
......@@ -49,19 +51,16 @@ public class OperationRelatedContentActivity extends ABVUIActivity {
private OperationRelatedContentSectionAdapter mOperationRelatedContentSectionAdapter;
private ImageButton mOperationHomeButton;
private ImageView mRefreshButton;
private ImageButton mOperationHelpButton;
private ImageButton mOperationHomeButton; // ホームボタン
private ImageButton mOperationRelatedContentButton; // 関連資料ボタン
private ImageButton mCommunicationButton; // コミュニケーションボタン
private TextView mTxtOperationRelatedContent;
private TextView mTxtOperationName;
private Button mAllSaveButton;
private ListView mContentListView;
private List<CategoryContentDto> mOperationContentList;
private Long operationId;
private String operationName;
private OperationLogic mOperationLogic = AbstractLogic.getLogic(OperationLogic.class);
@Override
......@@ -69,40 +68,45 @@ public class OperationRelatedContentActivity extends ABVUIActivity {
super.onCreate(savedInstanceState);
setContentView(R.layout.ac_operation_related_content);
// ホームボタン(作業一覧へ遷移ボタン)
mOperationHomeButton = (ImageButton) findViewById(R.id.btn_operation_home);
mOperationHelpButton = (ImageButton) findViewById(R.id.btn_operation_help);
mTxtOperationName = (TextView) findViewById(R.id.txt_operation_name);
// 共通資料ボタン
mOperationRelatedContentButton = (ImageButton) findViewById(R.id.btn_common_content);
// コミュニケーションボタン
mCommunicationButton = (ImageButton) findViewById(R.id.btn_communication_menu);
// 一括保存ボタン
mAllSaveButton = (Button) findViewById(R.id.btn_all_save);
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);
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(),
R.string.title_common_content,
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);
settingBottomToolbar();
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
......@@ -249,7 +253,6 @@ public class OperationRelatedContentActivity extends ABVUIActivity {
}
Intent intent = new Intent();
intent.putExtra(ABookKeys.OPERATION_ID, operationId);
ActivityHandlingHelper.getInstance().checkContentActivity(contentId, 0, intent);
}
} catch (Exception e) {
......@@ -288,11 +291,11 @@ public class OperationRelatedContentActivity extends ABVUIActivity {
* ボタンイベント設定
*/
private void setOnButtonEvent() {
// プロジェクトホーム画面へ
// 作業のホーム画面へ
mOperationHomeButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
finish();
backToHome();
}
});
......@@ -335,6 +338,10 @@ public class OperationRelatedContentActivity extends ABVUIActivity {
});
}
/**
* 資料の削除ダイアログ表示
* @param contentDto 資料情報
*/
public void showContentDeleteDialog(final ContentDto contentDto) {
ABookAlertDialog contentsDeleteDialog = AlertDialogUtil.deleteContentAlertDialog(this);
contentsDeleteDialog.setNegativeButton(R.string.cancel, null);
......@@ -353,6 +360,15 @@ public class OperationRelatedContentActivity extends ABVUIActivity {
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) {
// リソースパターンの適用
ABookAlertDialog cancelDownloadDialog = AlertDialogUtil.createAlertDialog(this,
......@@ -373,6 +389,17 @@ public class OperationRelatedContentActivity extends ABVUIActivity {
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) {
final ContentDto updatedContentDto = contentDto;
handler.post(new Runnable() {
......@@ -410,11 +437,8 @@ public class OperationRelatedContentActivity extends ABVUIActivity {
showOperationRelatedContentList();
}
public void onClickShowHelpView(View v) {
if (operationId == 0) {
showHelpViewDialog(Constant.HelpViewType.CommonContent);
} else {
showHelpViewDialog(Constant.HelpViewType.OperationDetail);
}
// 設定画面へ遷移
public void onClickSetting(View v) {
showSetting();
}
}
......@@ -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.ABVAuthenticatedActivity;
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.appinfo.AppDefType;
import jp.agentec.abook.abv.ui.common.appinfo.AppDefType.DefPrefKey;
......@@ -118,6 +119,7 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
private ABookAlertDialog promotionRequestAlertDialog;
private long lastDisconnect;
private static Dialog meetingAlertDialog;
private ABVUIActivity previousOfSettingActivity;
protected ContentRefresher contentRefresher = ContentRefresher.getInstance();
......@@ -1713,4 +1715,20 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
}
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;
* @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 WP = LayoutParams.WRAP_CONTENT;
protected Stack<StackObject> stack;
......@@ -39,7 +39,7 @@ public abstract class HierarchyOperationListHelper<StackObject> extends Operatio
* 階層構造を持つ親クラス
* @param appActivity
*/
public HierarchyOperationListHelper(OperationListActivity appActivity) {
public CategoryOperationListHelper(OperationListActivity appActivity) {
super(appActivity);
mHierarchyContentLayout = new LinearLayout(appActivity);
......@@ -56,7 +56,7 @@ public abstract class HierarchyOperationListHelper<StackObject> extends Operatio
panListLayout.findViewById(R.id.btn_show_list_view).setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
mAppActivity.showOperationGroupMasterDialog(true,false);
mAppActivity.showOperationGroupMasterDialog(true);
}
});
......
......@@ -2,6 +2,7 @@ package jp.agentec.abook.abv.ui.home.helper;
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.dto.ContentDto;
import jp.agentec.abook.abv.bl.dto.OperationDto;
......@@ -26,7 +27,8 @@ public class HomeOperationListHelper extends OperationListHelper {
@Override
protected List<OperationDto> findOperationList() throws Exception {
String reportTypeStr = getUserPref(mAppActivity, AppDefType.UserPrefKey.OPERATION_REPORT_TYPES, null);
return operationLogic.getRefreshOperation(mAppActivity.mSearchWord, mAppActivity.mStartDateStr, mAppActivity.mEndDateStr, reportTypeStr);
int operationSortType = getUserPref(mAppActivity, AppDefType.UserPrefKey.OPERATION_SORT_CONDITION, 0);
OperationSortingType operationSortingType = OperationSortingType.parse(operationSortType);
return operationLogic.getRefreshOperation(mAppActivity.mSearchWord, mAppActivity.mStartDateStr, mAppActivity.mEndDateStr, operationSortingType);
}
}
package jp.agentec.abook.abv.ui.home.helper;
import java.util.ArrayList;
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.log.Logger;
import jp.agentec.abook.abv.bl.data.dao.AbstractDao;
......@@ -18,7 +18,7 @@ import jp.agentec.adf.util.CollectionUtil;
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 OperationGroupMasterDao mOperationGroupMasterDao = AbstractDao.getDao(OperationGroupMasterDao.class);
......@@ -59,7 +59,7 @@ public class OperationGroupMasterListHelper extends HierarchyOperationListHelper
/**
* データの取得処理(新着更新処理完了後行われる)
* @return
* @return 作業一覧に表示されるリスト
* @throws Exception
*/
@Override
......@@ -76,8 +76,10 @@ public class OperationGroupMasterListHelper extends HierarchyOperationListHelper
OperationGroupMasterDto peekOperationGroupMasterDto = stack.peek();
mAppActivity.checkBatchNeedSyncButton(peekOperationGroupMasterDto.operationGroupMasterId);
int operationSortType = getUserPref(mAppActivity, AppDefType.UserPrefKey.OPERATION_SORT_CONDITION, 0);
OperationSortingType operationSortingType = OperationSortingType.parse(operationSortType);
// 作業種別IDで紐づく作業リストを取得
return mOperationGroupMasterLogic.getOperationByOperationGroupMasterId(peekOperationGroupMasterDto.operationGroupMasterId);
return mOperationGroupMasterLogic.getOperationByOperationGroupMasterId(peekOperationGroupMasterDto.operationGroupMasterId, operationSortingType);
}
/**
......
......@@ -58,6 +58,7 @@ public abstract class OperationListHelper {
mPullToRefreshGridView = new PullToRefreshGridView(activity);
}
/**
* 作業を検索してListを返す
*
......
......@@ -1780,13 +1780,13 @@ public class ContentViewActivity extends ABVContentViewActivity {
if (isVisable) {
operationHomeButton.setVisibility(View.INVISIBLE);
taskListButton.setVisibility(View.INVISIBLE);
helpButton.setVisibility(View.INVISIBLE);
// helpButton.setVisibility(View.INVISIBLE);
if (exitMeetingBtn != null && exitMeetingBtn.getVisibility() == View.VISIBLE) {
RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(WC, WC);
params.addRule(RelativeLayout.ALIGN_PARENT_RIGHT);
params.addRule(RelativeLayout.CENTER_VERTICAL);
params.rightMargin = (int) (getResources().getDisplayMetrics().density * 5);
helpButton.setLayoutParams(params);
// RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(WC, WC);
// params.addRule(RelativeLayout.ALIGN_PARENT_RIGHT);
// params.addRule(RelativeLayout.CENTER_VERTICAL);
// params.rightMargin = (int) (getResources().getDisplayMetrics().density * 5);
// helpButton.setLayoutParams(params);
exitMeetingBtn.setVisibility(View.GONE);
}
......@@ -1797,13 +1797,13 @@ public class ContentViewActivity extends ABVContentViewActivity {
} else {
operationHomeButton.setVisibility(View.VISIBLE);
taskListButton.setVisibility(View.VISIBLE);
helpButton.setVisibility(View.VISIBLE);
// helpButton.setVisibility(View.VISIBLE);
if (exitMeetingBtn != null && meetingManager.isSendable()) {
RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(WC, WC);
params.addRule(RelativeLayout.LEFT_OF, R.id.btn_exitMeeting);
params.addRule(RelativeLayout.CENTER_VERTICAL);
params.rightMargin = (int) (getResources().getDisplayMetrics().density * 5);
helpButton.setLayoutParams(params);
// RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(WC, WC);
// params.addRule(RelativeLayout.LEFT_OF, R.id.btn_exitMeeting);
// params.addRule(RelativeLayout.CENTER_VERTICAL);
// params.rightMargin = (int) (getResources().getDisplayMetrics().density * 5);
// helpButton.setLayoutParams(params);
exitMeetingBtn.setVisibility(View.VISIBLE);
}
......@@ -4908,14 +4908,14 @@ public class ContentViewActivity extends ABVContentViewActivity {
@Override
protected void commonConfigureRemote() {
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) {
helpButton.setVisibility(View.GONE);
// helpButton.setVisibility(View.GONE);
operationHomeButton.setVisibility(View.GONE);
taskListButton.setVisibility(View.GONE);
} else {
helpButton.setVisibility(View.VISIBLE);
// helpButton.setVisibility(View.VISIBLE);
operationHomeButton.setVisibility(View.VISIBLE);
subMenuBtn.setVisibility(View.GONE);
......
......@@ -73,7 +73,7 @@ public class ParentWebViewActivity extends ABVContentViewActivity {
historyLayout = (LinearLayout) findViewById(R.id.historyLayout);
addSceneButton = (ImageButton) findViewById(R.id.btn_add_scene);
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);
closeButton = (Button) findViewById(R.id.closeBtn);
historyListBtn = (Button) findViewById(R.id.btn_history_list);
......@@ -132,11 +132,11 @@ public class ParentWebViewActivity extends ABVContentViewActivity {
@Override
protected void commonConfigureHeader() {
if (mStatusCode == Constant.XWalkWebViewDisplayStatus.InitView) { //フォームが非表示時のみヘルプボタン表示
helpButton.setVisibility(View.VISIBLE);
} else {
helpButton.setVisibility(View.INVISIBLE);
}
// if (mStatusCode == Constant.XWalkWebViewDisplayStatus.InitView) { //フォームが非表示時のみヘルプボタン表示
// helpButton.setVisibility(View.VISIBLE);
// } else {
// helpButton.setVisibility(View.INVISIBLE);
// }
if (Constant.XWalkWebViewDisplayStatus.TaskView == mStatusCode) {
operationHomeButton.setVisibility(View.GONE);
......@@ -159,21 +159,21 @@ public class ParentWebViewActivity extends ABVContentViewActivity {
}
addSceneButton = (ImageButton) findViewById(R.id.btn_add_scene);
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);
if (mXWalkOpenType == Constant.XWalkOpenType.DEFAULT) {
helpButton.setVisibility(View.GONE);
// helpButton.setVisibility(View.GONE);
operationHomeButton.setVisibility(View.GONE);
addSceneButton.setVisibility(View.GONE);
taskListButton.setVisibility(View.GONE);
} else {
if (mOperationType == OperationType.LIST && operationDto.reportType != Constant.ReportType.RoutineTask && operationDto.enableAddReport == Constant.EnableAddReport.NO) {
// リストタイプ且つ報告タイプが定期点検以外で作業追加区分が無しの場合、ヘルプボタンを非表示
helpButton.setVisibility(View.INVISIBLE);
} else {
helpButton.setVisibility(View.VISIBLE);
}
// if (mOperationType == OperationType.LIST && operationDto.reportType != Constant.ReportType.RoutineTask && operationDto.enableAddReport == Constant.EnableAddReport.NO) {
// // リストタイプ且つ報告タイプが定期点検以外で作業追加区分が無しの場合、ヘルプボタンを非表示
// helpButton.setVisibility(View.INVISIBLE);
// } else {
// helpButton.setVisibility(View.VISIBLE);
// }
operationHomeButton.setVisibility(View.VISIBLE);
btnWebBack.setVisibility(View.GONE);
......
......@@ -92,10 +92,8 @@ public class Action3DImageView extends ImageView implements OnTouchListener {
@Override
public boolean onTouch(View v, MotionEvent event) {
if (mEventFlg == false) {
((ZoomRelativeLayout)v.getParent()).onTouchEvent(event);
} else {
if (((ZoomRelativeLayout)v.getParent()).isZooming() == false) {
if (mEventFlg) {
if (((ZoomRelativeLayout) v.getParent()).isZooming() == false) {
v.getParent().requestDisallowInterceptTouchEvent(true);
int x = (int) event.getRawX();
int y = (int) event.getRawY();
......
......@@ -27,6 +27,7 @@ import android.os.Build;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.ImageButton;
......@@ -111,6 +112,26 @@ public class EnqueteLayout extends RelativeLayout {
} else {
mWebView = new EnqueteWebView(context);
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.setVerticalScrollBarEnabled(true);
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