Commit 2df041c8 by Lee Jaebin

Merge branch 'feature/1.0.1' into feature/1.0.1_32825

parents a534737c 1c7d7466
...@@ -27,13 +27,20 @@ public class ContentVersionsJSON extends AcmsCommonJSON { ...@@ -27,13 +27,20 @@ public class ContentVersionsJSON extends AcmsCommonJSON {
public ArrayList<ContentDto> contentVersions; public ArrayList<ContentDto> contentVersions;
public String fetchDate; public String fetchDate;
public static final String ResourcePatternType = "resourcePatternType"; // 文言リソースパターン
public int resourcePatternType; // 文言リソースパターン変数
public ContentVersionsJSON(String jsonString) throws AcmsException { public ContentVersionsJSON(String jsonString) throws AcmsException {
super(jsonString); super(jsonString);
} }
@Override @Override
protected void parse(JSONObject json) throws JSONValidationException { protected void parse(JSONObject json) throws JSONValidationException {
// 取得したJSONから事業者リソースパターンを取得する
if (json.has(ResourcePatternType)) {
resourcePatternType = json.getInt(ResourcePatternType);
}
if (json.has(FetchDate)) { if (json.has(FetchDate)) {
fetchDate = json.getString(FetchDate); fetchDate = json.getString(FetchDate);
} }
......
...@@ -59,6 +59,9 @@ public class ABVEnvironment { ...@@ -59,6 +59,9 @@ public class ABVEnvironment {
// ダウンロード作業が完了したあと、テーブルに値を更新する。その後、再びクリアするようにする // ダウンロード作業が完了したあと、テーブルに値を更新する。その後、再びクリアするようにする
public String tempContentVersionLastFetchDate = ""; public String tempContentVersionLastFetchDate = "";
// Serverから取得したcontentVersion時のリソースパターンを一時的に保存するための変数
public int resourcePatternType;
////////////////////////////// 定数 ////////////////////////////////// ////////////////////////////// 定数 //////////////////////////////////
private static final String ServerTimeKey = "ABook"; private static final String ServerTimeKey = "ABook";
......
...@@ -265,6 +265,9 @@ public class ContentRefresher { ...@@ -265,6 +265,9 @@ public class ContentRefresher {
return false; return false;
} }
// リソースパターンの値を取得する
ABVEnvironment.getInstance().resourcePatternType = json.resourcePatternType;
// 一時値を保存。ダウンロード処理が完了したあとにlastFetchDateを更新 // 一時値を保存。ダウンロード処理が完了したあとにlastFetchDateを更新
String fetchDate = json.fetchDate; String fetchDate = json.fetchDate;
ABVEnvironment.getInstance().tempContentVersionLastFetchDate = fetchDate; ABVEnvironment.getInstance().tempContentVersionLastFetchDate = fetchDate;
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -77,33 +77,6 @@ ...@@ -77,33 +77,6 @@
android:text="@string/login" android:text="@string/login"
android:textColor="@color/text_color"/> android:textColor="@color/text_color"/>
<LinearLayout
android:id="@+id/guestLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<Button
android:id="@+id/btn_guestLogin"
android:layout_width="200dp"
android:layout_height="46dp"
android:layout_marginTop="10dp"
android:background="@drawable/btn_guest"
android:contentDescription="@string/guest_login"
android:text="@string/guest_login"
android:textColor="@color/text_color" />
<TextView
android:id="@+id/paymemberText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="20dp"
android:text="@string/to_paymember_text"
android:textColor="@color/text_color" />
</LinearLayout>
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
......
...@@ -6,30 +6,6 @@ ...@@ -6,30 +6,6 @@
android:background="@color/background" android:background="@color/background"
android:orientation="vertical" > android:orientation="vertical" >
<LinearLayout
android:id="@+id/toolbar_layout"
style="@style/ToolBarHolo"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/push_message_setting"
android:textColor="@color/text_select"
android:textSize="@dimen/app_normal_text_size" />
</LinearLayout>
<TextView
android:id="@+id/tv_summary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="3dp"
android:text="@string/push_message_setting_summary"
android:textColor="@color/text_select"
android:textSize="@dimen/app_normal_text_size" />
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="1dip" android:layout_height="1dip"
......
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<TextView
android:id="@+id/txtDesc"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:layout_marginTop="5dp"
android:textColor="@color/edt_text"
android:text="@string/pdf_image_size_summary"
android:textSize="14sp"
android:focusable="true"
android:focusableInTouchMode="true">
<requestFocus/>
</TextView>
<TextView
android:id="@+id/txtDesc2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:textColor="@color/edt_text"
android:text="@string/pdf_image_size_desc"
android:textSize="14sp"
android:visibility="gone" >
</TextView>
<Spinner
android:id="@+id/spinner1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:background="@android:drawable/btn_dropdown"
android:spinnerMode="dropdown" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:orientation="horizontal" >
<TextView
android:id="@+id/txtWdith"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingEnd="10dp"
android:paddingStart="10dp"
android:textColor="@color/edt_text"
android:text="@string/width"
android:textSize="20sp" >
</TextView>
<EditText
android:id="@+id/etxWidth"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ems="5"
android:enabled="false"
android:inputType="number" >
</EditText>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:orientation="horizontal" >
<TextView
android:id="@+id/txtHeight"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingEnd="10dp"
android:paddingStart="10dp"
android:text="@string/height"
android:textColor="@color/edt_text"
android:textSize="20sp" >
</TextView>
<EditText
android:id="@+id/etxHeight"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ems="5"
android:enabled="true"
android:inputType="number" >
</EditText>
</LinearLayout>
<TextView
android:id="@+id/txttouch_desc"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:layout_marginTop="5dp"
android:textColor="@color/edt_text"
android:text="@string/touch_desc"
android:textSize="14sp"
android:focusable="true"
android:focusableInTouchMode="true">
<requestFocus/>
</TextView>
<LinearLayout
android:id="@+id/touchlayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:id="@+id/txttouch_mode"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingEnd="10dp"
android:paddingStart="10dp"
android:text="@string/touch_mode"
android:textColor="@color/edt_text"
android:textSize="20sp"></TextView>
<RadioGroup
android:id="@+id/radiogroup"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingEnd="5dp"
android:paddingStart="5dp">
<RadioButton
android:id="@+id/radioTouch"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/monitor_mode_touch"
android:textColor="@color/edt_text" />
<RadioButton
android:id="@+id/radioNoTouch"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/monitor_mode_notouch"
android:textColor="@color/edt_text" />
</RadioGroup>
/>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
...@@ -74,8 +74,8 @@ ...@@ -74,8 +74,8 @@
</string-array> </string-array>
<string-array name="operation_report_types"> <string-array name="operation_report_types">
<item>報告</item> <item>Report</item>
<item>定期点検</item> <item>Routine</item>
<item>報告(回答)</item> <item>ReportReply</item>
</string-array> </string-array>
</resources> </resources>
\ No newline at end of file
...@@ -104,10 +104,6 @@ ...@@ -104,10 +104,6 @@
<item>2</item> <item>2</item>
<item>3</item> <item>3</item>
</string-array> </string-array>
<string-array name="monitorTouchMode">
<item>@string/monitor_mode_touch</item>
<item>@string/monitor_mode_notouch</item>
</string-array>
<string-array name="monitorTouchMode_values"> <string-array name="monitorTouchMode_values">
<item>0</item> <item>0</item>
<item>1</item> <item>1</item>
......
...@@ -95,7 +95,6 @@ import jp.agentec.abook.abv.ui.common.constant.ErrorCode; ...@@ -95,7 +95,6 @@ import jp.agentec.abook.abv.ui.common.constant.ErrorCode;
import jp.agentec.abook.abv.ui.common.constant.ErrorMessage; import jp.agentec.abook.abv.ui.common.constant.ErrorMessage;
import jp.agentec.abook.abv.ui.common.constant.NaviConsts; import jp.agentec.abook.abv.ui.common.constant.NaviConsts;
import jp.agentec.abook.abv.ui.common.dialog.ABookAlertDialog; import jp.agentec.abook.abv.ui.common.dialog.ABookAlertDialog;
import jp.agentec.abook.abv.ui.common.helper.BillingHelper;
import jp.agentec.abook.abv.ui.common.util.AlertDialogUtil; import jp.agentec.abook.abv.ui.common.util.AlertDialogUtil;
import jp.agentec.abook.abv.ui.common.util.DisplayUtil; import jp.agentec.abook.abv.ui.common.util.DisplayUtil;
import jp.agentec.abook.abv.ui.common.util.Initializer; import jp.agentec.abook.abv.ui.common.util.Initializer;
......
...@@ -68,6 +68,7 @@ import jp.agentec.abook.abv.ui.common.constant.ErrorMessage; ...@@ -68,6 +68,7 @@ import jp.agentec.abook.abv.ui.common.constant.ErrorMessage;
import jp.agentec.abook.abv.ui.common.dialog.ABookAlertDialog; import jp.agentec.abook.abv.ui.common.dialog.ABookAlertDialog;
import jp.agentec.abook.abv.ui.common.util.ABVToastUtil; import jp.agentec.abook.abv.ui.common.util.ABVToastUtil;
import jp.agentec.abook.abv.ui.common.util.AlertDialogUtil; import jp.agentec.abook.abv.ui.common.util.AlertDialogUtil;
import jp.agentec.abook.abv.ui.common.util.PatternStringUtil;
import jp.agentec.abook.abv.ui.common.view.ABVPopupListWindow; import jp.agentec.abook.abv.ui.common.view.ABVPopupListWindow;
import jp.agentec.abook.abv.ui.home.helper.ABookCheckWebViewHelper; import jp.agentec.abook.abv.ui.home.helper.ABookCheckWebViewHelper;
import jp.agentec.abook.abv.ui.home.helper.ABookPermissionHelper; import jp.agentec.abook.abv.ui.home.helper.ABookPermissionHelper;
...@@ -658,8 +659,13 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity { ...@@ -658,8 +659,13 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
if (mXWalkOpenType == Constant.XWalkOpenType.PANO_EDIT) { if (mXWalkOpenType == Constant.XWalkOpenType.PANO_EDIT) {
ABookAlertDialog alertDialog = AlertDialogUtil.createAlertDialog(ABVContentViewActivity.this, R.string.pano_edit); ABookAlertDialog alertDialog = AlertDialogUtil.createAlertDialog(ABVContentViewActivity.this, PatternStringUtil.patternToInt(getApplicationContext(),
alertDialog.setMessage(R.string.msg_confirm_save_pano_edit); R.string.pano_edit,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
// リソースパターンの適用
alertDialog.setMessage(PatternStringUtil.patternToString(getApplicationContext(),
R.string.msg_confirm_save_pano_edit,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
alertDialog.setNegativeButton(R.string.cancel, null); alertDialog.setNegativeButton(R.string.cancel, null);
alertDialog.setPositiveButton(R.string.ok, alertDialog.setPositiveButton(R.string.ok,
new DialogInterface.OnClickListener() { new DialogInterface.OnClickListener() {
...@@ -749,8 +755,14 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity { ...@@ -749,8 +755,14 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
public void onClickOperationHome(View v) { public void onClickOperationHome(View v) {
if (mXWalkOpenType == Constant.XWalkOpenType.PANO_EDIT) { if (mXWalkOpenType == Constant.XWalkOpenType.PANO_EDIT) {
ABookAlertDialog alertDialog = AlertDialogUtil.createAlertDialog(ABVContentViewActivity.this, R.string.pano_edit); // リソースパターンの適用
alertDialog.setMessage(R.string.msg_confirm_save_pano_edit); ABookAlertDialog alertDialog = AlertDialogUtil.createAlertDialog(ABVContentViewActivity.this, PatternStringUtil.patternToString(getApplicationContext(),
R.string.pano_edit,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
// リソースパターンの適用
alertDialog.setMessage(PatternStringUtil.patternToString(getApplicationContext(),
R.string.msg_confirm_save_pano_edit,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
alertDialog.setNegativeButton(R.string.cancel, null); alertDialog.setNegativeButton(R.string.cancel, null);
alertDialog.setPositiveButton(R.string.ok, alertDialog.setPositiveButton(R.string.ok,
new DialogInterface.OnClickListener() { new DialogInterface.OnClickListener() {
...@@ -881,7 +893,10 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity { ...@@ -881,7 +893,10 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
try { try {
if (StringUtil.equalsAny(mCmd, ABookKeys.CMD_INSERT_TASK_REPORT, ABookKeys.CMD_UPDATE_TASK_REPORT)) { if (StringUtil.equalsAny(mCmd, ABookKeys.CMD_INSERT_TASK_REPORT, ABookKeys.CMD_UPDATE_TASK_REPORT)) {
showProgressPopup(getString(R.string.file_initialization)); // リソースパターンの適用
showProgressPopup(PatternStringUtil.patternToString(getApplicationContext(),
R.string.file_initialization,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
} }
if (isOperationPdf && operationTaskDto != null && StringUtil.equalsAny(mCmd, if (isOperationPdf && operationTaskDto != null && StringUtil.equalsAny(mCmd,
...@@ -998,8 +1013,13 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity { ...@@ -998,8 +1013,13 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
} else if (mCmd.equals(ABookKeys.CMD_SCENE_REGIST)) { } else if (mCmd.equals(ABookKeys.CMD_SCENE_REGIST)) {
String successFlg = abookCheckParam.get(ABookKeys.SUCCESS_FLG); String successFlg = abookCheckParam.get(ABookKeys.SUCCESS_FLG);
if(Integer.parseInt(successFlg) == 0) { if(Integer.parseInt(successFlg) == 0) {
ABookAlertDialog alertDialog = AlertDialogUtil.createAlertDialog(this, R.string.pano_edit); // リソースパターンの適用
alertDialog.setMessage(R.string.msg_sence_regist_failed); ABookAlertDialog alertDialog = AlertDialogUtil.createAlertDialog(this, PatternStringUtil.patternToInt(getApplicationContext(),
R.string.pano_edit,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
alertDialog.setMessage(PatternStringUtil.patternToInt(getApplicationContext(),
R.string.msg_sence_regist_failed,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
alertDialog.setPositiveButton(R.string.ok, alertDialog.setPositiveButton(R.string.ok,
new DialogInterface.OnClickListener() { new DialogInterface.OnClickListener() {
@Override @Override
...@@ -1143,7 +1163,9 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity { ...@@ -1143,7 +1163,9 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
// 報告(回答)の場合 // 報告(回答)の場合
if (taskReportLevel > 0) { if (taskReportLevel > 0) {
// #32926 作業報告画面改善 end // #32926 作業報告画面改善 end
afterABookCheckApi(mCmd, "", 1, getString(R.string.msg_location_search_fail), null); afterABookCheckApi(mCmd, "", 1, PatternStringUtil.patternToString(getApplicationContext(),
R.string.msg_location_search_fail,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), null);
} }
} }
...@@ -1185,7 +1207,10 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity { ...@@ -1185,7 +1207,10 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
} else { } else {
Logger.w(TAG,"onGetLocationFailed AccessFineLocation false"); Logger.w(TAG,"onGetLocationFailed AccessFineLocation false");
if (taskReportLevel > 0) { if (taskReportLevel > 0) {
afterABookCheckApi(mCmd, "", 1, getString(R.string.msg_location_search_fail), null); // リソースパターンの適用
afterABookCheckApi(mCmd, "", 1, PatternStringUtil.patternToString(getApplicationContext(),
R.string.msg_location_search_fail,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), null);
} }
} }
} }
......
...@@ -7,10 +7,12 @@ import jp.agentec.abook.abv.bl.dto.OperationDto; ...@@ -7,10 +7,12 @@ import jp.agentec.abook.abv.bl.dto.OperationDto;
import jp.agentec.abook.abv.bl.logic.AbstractLogic; import jp.agentec.abook.abv.bl.logic.AbstractLogic;
import jp.agentec.abook.abv.bl.logic.OperationLogic; import jp.agentec.abook.abv.bl.logic.OperationLogic;
import jp.agentec.abook.abv.launcher.android.R; import jp.agentec.abook.abv.launcher.android.R;
import jp.agentec.abook.abv.ui.common.appinfo.AppDefType;
import jp.agentec.abook.abv.ui.common.appinfo.AppDefType.PushMessageKey; import jp.agentec.abook.abv.ui.common.appinfo.AppDefType.PushMessageKey;
import jp.agentec.abook.abv.ui.common.constant.ErrorMessage; import jp.agentec.abook.abv.ui.common.constant.ErrorMessage;
import jp.agentec.abook.abv.ui.common.dialog.ABookAlertDialog; import jp.agentec.abook.abv.ui.common.dialog.ABookAlertDialog;
import jp.agentec.abook.abv.ui.common.util.AlertDialogUtil; import jp.agentec.abook.abv.ui.common.util.AlertDialogUtil;
import jp.agentec.abook.abv.ui.common.util.PatternStringUtil;
import jp.agentec.abook.abv.ui.home.activity.OperationListActivity; import jp.agentec.abook.abv.ui.home.activity.OperationListActivity;
import jp.agentec.abook.abv.ui.home.helper.ActivityHandlingHelper; import jp.agentec.abook.abv.ui.home.helper.ActivityHandlingHelper;
import jp.agentec.adf.util.StringUtil; import jp.agentec.adf.util.StringUtil;
...@@ -27,28 +29,47 @@ public class ShowPushMessageDailogActivity extends ABVUIActivity { ...@@ -27,28 +29,47 @@ public class ShowPushMessageDailogActivity extends ABVUIActivity {
if (operationId > 0) { if (operationId > 0) {
final ABookAlertDialog alertDialog = AlertDialogUtil.createAlertDialog(ShowPushMessageDailogActivity.this, getRString(R.string.app_name), getIntent().getExtras().getString(PushMessageKey.message)); final ABookAlertDialog alertDialog = AlertDialogUtil.createAlertDialog(ShowPushMessageDailogActivity.this, getRString(R.string.app_name), getIntent().getExtras().getString(PushMessageKey.message));
alertDialog.setPositiveButton(R.string.work_report, new DialogInterface.OnClickListener() { // リソースパターンの適用
alertDialog.setPositiveButton(PatternStringUtil.patternToInt(getApplicationContext(),
R.string.work_report,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)),
new DialogInterface.OnClickListener() {
@Override @Override
public void onClick(DialogInterface dialog, int whichButton) { public void onClick(DialogInterface dialog, int whichButton) {
if (contentRefresher.isRefreshing()) { if (contentRefresher.isRefreshing()) {
ErrorMessage.showErrorMessageToast(ShowPushMessageDailogActivity.this, R.string.msg_routineTask_report_disable_refreshing); // リソースパターンの適用
ErrorMessage.showErrorMessageToast(ShowPushMessageDailogActivity.this, PatternStringUtil.patternToInt(getApplicationContext(),
R.string.msg_routineTask_report_disable_refreshing,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
} else if(ActivityHandlingHelper.getInstance().isMeetingConnected()) { } else if(ActivityHandlingHelper.getInstance().isMeetingConnected()) {
ErrorMessage.showErrorMessageToast(ShowPushMessageDailogActivity.this, R.string.msg_routineTask_report_disable_meeting_room); // リソースパターンの適用
ErrorMessage.showErrorMessageToast(ShowPushMessageDailogActivity.this, PatternStringUtil.patternToInt(getApplicationContext(),
R.string.msg_routineTask_report_disable_meeting_room,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
} else { } else {
OperationLogic mOperationLogic = AbstractLogic.getLogic(OperationLogic.class); OperationLogic mOperationLogic = AbstractLogic.getLogic(OperationLogic.class);
OperationDto operationDto = mOperationLogic.getOperation(operationId); OperationDto operationDto = mOperationLogic.getOperation(operationId);
if (operationDto == null) { if (operationDto == null) {
ErrorMessage.showErrorMessageToast(ShowPushMessageDailogActivity.this, R.string.msg_routineTask_report_disable_no_operation); // リソースパターンの適用
ErrorMessage.showErrorMessageToast(ShowPushMessageDailogActivity.this, PatternStringUtil.patternToInt(getApplicationContext(),
R.string.msg_routineTask_report_disable_no_operation,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
} else if (operationDto.needSyncFlg) { } else if (operationDto.needSyncFlg) {
ErrorMessage.showErrorMessageToast(ShowPushMessageDailogActivity.this, R.string.msg_routineTask_report_disable_not_updated); // リソースパターンの適用
ErrorMessage.showErrorMessageToast(ShowPushMessageDailogActivity.this, PatternStringUtil.patternToInt(getApplicationContext(),
R.string.msg_routineTask_report_disable_not_updated,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
} else { } else {
OperationListActivity operationListActivity = ActivityHandlingHelper.getInstance().getPreviousOperationListActivity(); OperationListActivity operationListActivity = ActivityHandlingHelper.getInstance().getPreviousOperationListActivity();
if (operationListActivity != null) { if (operationListActivity != null) {
operationListActivity.startTaskDirectionOrReportView(operationDto); operationListActivity.startTaskDirectionOrReportView(operationDto);
} else { } else {
ErrorMessage.showErrorMessageToast(ShowPushMessageDailogActivity.this, R.string.msg_routineTask_report_disable_not_list); // リソースパターンの適用
ErrorMessage.showErrorMessageToast(ShowPushMessageDailogActivity.this, PatternStringUtil.patternToInt(getApplicationContext(),
R.string.msg_routineTask_report_disable_not_list,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
} }
} }
} }
......
...@@ -54,6 +54,8 @@ public interface AppDefType { ...@@ -54,6 +54,8 @@ public interface AppDefType {
String VIEW_MODE = "viewMode"; String VIEW_MODE = "viewMode";
String OPERATION_REPORT_TYPES = "operationReportTypes"; String OPERATION_REPORT_TYPES = "operationReportTypes";
String RESOURCE_PATTERN_TYPE = "resourcePatternType"; // 文言リソースパターン
} }
/** /**
......
package jp.agentec.abook.abv.ui.common.constant; package jp.agentec.abook.abv.ui.common.constant;
import jp.agentec.abook.abv.launcher.android.R; import jp.agentec.abook.abv.launcher.android.R;
import jp.agentec.abook.abv.ui.common.appinfo.AppDefType;
import jp.agentec.abook.abv.ui.common.util.PatternStringUtil;
import static jp.agentec.abook.abv.cl.util.PreferenceUtil.getUserPref;
import static org.chromium.base.ContextUtils.getApplicationContext;
/** /**
...@@ -106,10 +110,19 @@ public enum ErrorCode { ...@@ -106,10 +110,19 @@ public enum ErrorCode {
ERROR(R.string.ERROR), ERROR(R.string.ERROR),
DOWNLOAD_CANCEL_ERROR(R.string.DOWNLOAD_CANCEL_ERROR), DOWNLOAD_CANCEL_ERROR(R.string.DOWNLOAD_CANCEL_ERROR),
P_E_ACMS_P001(R.string.P001), // リソースパターンの適用
P_E_ACMS_P002(R.string.P002), P_E_ACMS_P001(PatternStringUtil.patternToInt(getApplicationContext(),
P_E_ACMS_P003(R.string.P003), R.string.P001,
P_E_ACMS_P004(R.string.P004); getUserPref(getApplicationContext(), AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0))),
P_E_ACMS_P002(PatternStringUtil.patternToInt(getApplicationContext(),
R.string.P002,
getUserPref(getApplicationContext(), AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0))),
P_E_ACMS_P003(PatternStringUtil.patternToInt(getApplicationContext(),
R.string.P003,
getUserPref(getApplicationContext(), AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0))),
P_E_ACMS_P004(PatternStringUtil.patternToInt(getApplicationContext(),
R.string.P004,
getUserPref(getApplicationContext(), AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
public final int resId; public final int resId;
......
package jp.agentec.abook.abv.ui.common.helper;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
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;
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.ContentDao;
import jp.agentec.abook.abv.bl.dto.ContentDto;
import jp.agentec.abook.abv.bl.logic.AbstractLogic;
import jp.agentec.abook.abv.cl.billing.IabException;
import jp.agentec.abook.abv.cl.billing.IabHelper;
import jp.agentec.abook.abv.cl.billing.IabResult;
import jp.agentec.abook.abv.cl.billing.Inventory;
import jp.agentec.abook.abv.cl.billing.Purchase;
import jp.agentec.abook.abv.cl.billing.SkuDetails;
import jp.agentec.abook.abv.launcher.android.R;
import jp.agentec.adf.util.StringUtil;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.Intent;
import android.util.Log;
import android.view.View;
import android.widget.Toast;
public class BillingHelper {
private static final String TAG = "BillingHelper";
private static BillingHelper instance;
// (arbitrary) request code for the purchase flow
public static final int RC_REQUEST = 10001;
private static final int SKU_REQUEST_MAX = 20; // sku検索リストが20に制限されている
private Activity act;
private IabHelper mHelper;
private List<ContentDto> contentList;
private List<ContentDto> queryingContentList;
private boolean isQuerying = false;
private String mPayload;
private String allSubscriptionProductId;
private BillingHelper() {
}
/**
* {@link BillingHelper} クラスのインスタンスを取得します。
* @return {@link BillingHelper} クラスのインスタンスを返します。
* @since 1.0.0
*/
public synchronized static BillingHelper getInstance() {
if (instance == null) {
instance = new BillingHelper();
}
return instance;
}
public boolean requireInit() {
return mHelper == null;
}
public void init(Activity act) {
destroy();
isQuerying = false;
this.act = act;
mPayload = (ABVDataCache.getInstance().getMemberInfo()!=null)? ABVDataCache.getInstance().getMemberInfo().loginId: "mynameisagentec";
// 分からなくするために結合などするように言われているが、どうせ逆コンパイルされたら文字結合したところでわかってしまう。神経質な顧客から何か言われた時のため、文字列結合で直接は使っていないと弁解できるように結合で対応。
String base64EncodedPublicKey = act.getString(R.string.google_public_key1) + act.getString(R.string.google_public_key2) + act.getString(R.string.google_public_key3);
// Create the helper, passing it our context and the public key to verify signatures with
Logger.d(TAG, "Creating IAB helper. ");
mHelper = new IabHelper(act, base64EncodedPublicKey);
// enable debug logging (for a production application, you should set this to false).
mHelper.enableDebugLogging(true);
// Start setup. This is asynchronous and the specified listener
// will be called once setup completes.
Logger.d(TAG, "Starting setup.");
mHelper.startSetup(new IabHelper.OnIabSetupFinishedListener() {
@Override
public void onIabSetupFinished(IabResult result) {
Log.d(TAG, "Setup finished.");
if (!result.isSuccess()) {
// Oh noes, there was a problem.
complain(R.string.billing_error_settingup, false, result.toString());
return;
}
// Have we been disposed of in the meantime? If so, quit.
if (mHelper == null) {
return;
}
Log.d(TAG, "Setup successful.");
}
});
}
public synchronized void queryInventory(List<ContentDto> contentList) {
if (isQuerying) {
Logger.w(TAG, "Already querying now.");
return;
}
isQuerying = true;
this.contentList = contentList;
ArrayList<String> skuList = new ArrayList<>();
allSubscriptionProductId = ABVEnvironment.getInstance().allSubscriptionProductId;
if (!StringUtil.isNullOrEmpty(allSubscriptionProductId)) {
skuList.add(allSubscriptionProductId);
}
queryInventory(skuList);
}
private void queryInventory(ArrayList<String> skuList) {
queryingContentList = new ArrayList<>();
for (int i = contentList.size() - 1; i >= 0; i--) {
if (skuList.size() >= SKU_REQUEST_MAX) {
break;
}
ContentDto contentDto = contentList.get(i);
if (!StringUtil.isNullOrEmpty(contentDto.productId)) {
skuList.add(contentDto.productId);
Logger.d(TAG, "contentDto.productId (%d): %s", i, contentDto.productId);
}
queryingContentList.add(contentDto);
contentList.remove(i);
}
// let's get an inventory of stuff we own.
if (!skuList.isEmpty()) {
Logger.d(TAG, "Querying inventory. skuCount=%d", skuList.size());
try {
mHelper.queryInventoryAsync(true, skuList, mGotInventoryListener);
} catch (IllegalStateException e) {
isQuerying = false;
Logger.e(TAG, "queryInventoryAsync failed.", e);
complain(R.string.billing_error_settingup, true, e.getMessage());
}
}
}
// Listener that's called when we finish querying the items and subscriptions we own
IabHelper.QueryInventoryFinishedListener mGotInventoryListener = new IabHelper.QueryInventoryFinishedListener() {
@Override
public void onQueryInventoryFinished(IabResult result, Inventory inventory) {
Logger.d(TAG, "Query inventory finished.");
// Have we been disposed of in the meantime? If so, quit.
if (mHelper == null) {
Logger.w(TAG, "mHelper is null.");
isQuerying = false;
return;
}
// Is it a failure?
if (result.isFailure()) {
isQuerying = false;
complain(R.string.billing_error_query_failed, true, result.toString());
return;
}
Logger.d(TAG, "Query inventory was successful.");
/*
* Check for items we own. Notice that for each purchase, we check
* the developer payload to see if it's correct! See
* verifyDeveloperPayload().
*/
for (ContentDto contentDto : queryingContentList) {
if (!StringUtil.isNullOrEmpty(contentDto.productId)) {
Purchase purchase = inventory.getPurchase(contentDto.productId);
Logger.d(TAG, "purchase=%s, productId=%s", purchase, contentDto.productId); // TODO: purchase.getItemType()をチェックすべき?
// if (purchase != null) { // テスト用全消費: TODO: 本番では必ずコメントアウト
// mHelper.consumeAsync(purchase, null);
// continue;
// }
if (purchase != null && contentDto.purchaseState != purchase.getPurchaseState()) { // 購入状態が異なる場合
contentDto.purchaseState = purchase.getPurchaseState();
contentDto.purchaseToken = purchase.getToken();
AbstractDao.getDao(ContentDao.class).updatePurchaseState(contentDto.contentId, contentDto.purchaseState, contentDto.purchaseToken);
}
SkuDetails skuDetails = inventory.getSkuDetails(contentDto.productId);
Logger.d(TAG, "skuDetails=%s", skuDetails);
if (skuDetails != null) {
String price = skuDetails.getPrice();
if (price != null && !price.equals(contentDto.price)) {
contentDto.price = price;
AbstractDao.getDao(ContentDao.class).updateContentPrice(contentDto.contentId, price);
}
}
}
}
if (!StringUtil.isNullOrEmpty(allSubscriptionProductId)) { // 定期購読のsku情報チェック
Purchase purchase = inventory.getPurchase(allSubscriptionProductId);
Logger.d(TAG, "purchase=%s, productId=%s", purchase, allSubscriptionProductId);
SkuDetails skuDetails = inventory.getSkuDetails(allSubscriptionProductId);
if (skuDetails == null) {
Logger.e(TAG, "allSubscription sku not found. productId=" + allSubscriptionProductId);
ABVEnvironment.getInstance().allSubscriptionProductId = null;
}
allSubscriptionProductId = null;
}
if (contentList.size() == 0) { // 残りがない場合(全終了)
isQuerying = false;
Logger.d(TAG, "Query inventory all finished.");
}
else {
queryInventory(new ArrayList<String>()); // 残りのコンテンツIDリストにつき再度実行
}
Logger.d(TAG, "Initial inventory query finished;");
}
};
public Purchase queryPurchae(String productId) throws IabException{
Inventory inv = mHelper.queryInventory(false, Arrays.asList(productId), null);
return inv.getPurchase(productId);
}
public Inventory queryInventory(boolean querySkuDetails, List<String> moreItemSkus, List<String> moreSubsSkus) throws IabException{
return mHelper.queryInventory(querySkuDetails, moreItemSkus, moreSubsSkus);
}
// User clicked the "Buy Gas" button
public void buy(View arg0, String sku) {
Logger.d(TAG, "Buy gas button clicked.");
/* for security, generate your payload here for verification. See the comments on
* verifyDeveloperPayload() for more info. Since this is a SAMPLE, we just use
* an empty string, but on a production app you should carefully generate this. */
mHelper.launchPurchaseFlow(act, sku, RC_REQUEST, mPurchaseFinishedListener, mPayload);
}
// "Subscribe to infinite gas" button clicked. Explain to user, then start purchase
// flow for subscription.
public void subscribe(View arg0, String sku) {
if (!mHelper.subscriptionsSupported()) {
complain(R.string.billing_error_not_supported, true, "");
return;
}
/* for security, generate your payload here for verification. See the comments on
* verifyDeveloperPayload() for more info. Since this is a SAMPLE, we just use
* an empty string, but on a production app you should carefully generate this. */
Logger.d(TAG, "Launching purchase flow for infinite gas subscription.");
mHelper.launchPurchaseFlow(act, sku, IabHelper.ITEM_TYPE_SUBS, RC_REQUEST, mPurchaseFinishedListener, mPayload);
}
/** Verifies the developer payload of a purchase. */
boolean verifyDeveloperPayload(Purchase p) {
String payload = p.getDeveloperPayload();
Logger.i(TAG, "getDeveloperPayload %s", payload);
/*
* verify that the developer payload of the purchase is correct. It will be
* the same one that you sent when initiating the purchase.
*
* WARNING: Locally generating a random string when starting a purchase and
* verifying it here might seem like a good approach, but this will fail in the
* case where the user purchases an item on one device and then uses your app on
* a different device, because on the other device you will not have access to the
* random string you originally generated.
*
* So a good developer payload has these characteristics:
*
* 1. If two different users purchase an item, the payload is different between them,
* so that one user's purchase can't be replayed to another user.
*
* 2. The payload must be such that you can verify it even when the app wasn't the
* one who initiated the purchase flow (so that items purchased by the user on
* one device work on other devices owned by the user).
*
* Using your own server to store and verify developer payloads across app
* installations is recommended.
*/
return payload.equals(mPayload);
}
// Callback for when a purchase is finished
IabHelper.OnIabPurchaseFinishedListener mPurchaseFinishedListener = new IabHelper.OnIabPurchaseFinishedListener() {
@Override
public void onIabPurchaseFinished(IabResult result, Purchase purchase) {
Logger.d(TAG, "Purchase finished: " + result + ", purchase: " + purchase);
// if we were disposed of in the meantime, quit.
if (mHelper == null) {
return;
}
if (result.isFailure()) {
if (result.getResponse() == IabHelper.BILLING_RESPONSE_RESULT_ITEM_ALREADY_OWNED) { // すでに購入済みの場合
complain(R.string.billing_error_already_purchased, true, result.toString());
}
else if (result.getResponse() == IabHelper.IABHELPER_USER_CANCELLED) { // キャンセルの場合は何も表示せずに返す
}
else {
complain(R.string.billing_error_purchase_failed, false, result.toString());
}
return;
}
if (purchase == null || !verifyDeveloperPayload(purchase)) {
complain(R.string.billing_error_verify_payload_failed, true, mPayload);
return;
}
Logger.d(TAG, "Purchase successful.");
Logger.d(TAG, "original json: %s", purchase.getOriginalJson());
// update database
if (purchase.getItemType().equals(IabHelper.ITEM_TYPE_INAPP)) { // 単品購入の場合
AbstractDao.getDao(ContentDao.class).updatePurchaseStateBySku(purchase.getSku(), purchase.getPurchaseState(), purchase.getToken());
}
// 画面リフレッシュ
refreshContentList(purchase);
}
public void refreshContentList(Purchase purchase) {
Logger.d(TAG, "refreshContentList: %s", act);
}
};
public void destroy() {
Logger.d(TAG, "Destroying helper.");
if (mHelper != null) {
mHelper.dispose();
mHelper = null;
}
}
void complain(int resId, boolean isAlert, String addLog) {
String message = act.getString(resId);
Logger.e(TAG, "Error: " + message + " " + addLog);
if (isAlert) {
alert(message);
}
else {
Toast.makeText(act, message, Toast.LENGTH_SHORT).show();
}
}
void alert(String message) {
AlertDialog.Builder bld = new AlertDialog.Builder(act);
bld.setMessage(message);
bld.setNeutralButton("OK", null);
Logger.d(TAG, "Showing alert dialog: %s", message);
bld.create().show();
}
public boolean handleActivityResult(int requestCode, int resultCode, Intent data) {
return mHelper.handleActivityResult(requestCode, resultCode, data);
}
}
package jp.agentec.abook.abv.ui.common.util;
import android.content.Context;
import android.content.res.Resources;
import android.util.TypedValue;
import jp.agentec.abook.abv.bl.common.log.Logger;
public class PatternStringUtil {
// メッセージをパターン化してResourceのIndexを返す
public static int patternToInt(Context context, int key, int pattern) {
String entryName = context.getResources().getResourceEntryName(key);
try {
Logger.d("tetetet " + context.getResources().getString(context.getResources().getIdentifier(String.format(entryName + "_%d", pattern), "string", context.getPackageName())));
if (pattern > 0) {
return context.getResources().getIdentifier(String.format(entryName + "_%d", pattern), "string", context.getPackageName());
} else {
return context.getResources().getIdentifier(entryName, "string", context.getPackageName());
}
} catch (Exception e) {
return context.getResources().getIdentifier(entryName, "string", context.getPackageName());
}
}
// メッセージをパターン化してResourceのValueを返す
public static String patternToString(Context context, int key, int pattern) {
String entrayName = "";
try {
entrayName = context.getResources().getResourceEntryName(key);
if (pattern > 0) {
return context.getResources().getString(context.getResources().getIdentifier(String.format(entrayName + "_%d", pattern), "string", context.getPackageName()));
} else {
return context.getResources().getString(context.getResources().getIdentifier(entrayName, "string", context.getPackageName()));
}
} catch (Exception e) {
Logger.e("getboolean", "notfound : " + e.getMessage());
return context.getResources().getString(context.getResources().getIdentifier(entrayName, "string", context.getPackageName()));
}
}
}
...@@ -54,9 +54,14 @@ import jp.agentec.abook.abv.ui.common.dialog.ABookAlertDialog; ...@@ -54,9 +54,14 @@ import jp.agentec.abook.abv.ui.common.dialog.ABookAlertDialog;
import jp.agentec.abook.abv.ui.common.helper.ProgressDialogHelper; import jp.agentec.abook.abv.ui.common.helper.ProgressDialogHelper;
import jp.agentec.abook.abv.ui.common.util.ABVToastUtil; import jp.agentec.abook.abv.ui.common.util.ABVToastUtil;
import jp.agentec.abook.abv.ui.common.util.AlertDialogUtil; import jp.agentec.abook.abv.ui.common.util.AlertDialogUtil;
import jp.agentec.abook.abv.ui.common.util.PatternStringUtil;
import jp.agentec.abook.abv.ui.home.helper.ABookPermissionHelper; import jp.agentec.abook.abv.ui.home.helper.ABookPermissionHelper;
import jp.agentec.adf.util.DateTimeFormat; import jp.agentec.adf.util.DateTimeFormat;
import jp.agentec.adf.util.DateTimeUtil; import jp.agentec.adf.util.DateTimeUtil;
import static jp.agentec.abook.abv.cl.util.PreferenceUtil.getUserPref;
import static jp.agentec.abook.abv.cl.util.PreferenceUtil.putUserPref;
public class ABookSettingFragment extends PreferenceFragment { public class ABookSettingFragment extends PreferenceFragment {
private static final String TAG = "ABookSettingActivity"; private static final String TAG = "ABookSettingActivity";
...@@ -266,7 +271,10 @@ public class ABookSettingFragment extends PreferenceFragment { ...@@ -266,7 +271,10 @@ public class ABookSettingFragment extends PreferenceFragment {
} }
Preference abookCheckManual = findPreference(ABOOK_CHECK_MANUAL); Preference abookCheckManual = findPreference(ABOOK_CHECK_MANUAL);
abookCheckManual.setTitle(getResources().getString(R.string.operation_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() { abookCheckManual.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
@Override @Override
public boolean onPreferenceClick(Preference preference) { public boolean onPreferenceClick(Preference preference) {
......
...@@ -95,6 +95,7 @@ import jp.agentec.abook.abv.ui.common.dialog.ABookAlertDialog; ...@@ -95,6 +95,7 @@ import jp.agentec.abook.abv.ui.common.dialog.ABookAlertDialog;
import jp.agentec.abook.abv.ui.common.helper.ABVViewUnbindHelper; import jp.agentec.abook.abv.ui.common.helper.ABVViewUnbindHelper;
import jp.agentec.abook.abv.ui.common.util.ABVToastUtil; import jp.agentec.abook.abv.ui.common.util.ABVToastUtil;
import jp.agentec.abook.abv.ui.common.util.AlertDialogUtil; import jp.agentec.abook.abv.ui.common.util.AlertDialogUtil;
import jp.agentec.abook.abv.ui.common.util.PatternStringUtil;
import jp.agentec.abook.abv.ui.common.view.ABVPopupListWindow; import jp.agentec.abook.abv.ui.common.view.ABVPopupListWindow;
import jp.agentec.abook.abv.ui.common.vo.Size; import jp.agentec.abook.abv.ui.common.vo.Size;
import jp.agentec.abook.abv.ui.home.helper.ActivityHandlingHelper; import jp.agentec.abook.abv.ui.home.helper.ActivityHandlingHelper;
...@@ -784,7 +785,10 @@ public class GuideViewActivity extends ABVContentViewActivity { ...@@ -784,7 +785,10 @@ public class GuideViewActivity extends ABVContentViewActivity {
} }
}); });
TextView titleTextView = (TextView)mToolBar.findViewById(id.tv_guide_title); TextView titleTextView = (TextView)mToolBar.findViewById(id.tv_guide_title);
titleTextView.setText(getString(R.string.operation_manual)); // リソースパターンの適用
titleTextView.setText(PatternStringUtil.patternToString(getApplicationContext(),
R.string.operation_manual,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
//RelativeLayout.LayoutParams param1 = createParam(ViewGroup.LayoutParams.MATCH_PARENT, (int)(48 * tmpDensity + 0.5f)); //RelativeLayout.LayoutParams param1 = createParam(ViewGroup.LayoutParams.MATCH_PARENT, (int)(48 * tmpDensity + 0.5f));
RelativeLayout.LayoutParams param1 = createParam(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT); RelativeLayout.LayoutParams param1 = createParam(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
......
...@@ -15,8 +15,12 @@ import jp.agentec.abook.abv.bl.common.log.Logger; ...@@ -15,8 +15,12 @@ import jp.agentec.abook.abv.bl.common.log.Logger;
import jp.agentec.abook.abv.bl.dto.HelpDisplayInfoDto; import jp.agentec.abook.abv.bl.dto.HelpDisplayInfoDto;
import jp.agentec.abook.abv.launcher.android.R; import jp.agentec.abook.abv.launcher.android.R;
import jp.agentec.abook.abv.ui.common.activity.ABVUIActivity; import jp.agentec.abook.abv.ui.common.activity.ABVUIActivity;
import jp.agentec.abook.abv.ui.common.appinfo.AppDefType;
import jp.agentec.abook.abv.ui.common.util.PatternStringUtil;
import jp.agentec.abook.abv.ui.home.adapter.HelpAdapter; import jp.agentec.abook.abv.ui.home.adapter.HelpAdapter;
import static jp.agentec.abook.abv.cl.util.PreferenceUtil.getUserPref;
/** /**
* Created by kim jinsung on 2018/09/19. * Created by kim jinsung on 2018/09/19.
*/ */
...@@ -59,131 +63,307 @@ public class HelpActivity extends ABVUIActivity { ...@@ -59,131 +63,307 @@ public class HelpActivity extends ABVUIActivity {
mMainDescription = null; mMainDescription = null;
switch (helpViewTye) { switch (helpViewTye) {
case Constant.HelpViewType.OperationListDirector: case Constant.HelpViewType.OperationListDirector:
mMainDescription = getString(R.string.msg_help_operation_list_main); // リソースパターンの適用
mHelpDisplayInfoList.add(settingHelpDisplayInfo(getString(R.string.msg_help_communication_menu), R.drawable.ic_help_commuication_menu)); mMainDescription = PatternStringUtil.patternToString(getApplicationContext(),
mHelpDisplayInfoList.add(settingHelpDisplayInfo(getString(R.string.msg_help_operation_list_search), R.drawable.ic_help_direction_list_search)); R.string.msg_help_operation_list_main,
mHelpDisplayInfoList.add(settingHelpDisplayInfo(getString(R.string.msg_help_operation_list_setting), R.drawable.ic_help_direction_list_config)); getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0));
mHelpDisplayInfoList.add(settingHelpDisplayInfo(getString(R.string.msg_help_common_content_menu), R.drawable.ic_help_common_content_menu)); mHelpDisplayInfoList.add(settingHelpDisplayInfo(PatternStringUtil.patternToString(getApplicationContext(),
mHelpDisplayInfoList.add(settingHelpDisplayInfo(getString(R.string.msg_help_operation_list_pano), R.drawable.ic_help_direction_list_scene)); R.string.msg_help_communication_menu,
mHelpDisplayInfoList.add(settingHelpDisplayInfo(getString(R.string.msg_help_operation_list_sync), R.drawable.ic_help_direction_list_sync)); getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), R.drawable.ic_help_commuication_menu));
mHelpDisplayInfoList.add(settingHelpDisplayInfo(getString(R.string.msg_help_operation_list_direction), R.drawable.ic_help_direction_list_direct)); mHelpDisplayInfoList.add(settingHelpDisplayInfo(PatternStringUtil.patternToString(getApplicationContext(),
mHelpDisplayInfoList.add(settingHelpDisplayInfo(getString(R.string.msg_help_operation_list_detail), R.drawable.ic_help_direction_list_detail)); R.string.msg_help_operation_list_search,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), R.drawable.ic_help_direction_list_search));
mHelpDisplayInfoList.add(settingHelpDisplayInfo(PatternStringUtil.patternToString(getApplicationContext(),
R.string.msg_help_operation_list_setting,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), R.drawable.ic_help_direction_list_config));
mHelpDisplayInfoList.add(settingHelpDisplayInfo(PatternStringUtil.patternToString(getApplicationContext(),
R.string.msg_help_common_content_menu,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), R.drawable.ic_help_common_content_menu));
mHelpDisplayInfoList.add(settingHelpDisplayInfo(PatternStringUtil.patternToString(getApplicationContext(),
R.string.msg_help_common_content_menu,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), R.drawable.ic_help_direction_list_scene));
mHelpDisplayInfoList.add(settingHelpDisplayInfo(PatternStringUtil.patternToString(getApplicationContext(),
R.string.msg_help_operation_list_sync,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), R.drawable.ic_help_direction_list_sync));
mHelpDisplayInfoList.add(settingHelpDisplayInfo(PatternStringUtil.patternToString(getApplicationContext(),
R.string.msg_help_operation_list_direction,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), R.drawable.ic_help_direction_list_direct));
mHelpDisplayInfoList.add(settingHelpDisplayInfo(PatternStringUtil.patternToString(getApplicationContext(),
R.string.msg_help_operation_list_detail,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), R.drawable.ic_help_direction_list_detail));
break; break;
case Constant.HelpViewType.OperationListReporter: case Constant.HelpViewType.OperationListReporter:
mMainDescription = getString(R.string.msg_help_operation_list_main); // リソースパターンの適用
mHelpDisplayInfoList.add(settingHelpDisplayInfo(getString(R.string.msg_help_communication_menu), R.drawable.ic_help_commuication_menu)); mMainDescription = PatternStringUtil.patternToString(getApplicationContext(),
mHelpDisplayInfoList.add(settingHelpDisplayInfo(getString(R.string.msg_help_operation_list_search), R.drawable.ic_help_direction_list_search)); R.string.msg_help_operation_list_main,
mHelpDisplayInfoList.add(settingHelpDisplayInfo(getString(R.string.msg_help_operation_list_setting), R.drawable.ic_help_direction_list_config)); getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0));
mHelpDisplayInfoList.add(settingHelpDisplayInfo(getString(R.string.msg_help_common_content_menu), R.drawable.ic_help_common_content_menu)); mHelpDisplayInfoList.add(settingHelpDisplayInfo(PatternStringUtil.patternToString(getApplicationContext(),
mHelpDisplayInfoList.add(settingHelpDisplayInfo(getString(R.string.msg_help_operation_list_sync), R.drawable.ic_help_direction_list_sync)); R.string.msg_help_communication_menu,
mHelpDisplayInfoList.add(settingHelpDisplayInfo(getString(R.string.msg_help_operation_list_report), R.drawable.ic_help_direction_list_direct)); getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), R.drawable.ic_help_commuication_menu));
mHelpDisplayInfoList.add(settingHelpDisplayInfo(getString(R.string.msg_help_operation_list_detail), R.drawable.ic_help_direction_list_detail)); mHelpDisplayInfoList.add(settingHelpDisplayInfo(PatternStringUtil.patternToString(getApplicationContext(),
R.string.msg_help_operation_list_search,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), R.drawable.ic_help_direction_list_search));
mHelpDisplayInfoList.add(settingHelpDisplayInfo(PatternStringUtil.patternToString(getApplicationContext(),
R.string.msg_help_operation_list_setting,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), R.drawable.ic_help_direction_list_config));
mHelpDisplayInfoList.add(settingHelpDisplayInfo(PatternStringUtil.patternToString(getApplicationContext(),
R.string.msg_help_common_content_menu,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), R.drawable.ic_help_common_content_menu));
mHelpDisplayInfoList.add(settingHelpDisplayInfo(PatternStringUtil.patternToString(getApplicationContext(),
R.string.msg_help_operation_list_sync,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), R.drawable.ic_help_direction_list_sync));
mHelpDisplayInfoList.add(settingHelpDisplayInfo(PatternStringUtil.patternToString(getApplicationContext(),
R.string.msg_help_operation_list_report,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), R.drawable.ic_help_direction_list_direct));
mHelpDisplayInfoList.add(settingHelpDisplayInfo(PatternStringUtil.patternToString(getApplicationContext(),
R.string.msg_help_operation_list_detail,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), R.drawable.ic_help_direction_list_detail));
break; break;
case Constant.HelpViewType.CommonContent: case Constant.HelpViewType.CommonContent:
mMainDescription = getString(R.string.msg_help_common_content); // リソースパターンの適用
mHelpDisplayInfoList.add(settingHelpDisplayInfo(getString(R.string.msg_help_operation_home), R.drawable.ic_help_detail_home)); mMainDescription = PatternStringUtil.patternToString(getApplicationContext(),
R.string.msg_help_common_content,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0));
mHelpDisplayInfoList.add(settingHelpDisplayInfo(PatternStringUtil.patternToString(getApplicationContext(),
R.string.msg_help_operation_home,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), R.drawable.ic_help_detail_home));
break; break;
case Constant.HelpViewType.OperationDetail: case Constant.HelpViewType.OperationDetail:
mMainDescription = getString(R.string.msg_help_operation_detail_main); // リソースパターンの適用
mMainDescription = PatternStringUtil.patternToString(getApplicationContext(),
R.string.msg_help_operation_detail_main,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0));
mHelpDisplayInfoList.add(settingHelpDisplayInfo(getString(R.string.msg_help_operation_home), R.drawable.ic_help_detail_home)); mHelpDisplayInfoList.add(settingHelpDisplayInfo(getString(R.string.msg_help_operation_home), R.drawable.ic_help_detail_home));
break; break;
case Constant.HelpViewType.PanoContentEdit: case Constant.HelpViewType.PanoContentEdit:
mHelpDisplayInfoList.add(settingHelpDisplayInfo(getString(R.string.msg_help_operation_home), R.drawable.ic_help_detail_home)); // リソースパターンの適用
mHelpDisplayInfoList.add(settingHelpDisplayInfo(getString(R.string.msg_help_pano_edit_add), R.drawable.ic_help_edit_360type_local_add)); mHelpDisplayInfoList.add(settingHelpDisplayInfo(PatternStringUtil.patternToString(getApplicationContext(),
mHelpDisplayInfoList.add(settingHelpDisplayInfo(getString(R.string.msg_help_pano_edit_server_add), R.drawable.ic_help_edit_360type_server_add)); R.string.msg_help_operation_home,
mHelpDisplayInfoList.add(settingHelpDisplayInfo(getString(R.string.msg_help_pano_edit_server_save), R.drawable.ic_help_edit_360type_save)); getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), R.drawable.ic_help_detail_home));
mHelpDisplayInfoList.add(settingHelpDisplayInfo(PatternStringUtil.patternToString(getApplicationContext(),
R.string.msg_help_pano_edit_add,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), R.drawable.ic_help_edit_360type_local_add));
mHelpDisplayInfoList.add(settingHelpDisplayInfo(PatternStringUtil.patternToString(getApplicationContext(),
R.string.msg_help_pano_edit_server_add,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), R.drawable.ic_help_edit_360type_server_add));
mHelpDisplayInfoList.add(settingHelpDisplayInfo(PatternStringUtil.patternToString(getApplicationContext(),
R.string.msg_help_pano_edit_server_save,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), R.drawable.ic_help_edit_360type_save));
break; break;
case Constant.HelpViewType.ListOperationDirector: case Constant.HelpViewType.ListOperationDirector:
mMainDescription = getString(R.string.msg_help_list_main); // リソースパターンの適用
mHelpDisplayInfoList.add(settingHelpDisplayInfo(getString(R.string.msg_help_operation_home), R.drawable.ic_help_detail_home)); mMainDescription = PatternStringUtil.patternToString(getApplicationContext(),
mHelpDisplayInfoList.add(settingHelpDisplayInfo(getString(R.string.msg_help_director_report_search), R.drawable.ic_help_direct_list_search)); R.string.msg_help_list_main,
mHelpDisplayInfoList.add(settingHelpDisplayInfo(getString(R.string.msg_help_director_add), R.drawable.ic_help_direct_list_add)); getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0));
mHelpDisplayInfoList.add(settingHelpDisplayInfo(getString(R.string.msg_help_director_edit), R.drawable.ic_help_direction_list_direct)); mHelpDisplayInfoList.add(settingHelpDisplayInfo(PatternStringUtil.patternToString(getApplicationContext(),
R.string.msg_help_operation_home,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), R.drawable.ic_help_detail_home));
mHelpDisplayInfoList.add(settingHelpDisplayInfo(PatternStringUtil.patternToString(getApplicationContext(),
R.string.msg_help_director_report_search,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), R.drawable.ic_help_direct_list_search));
mHelpDisplayInfoList.add(settingHelpDisplayInfo(PatternStringUtil.patternToString(getApplicationContext(),
R.string.msg_help_director_add,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), R.drawable.ic_help_direct_list_add));
mHelpDisplayInfoList.add(settingHelpDisplayInfo(PatternStringUtil.patternToString(getApplicationContext(),
R.string.msg_help_director_edit,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), R.drawable.ic_help_direction_list_direct));
break; break;
case Constant.HelpViewType.ListOperationReporter: case Constant.HelpViewType.ListOperationReporter:
mMainDescription = getString(R.string.msg_help_list_main); // リソースパターンの適用
mHelpDisplayInfoList.add(settingHelpDisplayInfo(getString(R.string.msg_help_operation_home), R.drawable.ic_help_detail_home)); mMainDescription = PatternStringUtil.patternToString(getApplicationContext(),
mHelpDisplayInfoList.add(settingHelpDisplayInfo(getString(R.string.msg_help_director_report_search), R.drawable.ic_help_direct_list_search)); R.string.msg_help_list_main,
mHelpDisplayInfoList.add(settingHelpDisplayInfo(getString(R.string.msg_help_report_task_show_director), R.drawable.ic_help_direction_list_detail)); getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0));
mHelpDisplayInfoList.add(settingHelpDisplayInfo(getString(R.string.msg_help_report_task_show_report), R.drawable.ic_help_direction_list_direct)); mHelpDisplayInfoList.add(settingHelpDisplayInfo(PatternStringUtil.patternToString(getApplicationContext(),
R.string.msg_help_operation_home,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), R.drawable.ic_help_detail_home));
mHelpDisplayInfoList.add(settingHelpDisplayInfo(PatternStringUtil.patternToString(getApplicationContext(),
R.string.msg_help_director_report_search,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), R.drawable.ic_help_direct_list_search));
mHelpDisplayInfoList.add(settingHelpDisplayInfo(PatternStringUtil.patternToString(getApplicationContext(),
R.string.msg_help_report_task_show_director,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), R.drawable.ic_help_direction_list_detail));
mHelpDisplayInfoList.add(settingHelpDisplayInfo(PatternStringUtil.patternToString(getApplicationContext(),
R.string.msg_help_report_task_show_report,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), R.drawable.ic_help_direction_list_direct));
break; break;
case Constant.HelpViewType.DrawingOperationDirector: case Constant.HelpViewType.DrawingOperationDirector:
case Constant.HelpViewType.DrawingOperationReporter: case Constant.HelpViewType.DrawingOperationReporter:
if (helpViewTye == Constant.HelpViewType.DrawingOperationDirector) { if (helpViewTye == Constant.HelpViewType.DrawingOperationDirector) {
mMainDescription = getString(R.string.msg_help_drawing_director_main); // リソースパターンの適用
mMainDescription = PatternStringUtil.patternToString(getApplicationContext(),
R.string.msg_help_drawing_director_main,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0));
} else { } else {
mMainDescription = getString(R.string.msg_help_drawing_report_main); mMainDescription = PatternStringUtil.patternToString(getApplicationContext(),
R.string.msg_help_drawing_report_main,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0));
} }
mHelpDisplayInfoList.add(settingHelpDisplayInfo(getString(R.string.msg_help_operation_home), R.drawable.ic_help_detail_home)); mHelpDisplayInfoList.add(settingHelpDisplayInfo(PatternStringUtil.patternToString(getApplicationContext(),
mHelpDisplayInfoList.add(settingHelpDisplayInfo(getString(R.string.msg_help_task_director_list), R.drawable.ic_help_pano_direct_list)); R.string.msg_help_operation_home,
mHelpDisplayInfoList.add(settingHelpDisplayInfo(getString(R.string.msg_help_task_code_hide), R.drawable.ic_help_task_code_hide)); getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), R.drawable.ic_help_detail_home));
mHelpDisplayInfoList.add(settingHelpDisplayInfo(getString(R.string.msg_help_drawing_zoom), R.drawable.ic_help_pano_direct_control)); mHelpDisplayInfoList.add(settingHelpDisplayInfo(PatternStringUtil.patternToString(getApplicationContext(),
R.string.msg_help_operation_home,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), R.drawable.ic_help_detail_home));
mHelpDisplayInfoList.add(settingHelpDisplayInfo(PatternStringUtil.patternToString(getApplicationContext(),
R.string.msg_help_task_director_list,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), R.drawable.ic_help_pano_direct_list));
mHelpDisplayInfoList.add(settingHelpDisplayInfo(PatternStringUtil.patternToString(getApplicationContext(),
R.string.msg_help_task_code_hide,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), R.drawable.ic_help_task_code_hide));
mHelpDisplayInfoList.add(settingHelpDisplayInfo(PatternStringUtil.patternToString(getApplicationContext(),
R.string.msg_help_drawing_zoom,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), R.drawable.ic_help_pano_direct_control));
break; break;
case Constant.HelpViewType.PanoOperationDirector: case Constant.HelpViewType.PanoOperationDirector:
case Constant.HelpViewType.PanoOperationReporter: case Constant.HelpViewType.PanoOperationReporter:
if (helpViewTye == Constant.HelpViewType.PanoOperationDirector) { if (helpViewTye == Constant.HelpViewType.PanoOperationDirector) {
mMainDescription = getString(R.string.msg_help_pano_director_main); // リソースパターンの適用
mMainDescription = PatternStringUtil.patternToString(getApplicationContext(),
R.string.msg_help_pano_director_main,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0));
} else { } else {
mMainDescription = getString(R.string.msg_help_pano_report_main); mMainDescription = PatternStringUtil.patternToString(getApplicationContext(),
R.string.msg_help_pano_report_main,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0));
} }
mHelpDisplayInfoList.add(settingHelpDisplayInfo(getString(R.string.msg_help_operation_home), R.drawable.ic_help_detail_home)); // リソースパターンの適用
mHelpDisplayInfoList.add(settingHelpDisplayInfo(getString(R.string.msg_help_task_director_list), R.drawable.ic_help_pano_direct_list)); mHelpDisplayInfoList.add(settingHelpDisplayInfo(PatternStringUtil.patternToString(getApplicationContext(),
mHelpDisplayInfoList.add(settingHelpDisplayInfo(getString(R.string.msg_help_task_code_hide), R.drawable.ic_help_task_code_hide)); R.string.msg_help_operation_home,
mHelpDisplayInfoList.add(settingHelpDisplayInfo(getString(R.string.msg_help_task_pano_zoom), R.drawable.ic_help_pano_direct_control)); getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), R.drawable.ic_help_detail_home));
mHelpDisplayInfoList.add(settingHelpDisplayInfo(PatternStringUtil.patternToString(getApplicationContext(),
R.string.msg_help_task_director_list,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), R.drawable.ic_help_pano_direct_list));
mHelpDisplayInfoList.add(settingHelpDisplayInfo(PatternStringUtil.patternToString(getApplicationContext(),
R.string.msg_help_task_code_hide,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), R.drawable.ic_help_task_code_hide));
mHelpDisplayInfoList.add(settingHelpDisplayInfo(PatternStringUtil.patternToString(getApplicationContext(),
R.string.msg_help_task_pano_zoom,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), R.drawable.ic_help_pano_direct_control));
break; break;
case Constant.HelpViewType.DirectorTask: case Constant.HelpViewType.DirectorTask:
case Constant.HelpViewType.ReportTask: case Constant.HelpViewType.ReportTask:
mMainDescription = getString(R.string.msg_help_director_task_main); // リソースパターンの適用
mMainDescription = PatternStringUtil.patternToString(getApplicationContext(),
R.string.msg_help_director_task_main,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0));
if (helpViewTye == Constant.HelpViewType.ReportTask) { if (helpViewTye == Constant.HelpViewType.ReportTask) {
mHelpDisplayInfoList.add(settingHelpDisplayInfo(getString(R.string.msg_help_report_task_comfirm), R.drawable.ic_help_direction_confirm)); mHelpDisplayInfoList.add(settingHelpDisplayInfo(PatternStringUtil.patternToString(getApplicationContext(),
R.string.msg_help_report_task_comfirm,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), R.drawable.ic_help_direction_confirm));
} }
mHelpDisplayInfoList.add(settingHelpDisplayInfo(getString(R.string.msg_help_task_related_content), R.drawable.ic_help_task_related_content)); mHelpDisplayInfoList.add(settingHelpDisplayInfo(PatternStringUtil.patternToString(getApplicationContext(),
mHelpDisplayInfoList.add(settingHelpDisplayInfo(getString(R.string.msg_help_task_form_explain), R.drawable.ic_help_task_form_explain)); R.string.msg_help_task_related_content,
mHelpDisplayInfoList.add(settingHelpDisplayInfo(getString(R.string.msg_help_task_save), R.drawable.ic_help_task_save)); getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), R.drawable.ic_help_task_related_content));
mHelpDisplayInfoList.add(settingHelpDisplayInfo(getString(R.string.msg_help_task_delete), R.drawable.ic_help_task_delete)); mHelpDisplayInfoList.add(settingHelpDisplayInfo(PatternStringUtil.patternToString(getApplicationContext(),
mHelpDisplayInfoList.add(settingHelpDisplayInfo(getString(R.string.msg_help_task_prev), R.drawable.ic_help_task_prev)); R.string.msg_help_task_form_explain,
mHelpDisplayInfoList.add(settingHelpDisplayInfo(getString(R.string.msg_help_task_next), R.drawable.ic_help_task_next)); getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), R.drawable.ic_help_task_form_explain));
mHelpDisplayInfoList.add(settingHelpDisplayInfo(getString(R.string.msg_help_task_first_back), R.drawable.ic_help_task_first_back)); mHelpDisplayInfoList.add(settingHelpDisplayInfo(PatternStringUtil.patternToString(getApplicationContext(),
mHelpDisplayInfoList.add(settingHelpDisplayInfo(getString(R.string.msg_help_task_end_go), R.drawable.ic_help_task_end_go)); R.string.msg_help_task_save,
mHelpDisplayInfoList.add(settingHelpDisplayInfo(getString(R.string.msg_help_task_close), R.drawable.ic_help_task_close)); getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), R.drawable.ic_help_task_save));
mHelpDisplayInfoList.add(settingHelpDisplayInfo(PatternStringUtil.patternToString(getApplicationContext(),
R.string.msg_help_task_delete,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), R.drawable.ic_help_task_delete));
mHelpDisplayInfoList.add(settingHelpDisplayInfo(PatternStringUtil.patternToString(getApplicationContext(),
R.string.msg_help_task_prev,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), R.drawable.ic_help_task_prev));
mHelpDisplayInfoList.add(settingHelpDisplayInfo(PatternStringUtil.patternToString(getApplicationContext(),
R.string.msg_help_task_next,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), R.drawable.ic_help_task_next));
mHelpDisplayInfoList.add(settingHelpDisplayInfo(PatternStringUtil.patternToString(getApplicationContext(),
R.string.msg_help_task_first_back,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), R.drawable.ic_help_task_first_back));
mHelpDisplayInfoList.add(settingHelpDisplayInfo(PatternStringUtil.patternToString(getApplicationContext(),
R.string.msg_help_task_end_go,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), R.drawable.ic_help_task_end_go));
mHelpDisplayInfoList.add(settingHelpDisplayInfo(PatternStringUtil.patternToString(getApplicationContext(),
R.string.msg_help_task_close,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), R.drawable.ic_help_task_close));
break; break;
case Constant.HelpViewType.DirectorTaskList: case Constant.HelpViewType.DirectorTaskList:
case Constant.HelpViewType.ReportTaskList: case Constant.HelpViewType.ReportTaskList:
mMainDescription = getString(R.string.msg_help_dicrector_task_list_main); // リソースパターンの適用
mHelpDisplayInfoList.add(settingHelpDisplayInfo(getString(R.string.msg_help_dicrector_task_list_search), R.drawable.ic_help_direct_list_search)); mMainDescription = PatternStringUtil.patternToString(getApplicationContext(),
mHelpDisplayInfoList.add(settingHelpDisplayInfo(getString(R.string.msg_help_dicrector_task_list_scene_move), R.drawable.ic_help_task_scene_move)); R.string.msg_help_dicrector_task_list_main,
mHelpDisplayInfoList.add(settingHelpDisplayInfo(getString(R.string.msg_help_dicrector_task_list_down), R.drawable.ic_help_task_up)); getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0));
mHelpDisplayInfoList.add(settingHelpDisplayInfo(getString(R.string.msg_help_dicrector_task_show_list_up), R.drawable.ic_hele_task_down)); mHelpDisplayInfoList.add(settingHelpDisplayInfo(PatternStringUtil.patternToString(getApplicationContext(),
mHelpDisplayInfoList.add(settingHelpDisplayInfo(getString(R.string.msg_help_dicrector_task_list_close), R.drawable.ic_help_task_close)); R.string.msg_help_dicrector_task_list_search,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), R.drawable.ic_help_direct_list_search));
mHelpDisplayInfoList.add(settingHelpDisplayInfo(PatternStringUtil.patternToString(getApplicationContext(),
R.string.msg_help_dicrector_task_list_scene_move,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), R.drawable.ic_help_task_scene_move));
mHelpDisplayInfoList.add(settingHelpDisplayInfo(PatternStringUtil.patternToString(getApplicationContext(),
R.string.msg_help_dicrector_task_list_down,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), R.drawable.ic_help_task_up));
mHelpDisplayInfoList.add(settingHelpDisplayInfo(PatternStringUtil.patternToString(getApplicationContext(),
R.string.msg_help_dicrector_task_show_list_up,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), R.drawable.ic_hele_task_down));
mHelpDisplayInfoList.add(settingHelpDisplayInfo(PatternStringUtil.patternToString(getApplicationContext(),
R.string.msg_help_dicrector_task_list_close,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), R.drawable.ic_help_task_close));
break; break;
case Constant.HelpViewType.ReportPreview: case Constant.HelpViewType.ReportPreview:
mMainDescription = getString(R.string.msg_help_report_task_director_main); // リソースパターンの適用
mHelpDisplayInfoList.add(settingHelpDisplayInfo(getString(R.string.msg_help_report_task_director_input), R.drawable.ic_help_input_task_report)); mMainDescription = PatternStringUtil.patternToString(getApplicationContext(),
R.string.msg_help_report_task_director_main,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0));
mHelpDisplayInfoList.add(settingHelpDisplayInfo(PatternStringUtil.patternToString(getApplicationContext(),
R.string.msg_help_report_task_director_input,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), R.drawable.ic_help_input_task_report));
break; break;
case Constant.HelpViewType.RoutineTaskOperation: case Constant.HelpViewType.RoutineTaskOperation:
mMainDescription = getString(R.string.msg_help_routineTask_list_main); // リソースパターンの適用
mHelpDisplayInfoList.add(settingHelpDisplayInfo(getString(R.string.msg_help_operation_home), R.drawable.ic_help_detail_home)); mMainDescription = PatternStringUtil.patternToString(getApplicationContext(),
mHelpDisplayInfoList.add(settingHelpDisplayInfo(getString(R.string.msg_help_routineTask_list_refresh), R.drawable.ic_help_direct_list_refresh)); R.string.msg_help_routineTask_list_main,
mHelpDisplayInfoList.add(settingHelpDisplayInfo(getString(R.string.msg_help_report_task_show_report), R.drawable.ic_help_direction_list_direct)); getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0));
mHelpDisplayInfoList.add(settingHelpDisplayInfo(PatternStringUtil.patternToString(getApplicationContext(),
R.string.msg_help_operation_home,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), R.drawable.ic_help_detail_home));
mHelpDisplayInfoList.add(settingHelpDisplayInfo(PatternStringUtil.patternToString(getApplicationContext(),
R.string.msg_help_routineTask_list_refresh,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), R.drawable.ic_help_direct_list_refresh));
mHelpDisplayInfoList.add(settingHelpDisplayInfo(PatternStringUtil.patternToString(getApplicationContext(),
R.string.msg_help_report_task_show_report,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), R.drawable.ic_help_direction_list_direct));
break; break;
case Constant.HelpViewType.RoutineTaskOperationReport: case Constant.HelpViewType.RoutineTaskOperationReport:
mMainDescription = getString(R.string.msg_help_director_task_main); // リソースパターンの適用
mHelpDisplayInfoList.add(settingHelpDisplayInfo(getString(R.string.msg_help_task_related_content), R.drawable.ic_help_task_related_content)); mMainDescription = PatternStringUtil.patternToString(getApplicationContext(),
mHelpDisplayInfoList.add(settingHelpDisplayInfo(getString(R.string.msg_help_task_form_explain), R.drawable.ic_help_task_form_explain)); R.string.msg_help_director_task_main,
mHelpDisplayInfoList.add(settingHelpDisplayInfo(getString(R.string.msg_help_task_save), R.drawable.ic_help_task_save)); getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0));
mHelpDisplayInfoList.add(settingHelpDisplayInfo(getString(R.string.msg_help_task_delete), R.drawable.ic_help_task_delete)); mHelpDisplayInfoList.add(settingHelpDisplayInfo(PatternStringUtil.patternToString(getApplicationContext(),
mHelpDisplayInfoList.add(settingHelpDisplayInfo(getString(R.string.msg_help_task_prev), R.drawable.ic_help_task_prev)); R.string.msg_help_task_related_content,
mHelpDisplayInfoList.add(settingHelpDisplayInfo(getString(R.string.msg_help_task_next), R.drawable.ic_help_task_next)); getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), R.drawable.ic_help_task_related_content));
mHelpDisplayInfoList.add(settingHelpDisplayInfo(getString(R.string.msg_help_task_first_back), R.drawable.ic_help_task_first_back)); mHelpDisplayInfoList.add(settingHelpDisplayInfo(PatternStringUtil.patternToString(getApplicationContext(),
mHelpDisplayInfoList.add(settingHelpDisplayInfo(getString(R.string.msg_help_task_end_go), R.drawable.ic_help_task_end_go)); R.string.msg_help_task_form_explain,
mHelpDisplayInfoList.add(settingHelpDisplayInfo(getString(R.string.msg_help_task_close), R.drawable.ic_help_task_close)); getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), R.drawable.ic_help_task_form_explain));
mHelpDisplayInfoList.add(settingHelpDisplayInfo(PatternStringUtil.patternToString(getApplicationContext(),
R.string.msg_help_task_save,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), R.drawable.ic_help_task_save));
mHelpDisplayInfoList.add(settingHelpDisplayInfo(PatternStringUtil.patternToString(getApplicationContext(),
R.string.msg_help_task_delete,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), R.drawable.ic_help_task_delete));
mHelpDisplayInfoList.add(settingHelpDisplayInfo(PatternStringUtil.patternToString(getApplicationContext(),
R.string.msg_help_task_prev,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), R.drawable.ic_help_task_prev));
mHelpDisplayInfoList.add(settingHelpDisplayInfo(PatternStringUtil.patternToString(getApplicationContext(),
R.string.msg_help_task_next,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), R.drawable.ic_help_task_next));
mHelpDisplayInfoList.add(settingHelpDisplayInfo(PatternStringUtil.patternToString(getApplicationContext(),
R.string.msg_help_task_first_back,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), R.drawable.ic_help_task_first_back));
mHelpDisplayInfoList.add(settingHelpDisplayInfo(PatternStringUtil.patternToString(getApplicationContext(),
R.string.msg_help_task_end_go,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), R.drawable.ic_help_task_end_go));
mHelpDisplayInfoList.add(settingHelpDisplayInfo(PatternStringUtil.patternToString(getApplicationContext(),
R.string.msg_help_task_close,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), R.drawable.ic_help_task_close));
break; break;
} }
......
...@@ -182,7 +182,6 @@ public class LoginActivity extends ABVLoginActivity { ...@@ -182,7 +182,6 @@ public class LoginActivity extends ABVLoginActivity {
ErrorMessage.showErrorMessageDialog(this, R.string.app_name, ErrorCode.L110); ErrorMessage.showErrorMessageDialog(this, R.string.app_name, ErrorCode.L110);
} }
} }
findViewById(R.id.guestLayout).setVisibility(View.GONE);
} }
@Override @Override
......
...@@ -11,6 +11,7 @@ import android.graphics.BitmapFactory; ...@@ -11,6 +11,7 @@ import android.graphics.BitmapFactory;
import android.net.Uri; import android.net.Uri;
import android.os.Bundle; import android.os.Bundle;
import android.provider.MediaStore; import android.provider.MediaStore;
import android.speech.tts.TextToSpeech;
import android.util.SparseBooleanArray; import android.util.SparseBooleanArray;
import android.view.KeyEvent; import android.view.KeyEvent;
import android.view.View; import android.view.View;
...@@ -86,6 +87,7 @@ import jp.agentec.abook.abv.bl.dto.TaskReportDto; ...@@ -86,6 +87,7 @@ import jp.agentec.abook.abv.bl.dto.TaskReportDto;
import jp.agentec.abook.abv.bl.logic.AbstractLogic; import jp.agentec.abook.abv.bl.logic.AbstractLogic;
import jp.agentec.abook.abv.bl.logic.OperationLogic; import jp.agentec.abook.abv.bl.logic.OperationLogic;
import jp.agentec.abook.abv.bl.logic.PushMessageLogic; import jp.agentec.abook.abv.bl.logic.PushMessageLogic;
import jp.agentec.abook.abv.cl.util.AndroidStringUtil;
import jp.agentec.abook.abv.cl.util.PreferenceUtil; import jp.agentec.abook.abv.cl.util.PreferenceUtil;
import jp.agentec.abook.abv.launcher.android.R; import jp.agentec.abook.abv.launcher.android.R;
import jp.agentec.abook.abv.ui.common.activity.ABVUIActivity; import jp.agentec.abook.abv.ui.common.activity.ABVUIActivity;
...@@ -97,6 +99,7 @@ import jp.agentec.abook.abv.ui.common.helper.ProgressDialogHelper; ...@@ -97,6 +99,7 @@ import jp.agentec.abook.abv.ui.common.helper.ProgressDialogHelper;
import jp.agentec.abook.abv.ui.common.util.ABVToastUtil; import jp.agentec.abook.abv.ui.common.util.ABVToastUtil;
import jp.agentec.abook.abv.ui.common.util.AlertDialogUtil; import jp.agentec.abook.abv.ui.common.util.AlertDialogUtil;
import jp.agentec.abook.abv.ui.common.util.KeyboardUtils; import jp.agentec.abook.abv.ui.common.util.KeyboardUtils;
import jp.agentec.abook.abv.ui.common.util.PatternStringUtil;
import jp.agentec.abook.abv.ui.common.view.ABVPopupListWindow; import jp.agentec.abook.abv.ui.common.view.ABVPopupListWindow;
import jp.agentec.abook.abv.ui.home.adapter.FixPushMessageAdapter; import jp.agentec.abook.abv.ui.home.adapter.FixPushMessageAdapter;
import jp.agentec.abook.abv.ui.home.adapter.OperationSelectAdapter; import jp.agentec.abook.abv.ui.home.adapter.OperationSelectAdapter;
...@@ -110,6 +113,8 @@ import jp.agentec.adf.util.DateTimeUtil; ...@@ -110,6 +113,8 @@ import jp.agentec.adf.util.DateTimeUtil;
import jp.agentec.adf.util.FileUtil; import jp.agentec.adf.util.FileUtil;
import jp.agentec.adf.util.StringUtil; import jp.agentec.adf.util.StringUtil;
import static jp.agentec.abook.abv.cl.util.PreferenceUtil.getUserPref;
/** /**
* Created by leej on 2018/08/17 * Created by leej on 2018/08/17
*/ */
...@@ -263,20 +268,36 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -263,20 +268,36 @@ public class OperationListActivity extends ABVUIActivity {
String message = getIntent().getStringExtra(AppDefType.PushMessageKey.message); String message = getIntent().getStringExtra(AppDefType.PushMessageKey.message);
if (operationId > 0) { if (operationId > 0) {
final ABookAlertDialog alertDialog = AlertDialogUtil.createAlertDialog(this, getRString(R.string.app_name), message); final ABookAlertDialog alertDialog = AlertDialogUtil.createAlertDialog(this, getRString(R.string.app_name), message);
alertDialog.setPositiveButton(R.string.work_report, new DialogInterface.OnClickListener() { // リソースパターンの適用
alertDialog.setPositiveButton(PatternStringUtil.patternToInt(getApplicationContext(),
R.string.work_report,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)),
new DialogInterface.OnClickListener() {
@Override @Override
public void onClick(DialogInterface dialog, int whichButton) { public void onClick(DialogInterface dialog, int whichButton) {
if (contentRefresher.isRefreshing()) { if (contentRefresher.isRefreshing()) {
ErrorMessage.showErrorMessageToast(OperationListActivity.this, R.string.msg_routineTask_report_disable_refreshing); // リソースパターンの適用
ErrorMessage.showErrorMessageToast(OperationListActivity.this, PatternStringUtil.patternToInt(getApplicationContext(),
R.string.msg_routineTask_report_disable_refreshing,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
} else if(ActivityHandlingHelper.getInstance().isMeetingConnected()) { } else if(ActivityHandlingHelper.getInstance().isMeetingConnected()) {
ErrorMessage.showErrorMessageToast(OperationListActivity.this, R.string.msg_routineTask_report_disable_meeting_room); // リソースパターンの適用
ErrorMessage.showErrorMessageToast(OperationListActivity.this, PatternStringUtil.patternToInt(getApplicationContext(),
R.string.msg_routineTask_report_disable_meeting_room,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
} else { } else {
OperationDto operationDto = mOperationLogic.getOperation(operationId); OperationDto operationDto = mOperationLogic.getOperation(operationId);
if (operationDto == null) { if (operationDto == null) {
ErrorMessage.showErrorMessageToast(OperationListActivity.this, R.string.msg_routineTask_report_disable_no_operation); // リソースパターンの適用
ErrorMessage.showErrorMessageToast(OperationListActivity.this, PatternStringUtil.patternToInt(getApplicationContext(),
R.string.msg_routineTask_report_disable_no_operation,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
} else if (operationDto.needSyncFlg) { } else if (operationDto.needSyncFlg) {
ErrorMessage.showErrorMessageToast(OperationListActivity.this, R.string.msg_routineTask_report_disable_not_updated); // リソースパターンの適用
ErrorMessage.showErrorMessageToast(OperationListActivity.this, PatternStringUtil.patternToInt(getApplicationContext(),
R.string.msg_routineTask_report_disable_not_updated,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
} else { } else {
startTaskDirectionOrReportView(operationDto); startTaskDirectionOrReportView(operationDto);
} }
...@@ -365,6 +386,8 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -365,6 +386,8 @@ public class OperationListActivity extends ABVUIActivity {
if (refreshBaseView != null) { if (refreshBaseView != null) {
refreshBaseView.onRefreshComplete(); refreshBaseView.onRefreshComplete();
} }
// リソースパターンを取得し、ローカルに保存する。
setResourcePattern();
refreshOperationList(); refreshOperationList();
} }
} }
...@@ -388,7 +411,10 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -388,7 +411,10 @@ public class OperationListActivity extends ABVUIActivity {
final long operationId = getUserPref(AppDefType.UserPrefKey.SYNC_TARGET_OPERATION_ID, -1L); final long operationId = getUserPref(AppDefType.UserPrefKey.SYNC_TARGET_OPERATION_ID, -1L);
if (operationId != -1) { if (operationId != -1) {
final OperationDto operationDto = mOperationLogic.getOperation(operationId); final OperationDto operationDto = mOperationLogic.getOperation(operationId);
showProgressView(getString(R.string.synchronizing)); // リソースパターンの適用
showProgressView(PatternStringUtil.patternToString(getApplicationContext(),
R.string.synchronizing,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
CommonExecutor.execute(new Runnable() { CommonExecutor.execute(new Runnable() {
@Override @Override
public void run() { public void run() {
...@@ -427,6 +453,7 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -427,6 +453,7 @@ public class OperationListActivity extends ABVUIActivity {
mEndDate = (TextView) mSearchDialog.findViewById(R.id.end_date); mEndDate = (TextView) mSearchDialog.findViewById(R.id.end_date);
// 33
mSearchTextView = (EditText) mSearchDialog.findViewById(R.id.operation_name); mSearchTextView = (EditText) mSearchDialog.findViewById(R.id.operation_name);
mSearchTextView.setOnKeyListener(new View.OnKeyListener() { mSearchTextView.setOnKeyListener(new View.OnKeyListener() {
@Override @Override
...@@ -475,7 +502,10 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -475,7 +502,10 @@ public class OperationListActivity extends ABVUIActivity {
refreshOperationList(); refreshOperationList();
mSearchDialog.dismiss(); mSearchDialog.dismiss();
ABVToastUtil.showMakeText(OperationListActivity.this, String.format(getString(R.string.operation_search_count), mListHelper.getOperationCount() + ""), Toast.LENGTH_SHORT); // リソースパターンの適用
ABVToastUtil.showMakeText(OperationListActivity.this, String.format(PatternStringUtil.patternToString(getApplicationContext(),
R.string.operation_search_count,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), mListHelper.getOperationCount() + ""), Toast.LENGTH_SHORT);
} }
}); });
...@@ -558,7 +588,10 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -558,7 +588,10 @@ public class OperationListActivity extends ABVUIActivity {
} }
if (startDate != null && endDate != null) { if (startDate != null && endDate != null) {
if (startDate.after(endDate)) { if (startDate.after(endDate)) {
ABVToastUtil.showMakeText(OperationListActivity.this, getString(R.string.msg_date_validation), Toast.LENGTH_SHORT); // リソースパターンの適用
ABVToastUtil.showMakeText(OperationListActivity.this, PatternStringUtil.patternToString(getApplicationContext(),
R.string.msg_date_validation,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), Toast.LENGTH_SHORT);
result = false; result = false;
} }
} }
...@@ -705,10 +738,15 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -705,10 +738,15 @@ public class OperationListActivity extends ABVUIActivity {
String avilableDateStr = mOperationLogic.getRoutineTaskOperationAvailableDateStr(operationId); String avilableDateStr = mOperationLogic.getRoutineTaskOperationAvailableDateStr(operationId);
if (!StringUtil.isNullOrEmpty(avilableDateStr)) { if (!StringUtil.isNullOrEmpty(avilableDateStr)) {
// 利用可能メッセージ // 利用可能メッセージ
dialogMsg = String.format(getString(R.string.msg_routineTask_report_available_from), avilableDateStr); // リソースパターンの適用
dialogMsg = String.format(PatternStringUtil.patternToString(getApplicationContext(),
R.string.msg_routineTask_report_available_from,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), avilableDateStr);
} else if (!mTaskReportDao.existsToDoRoutineTaskReportData(operationId)) { } else if (!mTaskReportDao.existsToDoRoutineTaskReportData(operationId)) {
// 作業データが存在しないメッセージ // 作業データが存在しないメッセージ
dialogMsg = getString(R.string.msg_no_report_data); dialogMsg = PatternStringUtil.patternToString(getApplicationContext(),
R.string.msg_no_report_data,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0));
} }
if (!StringUtil.isNullOrEmpty(dialogMsg)) { if (!StringUtil.isNullOrEmpty(dialogMsg)) {
showSimpleAlertDialog(getString(R.string.app_name), dialogMsg); showSimpleAlertDialog(getString(R.string.app_name), dialogMsg);
...@@ -960,7 +998,10 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -960,7 +998,10 @@ public class OperationListActivity extends ABVUIActivity {
ContentFileExtractor.getInstance().extractZipFile(contentId, outputFilePath, ABVEnvironment.getInstance().getOperationTaskReportLevelDirPath(operationId, taskKey, taskReportLevel),null, true); ContentFileExtractor.getInstance().extractZipFile(contentId, outputFilePath, ABVEnvironment.getInstance().getOperationTaskReportLevelDirPath(operationId, taskKey, taskReportLevel),null, true);
} catch (Exception e) { } catch (Exception e) {
Logger.e(TAG, e); Logger.e(TAG, e);
ABVToastUtil.showMakeText(getApplicationContext(), R.string.msg_error_task_report_receiving_failed, Toast.LENGTH_LONG); // リソースパターンの適用
ABVToastUtil.showMakeText(getApplicationContext(), PatternStringUtil.patternToInt(getApplicationContext(),
R.string.msg_error_task_report_receiving_failed,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), Toast.LENGTH_LONG);
throw e; throw e;
} }
} }
...@@ -1004,7 +1045,10 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -1004,7 +1045,10 @@ public class OperationListActivity extends ABVUIActivity {
// #32926 end // #32926 end
} catch (Exception e) { } catch (Exception e) {
Logger.e(TAG, e); Logger.e(TAG, e);
ABVToastUtil.showMakeText(getApplicationContext(), R.string.msg_error_task_report_receiving_failed, Toast.LENGTH_LONG); // リソースパターンの適用
ABVToastUtil.showMakeText(getApplicationContext(), PatternStringUtil.patternToInt(getApplicationContext(),
R.string.msg_error_task_report_receiving_failed,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), Toast.LENGTH_LONG);
isSyncGetTaskFileError = true; isSyncGetTaskFileError = true;
} }
} }
...@@ -1031,6 +1075,7 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -1031,6 +1075,7 @@ public class OperationListActivity extends ABVUIActivity {
mPanoContentNameTextView.setText(operationDto.operationName); mPanoContentNameTextView.setText(operationDto.operationName);
mPanoCotnentImageView.setImageBitmap(null); mPanoCotnentImageView.setImageBitmap(null);
FileUtil.delete(ABVEnvironment.getInstance().getCacheTempAttachedImageDirPath()); FileUtil.delete(ABVEnvironment.getInstance().getCacheTempAttachedImageDirPath());
// 閉じるボタン // 閉じるボタン
mPanoEntryDialog.findViewById(R.id.closeBtn).setOnClickListener(new View.OnClickListener() { mPanoEntryDialog.findViewById(R.id.closeBtn).setOnClickListener(new View.OnClickListener() {
...@@ -1063,10 +1108,15 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -1063,10 +1108,15 @@ public class OperationListActivity extends ABVUIActivity {
return; return;
} }
if (mSelectPanoContentUri == null) { if (mSelectPanoContentUri == null) {
ABVToastUtil.showMakeText(OperationListActivity.this, R.string.msg_pano_image_no_selected, Toast.LENGTH_SHORT); ABVToastUtil.showMakeText(OperationListActivity.this, PatternStringUtil.patternToInt(getApplicationContext(),
R.string.msg_pano_image_no_selected,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), Toast.LENGTH_SHORT);
return; return;
} }
showProgressView(getResources().getString(R.string.msg_common_processing)); // リソースパターンの適用
showProgressView(PatternStringUtil.patternToString(getApplicationContext(),
R.string.msg_common_processing,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
CommonExecutor.execute(new Runnable() { CommonExecutor.execute(new Runnable() {
@Override @Override
public void run() { public void run() {
...@@ -1265,6 +1315,12 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -1265,6 +1315,12 @@ public class OperationListActivity extends ABVUIActivity {
} }
}); });
// リソースパターンを適用
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() { mOperationSelectDialog.findViewById(R.id.close_btn).setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
...@@ -1339,13 +1395,19 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -1339,13 +1395,19 @@ public class OperationListActivity extends ABVUIActivity {
mPushMessageListDialog.findViewById(R.id.close_btn).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.back_btn).setVisibility(View.GONE);
mPushMessageListDialog.findViewById(R.id.ll_detail).setVisibility(View.GONE); mPushMessageListDialog.findViewById(R.id.ll_detail).setVisibility(View.GONE);
titleTextView.setText(getString(R.string.push_message_list)); // リソースパターンの適用
titleTextView.setText(PatternStringUtil.patternToString(getApplicationContext(),
R.string.push_message_list,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
} else { } else {
mPushMessageListView.setVisibility(View.GONE); mPushMessageListView.setVisibility(View.GONE);
mPushMessageListDialog.findViewById(R.id.close_btn).setVisibility(View.VISIBLE); mPushMessageListDialog.findViewById(R.id.close_btn).setVisibility(View.VISIBLE);
mPushMessageListDialog.findViewById(R.id.back_btn).setVisibility(View.VISIBLE); mPushMessageListDialog.findViewById(R.id.back_btn).setVisibility(View.VISIBLE);
mPushMessageListDialog.findViewById(R.id.ll_detail).setVisibility(View.VISIBLE); mPushMessageListDialog.findViewById(R.id.ll_detail).setVisibility(View.VISIBLE);
titleTextView.setText(getString(R.string.title_message_detail)); // リソースパターンの適用
titleTextView.setText(PatternStringUtil.patternToString(getApplicationContext(),
R.string.title_message_detail,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
} }
} }
...@@ -1402,7 +1464,10 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -1402,7 +1464,10 @@ public class OperationListActivity extends ABVUIActivity {
}); });
TextView messageTitleTextView = (TextView) mPushMessageSendDialog.findViewById(R.id.message_title); TextView messageTitleTextView = (TextView) mPushMessageSendDialog.findViewById(R.id.message_title);
messageTitleTextView.setText(getString(R.string.free_input) + " > "); // リソースパターンの適用
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); TextView tvOperationName = (TextView) mPushMessageSendDialog.findViewById(R.id.operation_name);
tvOperationName.setText(operationDto.operationName); tvOperationName.setText(operationDto.operationName);
...@@ -1446,27 +1511,45 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -1446,27 +1511,45 @@ public class OperationListActivity extends ABVUIActivity {
String checkMessage = message.replace(" ", ""); String checkMessage = message.replace(" ", "");
if (checkMessage.length() == 0) { if (checkMessage.length() == 0) {
ABVToastUtil.showMakeText(OperationListActivity.this, R.string.push_message_input_null, Toast.LENGTH_SHORT); // リソースパターンの適用
ABVToastUtil.showMakeText(OperationListActivity.this, PatternStringUtil.patternToString(getApplicationContext(),
R.string.push_message_input_null,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), Toast.LENGTH_SHORT);
return; return;
} }
byte[] messageByte = message.getBytes(StandardCharsets.UTF_8); byte[] messageByte = message.getBytes(StandardCharsets.UTF_8);
if (messageByte.length >= 207) { if (messageByte.length >= 207) {
ABVToastUtil.showMakeText(OperationListActivity.this, R.string.push_message_input_over, Toast.LENGTH_SHORT); // リソースパターンの適用
ABVToastUtil.showMakeText(OperationListActivity.this, PatternStringUtil.patternToString(getApplicationContext(),
R.string.push_message_input_over,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), Toast.LENGTH_SHORT);
return; return;
} }
ProgressDialogHelper.showProgressPopup(OperationListActivity.this, true, getString(R.string.file_initialization)); // リソースパターンの適用
ProgressDialogHelper.showProgressPopup(OperationListActivity.this, true, PatternStringUtil.patternToString(getApplicationContext(),
R.string.file_initialization,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
try { try {
boolean result = mPushMessageLogic.sendPushMessageRequest(mSendType, message, operationId); boolean result = mPushMessageLogic.sendPushMessageRequest(mSendType, message, operationId);
if (result) { if (result) {
mPushMessageSendDialog.dismiss(); mPushMessageSendDialog.dismiss();
ABVToastUtil.showMakeText(OperationListActivity.this, R.string.push_message_send_success, Toast.LENGTH_SHORT); // リソースパターンの適用
ABVToastUtil.showMakeText(OperationListActivity.this, PatternStringUtil.patternToString(getApplicationContext(),
R.string.push_message_send_success,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), Toast.LENGTH_SHORT);
} else { } else {
ABVToastUtil.showMakeText(OperationListActivity.this, R.string.push_message_send_fail, Toast.LENGTH_SHORT); // リソースパターンの適用
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) { } catch (Exception e) {
Logger.e(TAG, e); Logger.e(TAG, e);
ABVToastUtil.showMakeText(OperationListActivity.this, R.string.push_message_send_fail, Toast.LENGTH_SHORT); // リソースパターンの適用
ABVToastUtil.showMakeText(OperationListActivity.this, PatternStringUtil.patternToString(getApplicationContext(),
R.string.push_message_send_fail,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), Toast.LENGTH_SHORT);
} finally { } finally {
ProgressDialogHelper.closeProgressPopup(); ProgressDialogHelper.closeProgressPopup();
} }
...@@ -1480,11 +1563,17 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -1480,11 +1563,17 @@ public class OperationListActivity extends ABVUIActivity {
EditText messageEditText = (EditText) mPushMessageSendDialog.findViewById(R.id.message); EditText messageEditText = (EditText) mPushMessageSendDialog.findViewById(R.id.message);
KeyboardUtils.hide(OperationListActivity.this, messageEditText); KeyboardUtils.hide(OperationListActivity.this, messageEditText);
ProgressDialogHelper.showProgressPopup(OperationListActivity.this, true, getString(R.string.file_initialization)); // リソースパターンの適用
ProgressDialogHelper.showProgressPopup(OperationListActivity.this, true, PatternStringUtil.patternToString(getApplicationContext(),
R.string.file_initialization,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
try { try {
List<FixPushMessageDto> fixPushMessageList = mPushMessageLogic.getFixPushMessage(); List<FixPushMessageDto> fixPushMessageList = mPushMessageLogic.getFixPushMessage();
FixPushMessageDto dto = new FixPushMessageDto(); FixPushMessageDto dto = new FixPushMessageDto();
dto.name = getString(R.string.free_input); // リソースパターンの適用
dto.name = PatternStringUtil.patternToString(getApplicationContext(),
R.string.free_input,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0));
fixPushMessageList.add(0, dto); fixPushMessageList.add(0, dto);
mFixPushMessageListView.setAdapter(new FixPushMessageAdapter(OperationListActivity.this, fixPushMessageList, mSelectedFixPuchMessagePosition)); mFixPushMessageListView.setAdapter(new FixPushMessageAdapter(OperationListActivity.this, fixPushMessageList, mSelectedFixPuchMessagePosition));
mFixPushMessageListView.invalidate(); mFixPushMessageListView.invalidate();
...@@ -1508,7 +1597,10 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -1508,7 +1597,10 @@ public class OperationListActivity extends ABVUIActivity {
showSendPushMessgeView(false); showSendPushMessgeView(false);
} catch (Exception e) { } catch (Exception e) {
Logger.e(TAG, e); Logger.e(TAG, e);
ABVToastUtil.showMakeText(OperationListActivity.this, R.string.respons_fix_push_message_fail, Toast.LENGTH_SHORT); // リソースパターンの適用
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 { } finally {
ProgressDialogHelper.closeProgressPopup(); ProgressDialogHelper.closeProgressPopup();
} }
...@@ -1572,7 +1664,10 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -1572,7 +1664,10 @@ public class OperationListActivity extends ABVUIActivity {
if (contentRefresher.isRefreshing()) { if (contentRefresher.isRefreshing()) {
return; return;
} }
showProgressView(getString(R.string.synchronizing)); // リソースパターンの適用
showProgressView(PatternStringUtil.patternToString(getApplicationContext(),
R.string.synchronizing,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
CommonExecutor.execute(new Runnable() { CommonExecutor.execute(new Runnable() {
@Override @Override
public void run() { public void run() {
...@@ -1603,7 +1698,10 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -1603,7 +1698,10 @@ public class OperationListActivity extends ABVUIActivity {
if (lastUpdateTime > 0) { if (lastUpdateTime > 0) {
String lastUpdateTimeLabel = null; String lastUpdateTimeLabel = null;
String strUpdateTime = DateTimeUtil.toString(new Date(lastUpdateTime), DateTimeFormat.yyyyMMddHHmmss_slash); String strUpdateTime = DateTimeUtil.toString(new Date(lastUpdateTime), DateTimeFormat.yyyyMMddHHmmss_slash);
String formatStr = getString(R.string.recent_update_date); // リソースパターンの適用
String formatStr = PatternStringUtil.patternToString(getApplicationContext(),
R.string.recent_update_date,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0));
lastUpdateTimeLabel = String.format(formatStr, strUpdateTime); lastUpdateTimeLabel = String.format(formatStr, strUpdateTime);
// Update the LastUpdatedLabel // Update the LastUpdatedLabel
...@@ -1637,7 +1735,10 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -1637,7 +1735,10 @@ public class OperationListActivity extends ABVUIActivity {
if (lastUpdateTime > 0) { if (lastUpdateTime > 0) {
String lastUpdateTimeLabel = null; String lastUpdateTimeLabel = null;
String strUpdateTime = DateTimeUtil.toString(new Date(lastUpdateTime), DateTimeFormat.yyyyMMddHHmmss_slash); String strUpdateTime = DateTimeUtil.toString(new Date(lastUpdateTime), DateTimeFormat.yyyyMMddHHmmss_slash);
String formatStr = getString(R.string.recent_update_date); // リソースパターンの適用
String formatStr = PatternStringUtil.patternToString(getApplicationContext(),
R.string.recent_update_date,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0));
lastUpdateTimeLabel = String.format(formatStr, strUpdateTime); lastUpdateTimeLabel = String.format(formatStr, strUpdateTime);
// Update the LastUpdatedLabel // Update the LastUpdatedLabel
...@@ -1697,6 +1798,13 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -1697,6 +1798,13 @@ public class OperationListActivity extends ABVUIActivity {
// 表示するコンテンツタイプのリストを作成 // 表示するコンテンツタイプのリストを作成
List<String> members = Arrays.asList(getRStringArray(R.array.operation_report_types)); 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); ArrayList<Integer> selectedOperationReportTypes = getOperationReportTypeList(false);
ArrayAdapter<String> adapter = new ArrayAdapter<>(this, R.layout.item_checked_list, members); ArrayAdapter<String> adapter = new ArrayAdapter<>(this, R.layout.item_checked_list, members);
...@@ -1754,4 +1862,10 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -1754,4 +1862,10 @@ public class OperationListActivity extends ABVUIActivity {
} }
return operationReportTypes; return operationReportTypes;
} }
// ログイン成功した後、新着更新時の「ContentVersion」APIからリソースパターンを取得し、ローカルに保存する。
private void setResourcePattern() {
Logger.d(TAG, "ABVEnvironment.getInstance().resourcePatternType : " + ABVEnvironment.getInstance().resourcePatternType);
putUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, ABVEnvironment.getInstance().resourcePatternType);
}
} }
...@@ -40,12 +40,16 @@ import jp.agentec.abook.abv.bl.websocket.MeetingManager; ...@@ -40,12 +40,16 @@ import jp.agentec.abook.abv.bl.websocket.MeetingManager;
import jp.agentec.abook.abv.cl.util.AndroidStringUtil; import jp.agentec.abook.abv.cl.util.AndroidStringUtil;
import jp.agentec.abook.abv.launcher.android.R; import jp.agentec.abook.abv.launcher.android.R;
import jp.agentec.abook.abv.ui.common.activity.ABVUIActivity; import jp.agentec.abook.abv.ui.common.activity.ABVUIActivity;
import jp.agentec.abook.abv.ui.common.appinfo.AppDefType;
import jp.agentec.abook.abv.ui.common.appinfo.AppDefType.UserPrefKey; import jp.agentec.abook.abv.ui.common.appinfo.AppDefType.UserPrefKey;
import jp.agentec.abook.abv.ui.common.dialog.ABookAlertDialog; import jp.agentec.abook.abv.ui.common.dialog.ABookAlertDialog;
import jp.agentec.abook.abv.ui.common.util.AlertDialogUtil; import jp.agentec.abook.abv.ui.common.util.AlertDialogUtil;
import jp.agentec.abook.abv.ui.common.util.PatternStringUtil;
import jp.agentec.abook.abv.ui.home.helper.ActivityHandlingHelper; import jp.agentec.abook.abv.ui.home.helper.ActivityHandlingHelper;
import jp.agentec.adf.util.StringUtil; import jp.agentec.adf.util.StringUtil;
import static jp.agentec.abook.abv.cl.util.PreferenceUtil.getUserPref;
public class OperationMeetingListActivity extends ABVUIActivity { public class OperationMeetingListActivity extends ABVUIActivity {
private static final String TAG = "OperationMeetingListActivity"; private static final String TAG = "OperationMeetingListActivity";
private String mSkey; private String mSkey;
...@@ -180,7 +184,14 @@ public class OperationMeetingListActivity extends ABVUIActivity { ...@@ -180,7 +184,14 @@ public class OperationMeetingListActivity extends ABVUIActivity {
if (mMeetingManager.isConnected()) { // 入室している場合(退室ボタン) if (mMeetingManager.isConnected()) { // 入室している場合(退室ボタン)
if (mMeetingManager.isOwner()) { // 司会者の場合 if (mMeetingManager.isOwner()) { // 司会者の場合
ABookAlertDialog alert = AlertDialogUtil.createAlertDialog(OperationMeetingListActivity.this, R.string.confirm); ABookAlertDialog alert = AlertDialogUtil.createAlertDialog(OperationMeetingListActivity.this, R.string.confirm);
alert.setMessage(AndroidStringUtil.format(OperationMeetingListActivity.this, R.string.msg_confirm_exit_meeting_room, R.string.meeting_leave)); // リソースパターンの適用
alert.setMessage(AndroidStringUtil.format(OperationMeetingListActivity.this,
PatternStringUtil.patternToInt(getApplicationContext(),
R.string.msg_confirm_exit_meeting_room,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)),
PatternStringUtil.patternToInt(getApplicationContext(),
R.string.meeting_leave,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0))));
alert.setPositiveButton(R.string.yes, new DialogInterface.OnClickListener() { alert.setPositiveButton(R.string.yes, new DialogInterface.OnClickListener() {
@Override @Override
public void onClick(DialogInterface dialog, int whichButton) { public void onClick(DialogInterface dialog, int whichButton) {
...@@ -214,11 +225,17 @@ public class OperationMeetingListActivity extends ABVUIActivity { ...@@ -214,11 +225,17 @@ public class OperationMeetingListActivity extends ABVUIActivity {
TextView titleTxt = (TextView) mMeetingListLayout.findViewById(R.id.meeting_list_title); TextView titleTxt = (TextView) mMeetingListLayout.findViewById(R.id.meeting_list_title);
if (mMeetingManager.isConnected() && mMeetingManager.isOwner()) { if (mMeetingManager.isConnected() && mMeetingManager.isOwner()) {
titleTxt.setText(R.string.room_list); // リソースパターンの適用
titleTxt.setText(PatternStringUtil.patternToInt(getApplicationContext(),
R.string.room_list,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
mAddBtn.setVisibility(View.GONE); mAddBtn.setVisibility(View.GONE);
mLeaveBtn.setVisibility(View.VISIBLE); mLeaveBtn.setVisibility(View.VISIBLE);
} else { } else {
titleTxt.setText(R.string.remote_support); // リソースパターンの適用
titleTxt.setText(PatternStringUtil.patternToString(getApplicationContext(),
R.string.remote_support,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
mAddBtn.setVisibility(View.VISIBLE); mAddBtn.setVisibility(View.VISIBLE);
mLeaveBtn.setVisibility(View.GONE); mLeaveBtn.setVisibility(View.GONE);
} }
...@@ -286,9 +303,15 @@ public class OperationMeetingListActivity extends ABVUIActivity { ...@@ -286,9 +303,15 @@ public class OperationMeetingListActivity extends ABVUIActivity {
} else { } else {
progressBar.setVisibility(View.GONE); progressBar.setVisibility(View.GONE);
if (mAddBtn.getVisibility() == View.VISIBLE) { if (mAddBtn.getVisibility() == View.VISIBLE) {
titleTxt.setText(R.string.remote_support); // リソースパターンの適用
titleTxt.setText(PatternStringUtil.patternToString(getApplicationContext(),
R.string.remote_support,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
// リソースパターンの適用
} else { } else {
titleTxt.setText(R.string.room_list); titleTxt.setText(PatternStringUtil.patternToInt(getApplicationContext(),
R.string.room_list,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
} }
} }
} }
...@@ -328,9 +351,15 @@ public class OperationMeetingListActivity extends ABVUIActivity { ...@@ -328,9 +351,15 @@ public class OperationMeetingListActivity extends ABVUIActivity {
TextView passwordSetTxt = (TextView) convertView.findViewById(R.id.password_set); TextView passwordSetTxt = (TextView) convertView.findViewById(R.id.password_set);
if (meetingDto.type == MeetingDto.TYPE_PASSWORD) { if (meetingDto.type == MeetingDto.TYPE_PASSWORD) {
passwordSetTxt.setText(R.string.exist); // リソースパターンの適用
passwordSetTxt.setText(PatternStringUtil.patternToString(getApplicationContext(),
R.string.exist,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
} else { } else {
passwordSetTxt.setText(R.string.not_exist); // リソースパターンの適用
passwordSetTxt.setText(PatternStringUtil.patternToString(getApplicationContext(),
R.string.not_exist,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
} }
if (isNormalSize()) { if (isNormalSize()) {
...@@ -680,7 +709,10 @@ public class OperationMeetingListActivity extends ABVUIActivity { ...@@ -680,7 +709,10 @@ public class OperationMeetingListActivity extends ABVUIActivity {
TextView titleTxt = (TextView) mMeetingListLayout.findViewById(R.id.meeting_list_title); TextView titleTxt = (TextView) mMeetingListLayout.findViewById(R.id.meeting_list_title);
mCloseBtn = (Button) mMeetingListLayout.findViewById(R.id.close); mCloseBtn = (Button) mMeetingListLayout.findViewById(R.id.close);
if (mMeetingManager.isConnected() && mMeetingManager.isOwner()) { // 開始している場合追加ボタンを非表示 if (mMeetingManager.isConnected() && mMeetingManager.isOwner()) { // 開始している場合追加ボタンを非表示
titleTxt.setText(R.string.room_list); // リソースパターンの適用
titleTxt.setText(PatternStringUtil.patternToInt(getApplicationContext(),
R.string.room_list,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
mMeetingEnteredInfoLayout.setVisibility(View.VISIBLE); mMeetingEnteredInfoLayout.setVisibility(View.VISIBLE);
final MeetingDto enteredMeetingDto = mMeetingManager.getJoinedMeetingDto(); final MeetingDto enteredMeetingDto = mMeetingManager.getJoinedMeetingDto();
...@@ -704,9 +736,15 @@ public class OperationMeetingListActivity extends ABVUIActivity { ...@@ -704,9 +736,15 @@ public class OperationMeetingListActivity extends ABVUIActivity {
TextView enteredPasswordSetTxt = (TextView) mMeetingEnteredInfoLayout.findViewById(R.id.entered_room_password_set); TextView enteredPasswordSetTxt = (TextView) mMeetingEnteredInfoLayout.findViewById(R.id.entered_room_password_set);
if (enteredMeetingDto.type == MeetingDto.TYPE_PASSWORD) { if (enteredMeetingDto.type == MeetingDto.TYPE_PASSWORD) {
enteredPasswordSetTxt.setText(R.string.exist); // リソースパターンの適用
enteredPasswordSetTxt.setText(PatternStringUtil.patternToString(getApplicationContext(),
R.string.exist,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
} else { } else {
enteredPasswordSetTxt.setText(R.string.not_exist); // リソースパターンの適用
enteredPasswordSetTxt.setText(PatternStringUtil.patternToString(getApplicationContext(),
R.string.not_exist,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
} }
if (isNormalSize()) { if (isNormalSize()) {
...@@ -723,7 +761,10 @@ public class OperationMeetingListActivity extends ABVUIActivity { ...@@ -723,7 +761,10 @@ public class OperationMeetingListActivity extends ABVUIActivity {
mLeaveBtn.setVisibility(View.VISIBLE); mLeaveBtn.setVisibility(View.VISIBLE);
} }
else { else {
titleTxt.setText(R.string.remote_support); // リソースパターンの適用
titleTxt.setText(PatternStringUtil.patternToString(getApplicationContext(),
R.string.remote_support,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
mAddBtn.setVisibility(View.VISIBLE); mAddBtn.setVisibility(View.VISIBLE);
mMeetingEnteredInfoLayout.setVisibility(View.GONE); mMeetingEnteredInfoLayout.setVisibility(View.GONE);
mLeaveBtn.setVisibility(View.GONE); mLeaveBtn.setVisibility(View.GONE);
......
...@@ -27,11 +27,13 @@ import jp.agentec.abook.abv.bl.logic.AbstractLogic; ...@@ -27,11 +27,13 @@ import jp.agentec.abook.abv.bl.logic.AbstractLogic;
import jp.agentec.abook.abv.bl.logic.OperationLogic; import jp.agentec.abook.abv.bl.logic.OperationLogic;
import jp.agentec.abook.abv.launcher.android.R; import jp.agentec.abook.abv.launcher.android.R;
import jp.agentec.abook.abv.ui.common.activity.ABVUIActivity; import jp.agentec.abook.abv.ui.common.activity.ABVUIActivity;
import jp.agentec.abook.abv.ui.common.appinfo.AppDefType;
import jp.agentec.abook.abv.ui.common.constant.ErrorCode; import jp.agentec.abook.abv.ui.common.constant.ErrorCode;
import jp.agentec.abook.abv.ui.common.constant.ErrorMessage; import jp.agentec.abook.abv.ui.common.constant.ErrorMessage;
import jp.agentec.abook.abv.ui.common.dialog.ABookAlertDialog; import jp.agentec.abook.abv.ui.common.dialog.ABookAlertDialog;
import jp.agentec.abook.abv.ui.common.util.ABVToastUtil; import jp.agentec.abook.abv.ui.common.util.ABVToastUtil;
import jp.agentec.abook.abv.ui.common.util.AlertDialogUtil; import jp.agentec.abook.abv.ui.common.util.AlertDialogUtil;
import jp.agentec.abook.abv.ui.common.util.PatternStringUtil;
import jp.agentec.abook.abv.ui.home.adapter.OperationRelatedContentSectionAdapter; import jp.agentec.abook.abv.ui.home.adapter.OperationRelatedContentSectionAdapter;
import jp.agentec.abook.abv.ui.home.helper.ActivityHandlingHelper; import jp.agentec.abook.abv.ui.home.helper.ActivityHandlingHelper;
...@@ -83,9 +85,14 @@ public class OperationRelatedContentActivity extends ABVUIActivity { ...@@ -83,9 +85,14 @@ public class OperationRelatedContentActivity extends ABVUIActivity {
llOperationName.setVisibility(View.GONE); llOperationName.setVisibility(View.GONE);
LinearLayout llLine = (LinearLayout) findViewById(R.id.linear_full_border); LinearLayout llLine = (LinearLayout) findViewById(R.id.linear_full_border);
llLine.setVisibility(View.GONE); llLine.setVisibility(View.GONE);
mTxtOperationRelatedContent.setText("" + getString(R.string.title_common_content)); // リソースパターンの適用
mTxtOperationRelatedContent.setText("" + PatternStringUtil.patternToString(getApplicationContext(),
R.string.title_common_content,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
} else { } else {
mTxtOperationRelatedContent.setText("" + getString(R.string.operation_related_content)); mTxtOperationRelatedContent.setText("" + PatternStringUtil.patternToString(getApplicationContext(),
R.string.operation_related_content,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
} }
mTxtOperationName.setText(operationName); mTxtOperationName.setText(operationName);
...@@ -316,7 +323,14 @@ public class OperationRelatedContentActivity extends ABVUIActivity { ...@@ -316,7 +323,14 @@ public class OperationRelatedContentActivity extends ABVUIActivity {
} }
public void showCancelDownloadDialog(final ContentDto contentDto) { public void showCancelDownloadDialog(final ContentDto contentDto) {
ABookAlertDialog cancelDownloadDialog = AlertDialogUtil.createAlertDialog(this, R.string.cancel, R.string.msg_cancel_download); // リソースパターンの適用
ABookAlertDialog cancelDownloadDialog = AlertDialogUtil.createAlertDialog(this,
PatternStringUtil.patternToInt(getApplicationContext(),
R.string.cancel,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)),
PatternStringUtil.patternToInt(getApplicationContext(),
R.string.msg_cancel_download,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
cancelDownloadDialog.setNegativeButton(R.string.cancel, null); cancelDownloadDialog.setNegativeButton(R.string.cancel, null);
cancelDownloadDialog.setPositiveButton(R.string.confirm, new DialogInterface.OnClickListener() { cancelDownloadDialog.setPositiveButton(R.string.confirm, new DialogInterface.OnClickListener() {
@Override @Override
......
...@@ -16,11 +16,13 @@ import jp.agentec.abook.abv.bl.common.Constant.ReportType; ...@@ -16,11 +16,13 @@ import jp.agentec.abook.abv.bl.common.Constant.ReportType;
import jp.agentec.abook.abv.bl.dto.OperationDto; import jp.agentec.abook.abv.bl.dto.OperationDto;
import jp.agentec.abook.abv.launcher.android.R; import jp.agentec.abook.abv.launcher.android.R;
import jp.agentec.abook.abv.ui.common.appinfo.AppDefType; import jp.agentec.abook.abv.ui.common.appinfo.AppDefType;
import jp.agentec.abook.abv.ui.common.util.PatternStringUtil;
import jp.agentec.abook.abv.ui.home.activity.OperationListActivity; import jp.agentec.abook.abv.ui.home.activity.OperationListActivity;
import jp.agentec.adf.util.DateTimeFormat; import jp.agentec.adf.util.DateTimeFormat;
import jp.agentec.adf.util.DateTimeUtil; import jp.agentec.adf.util.DateTimeUtil;
import jp.agentec.adf.util.StringUtil; import jp.agentec.adf.util.StringUtil;
import static jp.agentec.abook.abv.cl.util.PreferenceUtil.getPref;
import static jp.agentec.abook.abv.cl.util.PreferenceUtil.getUserPref; import static jp.agentec.abook.abv.cl.util.PreferenceUtil.getUserPref;
/** /**
...@@ -90,12 +92,24 @@ public class OperationListAdapter extends AbstractOperationAdapter { ...@@ -90,12 +92,24 @@ public class OperationListAdapter extends AbstractOperationAdapter {
holder.tvOperationName.setText(operationDto.operationName); holder.tvOperationName.setText(operationDto.operationName);
if (operationDto.reportType == ReportType.RoutineTask) { if (operationDto.reportType == ReportType.RoutineTask) {
if (StringUtil.isNullOrEmpty(operationDto.reportPeriod)) { if (StringUtil.isNullOrEmpty(operationDto.reportPeriod)) {
holder.tvDate.setText(mContext.getString(R.string.date_label_routineTask) + " : " + mContext.getString(R.string.msg_no_report_data)); // リソースパターンの適用
holder.tvDate.setText(PatternStringUtil.patternToString(mContext,
R.string.date_label_routineTask,
getUserPref(mContext, AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)) + " : " + PatternStringUtil.patternToString(mContext,
R.string.msg_no_report_data,
getUserPref(mContext, AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
} else { } else {
holder.tvDate.setText(mContext.getString(R.string.date_label_routineTask) + " : " + (mNormalSizeFlg ? "\n" : "") + operationDto.reportPeriod); // リソースパターンの適用
holder.tvDate.setText(PatternStringUtil.patternToString(mContext,
R.string.date_label_routineTask,
getUserPref(mContext, AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)) + " : " + (mNormalSizeFlg ? "\n" : "") + operationDto.reportPeriod);
} }
} else { } else {
holder.tvDate.setText(mContext.getString(R.string.date_label) + " : " + DateTimeUtil.toString(operationDto.operationStartDate, DateTimeFormat.yyyyMMdd_slash) + " ~ " + DateTimeUtil.toString(operationDto.operationEndDate, DateTimeFormat.yyyyMMdd_slash));
// リソースパターンの適用
holder.tvDate.setText(PatternStringUtil.patternToInt(mContext,
R.string.date_label,
getUserPref(mContext, AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)) + " : " + DateTimeUtil.toString(operationDto.operationStartDate, DateTimeFormat.yyyyMMdd_slash) + " ~ " + DateTimeUtil.toString(operationDto.operationEndDate, DateTimeFormat.yyyyMMdd_slash));
} }
// 同期ボタン表示・非表示 // 同期ボタン表示・非表示
......
...@@ -15,6 +15,7 @@ import jp.agentec.abook.abv.bl.common.Constant.ReportType; ...@@ -15,6 +15,7 @@ import jp.agentec.abook.abv.bl.common.Constant.ReportType;
import jp.agentec.abook.abv.bl.dto.OperationDto; import jp.agentec.abook.abv.bl.dto.OperationDto;
import jp.agentec.abook.abv.launcher.android.R; import jp.agentec.abook.abv.launcher.android.R;
import jp.agentec.abook.abv.ui.common.appinfo.AppDefType; import jp.agentec.abook.abv.ui.common.appinfo.AppDefType;
import jp.agentec.abook.abv.ui.common.util.PatternStringUtil;
import jp.agentec.adf.util.DateTimeFormat; import jp.agentec.adf.util.DateTimeFormat;
import jp.agentec.adf.util.DateTimeUtil; import jp.agentec.adf.util.DateTimeUtil;
import jp.agentec.adf.util.StringUtil; import jp.agentec.adf.util.StringUtil;
...@@ -122,12 +123,20 @@ public class OperationPanelAdapter extends AbstractOperationAdapter { ...@@ -122,12 +123,20 @@ public class OperationPanelAdapter extends AbstractOperationAdapter {
holder.tvOperationName.setText(operationDto.operationName); holder.tvOperationName.setText(operationDto.operationName);
if (operationDto.reportType == ReportType.RoutineTask) { if (operationDto.reportType == ReportType.RoutineTask) {
if (StringUtil.isNullOrEmpty(operationDto.reportPeriod)) { if (StringUtil.isNullOrEmpty(operationDto.reportPeriod)) {
holder.tvDate.setText(mContext.getString(R.string.date_label_routineTask) + " : " + mContext.getString(R.string.msg_no_report_data)); // リソースパターンの適用
holder.tvDate.setText(PatternStringUtil.patternToString(mContext,
R.string.date_label_routineTask,
getUserPref(mContext, AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)) + " : " + PatternStringUtil.patternToString(mContext,
R.string.msg_no_report_data,
getUserPref(mContext, AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
} else { } else {
holder.tvDate.setText(mContext.getString(R.string.date_label_routineTask) + " : " + operationDto.reportPeriod); holder.tvDate.setText(mContext.getString(R.string.date_label_routineTask) + " : " + operationDto.reportPeriod);
} }
} else { } else {
holder.tvDate.setText(mContext.getString(R.string.date_label) + " : " + DateTimeUtil.toString(operationDto.operationStartDate, DateTimeFormat.yyyyMMdd_slash) + " ~ " + DateTimeUtil.toString(operationDto.operationEndDate, DateTimeFormat.yyyyMMdd_slash)); // リソースパターンの適用
holder.tvDate.setText(PatternStringUtil.patternToInt(mContext,
R.string.date_label,
getUserPref(mContext, AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)) + " : " + DateTimeUtil.toString(operationDto.operationStartDate, DateTimeFormat.yyyyMMdd_slash) + " ~ " + DateTimeUtil.toString(operationDto.operationEndDate, DateTimeFormat.yyyyMMdd_slash));
} }
// 同期ボタン表示・非表示 // 同期ボタン表示・非表示
......
...@@ -25,9 +25,13 @@ import jp.agentec.abook.abv.bl.common.log.Logger; ...@@ -25,9 +25,13 @@ import jp.agentec.abook.abv.bl.common.log.Logger;
import jp.agentec.abook.abv.bl.dto.ContentDto; import jp.agentec.abook.abv.bl.dto.ContentDto;
import jp.agentec.abook.abv.cl.util.BitmapUtil; import jp.agentec.abook.abv.cl.util.BitmapUtil;
import jp.agentec.abook.abv.launcher.android.R; import jp.agentec.abook.abv.launcher.android.R;
import jp.agentec.abook.abv.ui.common.appinfo.AppDefType;
import jp.agentec.abook.abv.ui.common.util.PatternStringUtil;
import jp.agentec.adf.util.DateTimeFormat; import jp.agentec.adf.util.DateTimeFormat;
import jp.agentec.adf.util.DateTimeUtil; import jp.agentec.adf.util.DateTimeUtil;
import static jp.agentec.abook.abv.cl.util.PreferenceUtil.getUserPref;
public class OperationRelatedContentPanelAdapter extends BaseAdapter { public class OperationRelatedContentPanelAdapter extends BaseAdapter {
final private String TAG = "OperationRelatedContentPanelAdapter"; final private String TAG = "OperationRelatedContentPanelAdapter";
...@@ -149,7 +153,10 @@ public class OperationRelatedContentPanelAdapter extends BaseAdapter { ...@@ -149,7 +153,10 @@ public class OperationRelatedContentPanelAdapter extends BaseAdapter {
// 最後の公開処理日 // 最後の公開処理日
String lastDeliveryDate = DateTimeUtil.toString(contentDto.lastDeliveryDate, DateTimeFormat.yyyyMMdd_slash); String lastDeliveryDate = DateTimeUtil.toString(contentDto.lastDeliveryDate, DateTimeFormat.yyyyMMdd_slash);
if (lastDeliveryDate != null) { if (lastDeliveryDate != null) {
holder.tvLastDeliveryDate.setText(lastDeliveryDate + " " + context.getString(R.string.content_update)); // リソースパターンの適用
holder.tvLastDeliveryDate.setText(lastDeliveryDate + " " + PatternStringUtil.patternToString(context,
R.string.content_update,
getUserPref(context, AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
} }
// コンテンツ名 // コンテンツ名
...@@ -267,7 +274,10 @@ public class OperationRelatedContentPanelAdapter extends BaseAdapter { ...@@ -267,7 +274,10 @@ public class OperationRelatedContentPanelAdapter extends BaseAdapter {
private void setNewRibbon(ViewHolder holder, final ContentDto contentDto) { private void setNewRibbon(ViewHolder holder, final ContentDto contentDto) {
if (!contentDto.downloadedFlg && contentDto.newFlg) { if (!contentDto.downloadedFlg && contentDto.newFlg) {
holder.tvNewContentMark.setVisibility(View.VISIBLE); holder.tvNewContentMark.setVisibility(View.VISIBLE);
holder.tvNewContentMark.setText(context.getResources().getString(R.string.new_content)); // リソースパターンの適用
holder.tvNewContentMark.setText(PatternStringUtil.patternToString(context,
R.string.new_content,
getUserPref(context, AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
} else { } else {
holder.tvNewContentMark.setVisibility(View.GONE); holder.tvNewContentMark.setVisibility(View.GONE);
} }
......
...@@ -12,9 +12,13 @@ import java.util.List; ...@@ -12,9 +12,13 @@ import java.util.List;
import jp.agentec.abook.abv.bl.dto.PushMessageDto; import jp.agentec.abook.abv.bl.dto.PushMessageDto;
import jp.agentec.abook.abv.launcher.android.R; import jp.agentec.abook.abv.launcher.android.R;
import jp.agentec.abook.abv.ui.common.appinfo.AppDefType;
import jp.agentec.abook.abv.ui.common.util.PatternStringUtil;
import jp.agentec.adf.util.DateTimeFormat; import jp.agentec.adf.util.DateTimeFormat;
import jp.agentec.adf.util.DateTimeUtil; import jp.agentec.adf.util.DateTimeUtil;
import static jp.agentec.abook.abv.cl.util.PreferenceUtil.getUserPref;
/** /**
* Created by kim jinsung on 2018/09/18. * Created by kim jinsung on 2018/09/18.
*/ */
...@@ -82,7 +86,10 @@ public class PushMessageListAdapter extends BaseAdapter { ...@@ -82,7 +86,10 @@ public class PushMessageListAdapter extends BaseAdapter {
holder.operationNameTextView.setText(pushMessageDto.operationName); holder.operationNameTextView.setText(pushMessageDto.operationName);
holder.sendDateTextView.setText(DateTimeUtil.toString(pushMessageDto.pushSendDate, DateTimeFormat.yyyyMMddHHmm_slash)); holder.sendDateTextView.setText(DateTimeUtil.toString(pushMessageDto.pushSendDate, DateTimeFormat.yyyyMMddHHmm_slash));
holder.messageTextView.setText(pushMessageDto.pushMessage); holder.messageTextView.setText(pushMessageDto.pushMessage);
holder.detailButton.setText(mContext.getString(R.string.detail)); // リソースパターンの適用
holder.detailButton.setText(PatternStringUtil.patternToString(mContext,
R.string.detail,
getUserPref(mContext, AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)) );
if (pushMessageDto.readingFlg) { if (pushMessageDto.readingFlg) {
holder.detailButton.setBackgroundResource(R.drawable.btn_detail); holder.detailButton.setBackgroundResource(R.drawable.btn_detail);
......
...@@ -34,12 +34,17 @@ import jp.agentec.abook.abv.bl.logic.AbstractLogic; ...@@ -34,12 +34,17 @@ import jp.agentec.abook.abv.bl.logic.AbstractLogic;
import jp.agentec.abook.abv.bl.logic.OperationLogic; import jp.agentec.abook.abv.bl.logic.OperationLogic;
import jp.agentec.abook.abv.launcher.android.R; import jp.agentec.abook.abv.launcher.android.R;
import jp.agentec.abook.abv.ui.common.activity.ABVContentViewActivity; import jp.agentec.abook.abv.ui.common.activity.ABVContentViewActivity;
import jp.agentec.abook.abv.ui.common.appinfo.AppDefType;
import jp.agentec.abook.abv.ui.common.util.PatternStringUtil;
import jp.agentec.abook.abv.ui.viewer.activity.CheckOZDViewActivity;
import jp.agentec.abook.abv.ui.common.util.ABVToastUtil; import jp.agentec.abook.abv.ui.common.util.ABVToastUtil;
import jp.agentec.adf.util.DateTimeFormat; import jp.agentec.adf.util.DateTimeFormat;
import jp.agentec.adf.util.DateTimeUtil; import jp.agentec.adf.util.DateTimeUtil;
import jp.agentec.adf.util.FileUtil; import jp.agentec.adf.util.FileUtil;
import jp.agentec.adf.util.StringUtil; import jp.agentec.adf.util.StringUtil;
import static jp.agentec.abook.abv.cl.util.PreferenceUtil.getUserPref;
/** /**
* Created by leej on 2018/08/31. * Created by leej on 2018/08/31.
*/ */
...@@ -161,7 +166,10 @@ public class ABookCheckWebViewHelper extends ABookHelper { ...@@ -161,7 +166,10 @@ public class ABookCheckWebViewHelper extends ABookHelper {
} }
}; };
context.showProgressView(context.getString(R.string.synchronizing)); // リソースパターンの適用
context.showProgressView(PatternStringUtil.patternToString(context,
R.string.synchronizing,
getUserPref(context, AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
CommonExecutor.execute(new Runnable() { CommonExecutor.execute(new Runnable() {
@Override @Override
public void run() { public void run() {
...@@ -171,7 +179,10 @@ public class ABookCheckWebViewHelper extends ABookHelper { ...@@ -171,7 +179,10 @@ public class ABookCheckWebViewHelper extends ABookHelper {
try { try {
mOperationLogic.updateSyncOperation(operationId, true); mOperationLogic.updateSyncOperation(operationId, true);
if (mOperationLogic.sendTaskReportSendData(operationId, taskKey, taskReportLevel, progressCallback)) { if (mOperationLogic.sendTaskReportSendData(operationId, taskKey, taskReportLevel, progressCallback)) {
context.handleErrorMessageToast(R.string.P005); // リソースパターンの適用
context.handleErrorMessageToast(PatternStringUtil.patternToInt(context,
R.string.P005,
getUserPref(context, AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
} }
} catch (ABVException ex) { } catch (ABVException ex) {
...@@ -179,7 +190,13 @@ public class ABookCheckWebViewHelper extends ABookHelper { ...@@ -179,7 +190,13 @@ public class ABookCheckWebViewHelper extends ABookHelper {
// if (isDirections) { // if (isDirections) {
// context.showSimpleAlertDialog(R.string.app_name, R.string.msg_send_error_task_directions_data); // context.showSimpleAlertDialog(R.string.app_name, R.string.msg_send_error_task_directions_data);
// } else { // } else {
context.showSimpleAlertDialog(R.string.app_name, R.string.msg_send_error_task_report_data); // リソースパターンの適用
context.showSimpleAlertDialog(PatternStringUtil.patternToInt(context,
R.string.app_name,
getUserPref(context, AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)),
PatternStringUtil.patternToInt(context,
R.string.msg_send_error_task_report_data,
getUserPref(context, AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
// } // }
isError = true; isError = true;
} catch (Exception e) { } catch (Exception e) {
...@@ -187,7 +204,13 @@ public class ABookCheckWebViewHelper extends ABookHelper { ...@@ -187,7 +204,13 @@ public class ABookCheckWebViewHelper extends ABookHelper {
// if (isDirections) { // if (isDirections) {
// context.showSimpleAlertDialog(R.string.app_name, R.string.msg_send_error_task_directions_data); // context.showSimpleAlertDialog(R.string.app_name, R.string.msg_send_error_task_directions_data);
// } else { // } else {
context.showSimpleAlertDialog(R.string.app_name, R.string.msg_send_error_task_report_data); // リソースパターンの適用
context.showSimpleAlertDialog(PatternStringUtil.patternToInt(context,
R.string.app_name,
getUserPref(context, AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)),
PatternStringUtil.patternToInt(context,
R.string.msg_send_error_task_report_data,
getUserPref(context, AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
// } // }
isError = true; isError = true;
} finally { } finally {
......
...@@ -14,14 +14,18 @@ import java.util.ArrayList; ...@@ -14,14 +14,18 @@ import java.util.ArrayList;
import jp.agentec.abook.abv.bl.common.Callback; import jp.agentec.abook.abv.bl.common.Callback;
import jp.agentec.abook.abv.bl.common.Constant; import jp.agentec.abook.abv.bl.common.Constant;
import jp.agentec.abook.abv.ui.common.appinfo.AppDefType;
import jp.agentec.abook.abv.ui.common.dialog.ABookAlertDialog; import jp.agentec.abook.abv.ui.common.dialog.ABookAlertDialog;
import jp.agentec.abook.abv.ui.common.util.AlertDialogUtil; import jp.agentec.abook.abv.ui.common.util.AlertDialogUtil;
import jp.agentec.abook.abv.launcher.android.R; import jp.agentec.abook.abv.launcher.android.R;
import jp.agentec.abook.abv.ui.common.util.PatternStringUtil;
import jp.agentec.abook.abv.ui.home.activity.OperationListActivity; import jp.agentec.abook.abv.ui.home.activity.OperationListActivity;
import jp.agentec.abook.abv.ui.viewer.activity.HTMLWebViewActivity; import jp.agentec.abook.abv.ui.viewer.activity.HTMLWebViewActivity;
import jp.agentec.abook.abv.ui.viewer.activity.HTMLXWalkWebViewActivity; import jp.agentec.abook.abv.ui.viewer.activity.HTMLXWalkWebViewActivity;
import static android.content.pm.PackageManager.PERMISSION_GRANTED; import static android.content.pm.PackageManager.PERMISSION_GRANTED;
import static jp.agentec.abook.abv.cl.util.PreferenceUtil.getUserPref;
import static org.chromium.base.ContextUtils.getApplicationContext;
/** /**
* 権限チェック及び設定画面遷移 * 権限チェック及び設定画面遷移
...@@ -94,9 +98,15 @@ public class ABookPermissionHelper { ...@@ -94,9 +98,15 @@ public class ABookPermissionHelper {
if (ContextCompat.checkSelfPermission(mActivity, android.Manifest.permission.READ_EXTERNAL_STORAGE) != PERMISSION_GRANTED || if (ContextCompat.checkSelfPermission(mActivity, android.Manifest.permission.READ_EXTERNAL_STORAGE) != PERMISSION_GRANTED ||
ContextCompat.checkSelfPermission(mActivity, android.Manifest.permission.WRITE_EXTERNAL_STORAGE) != PERMISSION_GRANTED) { ContextCompat.checkSelfPermission(mActivity, android.Manifest.permission.WRITE_EXTERNAL_STORAGE) != PERMISSION_GRANTED) {
if (mActivity instanceof HTMLWebViewActivity || mActivity instanceof HTMLXWalkWebViewActivity || mActivity instanceof OperationListActivity) { if (mActivity instanceof HTMLWebViewActivity || mActivity instanceof HTMLXWalkWebViewActivity || mActivity instanceof OperationListActivity) {
permitionTextResourceId = R.string.msg_permission_dialog_storage_album; // リソースパターンの適用
permitionTextResourceId = PatternStringUtil.patternToInt(getApplicationContext(),
R.string.msg_permission_dialog_storage_album,
getUserPref(getApplicationContext(), AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0));
} else { } else {
permitionTextResourceId = R.string.msg_permission_dialog_storage_update; // リソースパターンの適用
permitionTextResourceId = PatternStringUtil.patternToInt(getApplicationContext(),
R.string.msg_permission_dialog_storage_update,
getUserPref(getApplicationContext(), AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0));
} }
} }
...@@ -105,11 +115,17 @@ public class ABookPermissionHelper { ...@@ -105,11 +115,17 @@ public class ABookPermissionHelper {
// 位置情報 // 位置情報
if (ContextCompat.checkSelfPermission(mActivity, if (ContextCompat.checkSelfPermission(mActivity,
android.Manifest.permission.ACCESS_FINE_LOCATION) != PERMISSION_GRANTED) { android.Manifest.permission.ACCESS_FINE_LOCATION) != PERMISSION_GRANTED) {
permitionTextResourceId = R.string.msg_permission_dialog_location; // リソースパターンの適用
permitionTextResourceId = PatternStringUtil.patternToInt(getApplicationContext(),
R.string.msg_permission_dialog_location,
getUserPref(getApplicationContext(), AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0));
} }
if (ContextCompat.checkSelfPermission(mActivity, if (ContextCompat.checkSelfPermission(mActivity,
android.Manifest.permission.ACCESS_COARSE_LOCATION) != PERMISSION_GRANTED) { android.Manifest.permission.ACCESS_COARSE_LOCATION) != PERMISSION_GRANTED) {
permitionTextResourceId = R.string.msg_permission_dialog_location; // リソースパターンの適用
permitionTextResourceId = PatternStringUtil.patternToInt(getApplicationContext(),
R.string.msg_permission_dialog_location,
getUserPref(getApplicationContext(), AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0));
} }
break; break;
...@@ -117,14 +133,20 @@ public class ABookPermissionHelper { ...@@ -117,14 +133,20 @@ public class ABookPermissionHelper {
// カメラ // カメラ
if (ContextCompat.checkSelfPermission(mActivity, if (ContextCompat.checkSelfPermission(mActivity,
android.Manifest.permission.CAMERA) != PERMISSION_GRANTED) { android.Manifest.permission.CAMERA) != PERMISSION_GRANTED) {
permitionTextResourceId = R.string.msg_permission_dialog_camera; // リソースパターンの適用
permitionTextResourceId = PatternStringUtil.patternToInt(getApplicationContext(),
R.string.msg_permission_dialog_camera,
getUserPref(getApplicationContext(), AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0));
} }
break; break;
case Constant.ABookPermissionType.Audio: case Constant.ABookPermissionType.Audio:
// マイク(オーディオ) // マイク(オーディオ)
if (ContextCompat.checkSelfPermission(mActivity, if (ContextCompat.checkSelfPermission(mActivity,
android.Manifest.permission.RECORD_AUDIO) != PERMISSION_GRANTED) { android.Manifest.permission.RECORD_AUDIO) != PERMISSION_GRANTED) {
permitionTextResourceId = R.string.msg_permission_dialog_mic; // リソースパターンの適用
permitionTextResourceId = PatternStringUtil.patternToInt(getApplicationContext(),
R.string.msg_permission_dialog_mic,
getUserPref(getApplicationContext(), AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0));
} }
break; break;
} }
...@@ -132,7 +154,10 @@ public class ABookPermissionHelper { ...@@ -132,7 +154,10 @@ public class ABookPermissionHelper {
if (permitionTextResourceId > 0) { if (permitionTextResourceId > 0) {
if (showDialogFlg) { if (showDialogFlg) {
ABookAlertDialog dialog = AlertDialogUtil.createABookAlertDialog(mActivity); ABookAlertDialog dialog = AlertDialogUtil.createABookAlertDialog(mActivity);
dialog.setTitle(R.string.title_permission_dialog); // リソースパターンの適用
dialog.setTitle(PatternStringUtil.patternToString(getApplicationContext(),
R.string.title_permission_dialog,
getUserPref(getApplicationContext(), AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
dialog.setMessage(permitionTextResourceId); dialog.setMessage(permitionTextResourceId);
dialog.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() { dialog.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {
@Override @Override
......
...@@ -27,12 +27,14 @@ import jp.agentec.abook.abv.ui.common.appinfo.AppDefType.ViewMode; ...@@ -27,12 +27,14 @@ import jp.agentec.abook.abv.ui.common.appinfo.AppDefType.ViewMode;
import jp.agentec.abook.abv.ui.common.constant.ErrorCode; import jp.agentec.abook.abv.ui.common.constant.ErrorCode;
import jp.agentec.abook.abv.ui.common.constant.ErrorMessage; import jp.agentec.abook.abv.ui.common.constant.ErrorMessage;
import jp.agentec.abook.abv.ui.common.util.ABVToastUtil; import jp.agentec.abook.abv.ui.common.util.ABVToastUtil;
import jp.agentec.abook.abv.ui.common.util.PatternStringUtil;
import jp.agentec.abook.abv.ui.home.activity.OperationListActivity; import jp.agentec.abook.abv.ui.home.activity.OperationListActivity;
import jp.agentec.abook.abv.ui.home.adapter.AbstractOperationAdapter; import jp.agentec.abook.abv.ui.home.adapter.AbstractOperationAdapter;
import jp.agentec.abook.abv.ui.home.adapter.OperationListAdapter; import jp.agentec.abook.abv.ui.home.adapter.OperationListAdapter;
import jp.agentec.abook.abv.ui.home.adapter.OperationPanelAdapter; import jp.agentec.abook.abv.ui.home.adapter.OperationPanelAdapter;
import static jp.agentec.abook.abv.bl.acms.type.OperationType.PANO; import static jp.agentec.abook.abv.bl.acms.type.OperationType.PANO;
import static jp.agentec.abook.abv.cl.util.PreferenceUtil.getUserPref;
/** /**
* Created by leej on 2019/03/06. * Created by leej on 2019/03/06.
...@@ -63,7 +65,7 @@ public class OperationListHelper { ...@@ -63,7 +65,7 @@ public class OperationListHelper {
private List<OperationDto> filterOperationList() { private List<OperationDto> filterOperationList() {
try { try {
String reportTypeStr = PreferenceUtil.getUserPref(mAppActivity, AppDefType.UserPrefKey.OPERATION_REPORT_TYPES, null); String reportTypeStr = getUserPref(mAppActivity, AppDefType.UserPrefKey.OPERATION_REPORT_TYPES, null);
operationDtoList = mOperationLogic.getRefreshOperation(mAppActivity.mSearchWord, mAppActivity.mStartDateStr, mAppActivity.mEndDateStr, reportTypeStr); operationDtoList = mOperationLogic.getRefreshOperation(mAppActivity.mSearchWord, mAppActivity.mStartDateStr, mAppActivity.mEndDateStr, reportTypeStr);
} catch (Exception e) { } catch (Exception e) {
Logger.e(TAG, "findOperationList", e); Logger.e(TAG, "findOperationList", e);
...@@ -102,9 +104,19 @@ public class OperationListHelper { ...@@ -102,9 +104,19 @@ public class OperationListHelper {
}); });
// ラベル変更 // ラベル変更
mPullToRefreshGridView.getLoadingLayoutProxy().setRefreshingLabel(mAppActivity.getString(R.string.updating)); mAppActivity.getIntent();
mPullToRefreshGridView.getLoadingLayoutProxy().setPullLabel(mAppActivity.getString(R.string.pull_to_refresh_label)); // リソースパターンの適用
mPullToRefreshGridView.getLoadingLayoutProxy().setReleaseLabel(mAppActivity.getString(R.string.release_to_refresh_label)); mPullToRefreshGridView.getLoadingLayoutProxy().setRefreshingLabel(mAppActivity.getString(PatternStringUtil.patternToInt(mAppActivity.getApplicationContext(),
R.string.updating,
getUserPref(mAppActivity.getApplicationContext(), AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0))));
// リソースパターンの適用
mPullToRefreshGridView.getLoadingLayoutProxy().setPullLabel(mAppActivity.getString(PatternStringUtil.patternToInt(mAppActivity.getApplicationContext(),
R.string.pull_to_refresh_label,
getUserPref(mAppActivity.getApplicationContext(), AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0))));
// リソースパターンの適用
mPullToRefreshGridView.getLoadingLayoutProxy().setReleaseLabel(mAppActivity.getString(PatternStringUtil.patternToInt(mAppActivity.getApplicationContext(),
R.string.release_to_refresh_label,
getUserPref(mAppActivity.getApplicationContext(), AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0))));
child.setSelector(mAppActivity.getResources().getDrawable(R.drawable.grid_selecter)); child.setSelector(mAppActivity.getResources().getDrawable(R.drawable.grid_selecter));
...@@ -188,9 +200,17 @@ public class OperationListHelper { ...@@ -188,9 +200,17 @@ public class OperationListHelper {
}); });
// ラベル変更 // ラベル変更
mPullToRefreshListView.getLoadingLayoutProxy().setRefreshingLabel(mAppActivity.getString(R.string.updating)); mPullToRefreshListView.getLoadingLayoutProxy().setRefreshingLabel(mAppActivity.getString(PatternStringUtil.patternToInt(mAppActivity.getApplicationContext(),
mPullToRefreshListView.getLoadingLayoutProxy().setPullLabel(mAppActivity.getString(R.string.pull_to_refresh_label)); R.string.updating,
mPullToRefreshListView.getLoadingLayoutProxy().setReleaseLabel(mAppActivity.getString(R.string.release_to_refresh_label)); getUserPref(mAppActivity.getApplicationContext(), AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0))));
// リソースパターンの適用
mPullToRefreshListView.getLoadingLayoutProxy().setPullLabel(mAppActivity.getString(PatternStringUtil.patternToInt(mAppActivity.getApplicationContext(),
R.string.pull_to_refresh_label,
getUserPref(mAppActivity.getApplicationContext(), AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0))));
// リソースパターンの適用
mPullToRefreshListView.getLoadingLayoutProxy().setReleaseLabel(mAppActivity.getString(PatternStringUtil.patternToInt(mAppActivity.getApplicationContext(),
R.string.release_to_refresh_label,
getUserPref(mAppActivity.getApplicationContext(), AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0))));
// リストのクリック処理 // リストのクリック処理
mPullToRefreshListView.setOnItemClickListener(new AdapterView.OnItemClickListener() { mPullToRefreshListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
......
...@@ -23,6 +23,8 @@ import jp.agentec.abook.abv.bl.common.constant.ABookKeys; ...@@ -23,6 +23,8 @@ import jp.agentec.abook.abv.bl.common.constant.ABookKeys;
import jp.agentec.abook.abv.bl.common.exception.AcmsException; import jp.agentec.abook.abv.bl.common.exception.AcmsException;
import jp.agentec.abook.abv.bl.common.exception.NetworkDisconnectedException; import jp.agentec.abook.abv.bl.common.exception.NetworkDisconnectedException;
import jp.agentec.abook.abv.bl.common.log.Logger; import jp.agentec.abook.abv.bl.common.log.Logger;
import jp.agentec.abook.abv.ui.common.appinfo.AppDefType;
import jp.agentec.abook.abv.ui.common.util.PatternStringUtil;
import jp.agentec.abook.abv.ui.home.helper.ActivityHandlingHelper; import jp.agentec.abook.abv.ui.home.helper.ActivityHandlingHelper;
import jp.agentec.abook.abv.ui.home.helper.OzdFileHelper; import jp.agentec.abook.abv.ui.home.helper.OzdFileHelper;
import jp.agentec.abook.abv.launcher.android.PDFFileProvider; import jp.agentec.abook.abv.launcher.android.PDFFileProvider;
...@@ -39,6 +41,9 @@ import oz.api.OZReportAPI; ...@@ -39,6 +41,9 @@ import oz.api.OZReportAPI;
import oz.api.OZReportCommandListener; import oz.api.OZReportCommandListener;
import oz.api.OZReportViewer; import oz.api.OZReportViewer;
import static jp.agentec.abook.abv.cl.util.PreferenceUtil.getUserPref;
import static org.chromium.base.ContextUtils.getApplicationContext;
/** /**
* ABook Report(仮)ビュアー * ABook Report(仮)ビュアー
* ① 原本ozdファイル (暗号化されてない) * ① 原本ozdファイル (暗号化されてない)
...@@ -106,15 +111,25 @@ public class CheckOZDViewActivity extends ABVContentViewActivity { ...@@ -106,15 +111,25 @@ public class CheckOZDViewActivity extends ABVContentViewActivity {
String rearTitle = ""; String rearTitle = "";
if (mDirectionFlg) { if (mDirectionFlg) {
frontTitle = getRString(R.string.title_operation_direction_form); // リソースパターンの適用
frontTitle = PatternStringUtil.patternToString(getApplicationContext(),
R.string.title_operation_direction_form,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0));
} else { } else {
frontTitle = getRString(R.string.title_operation_report_form); frontTitle = PatternStringUtil.patternToString(getApplicationContext(),
R.string.title_operation_report_form,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0));
} }
if (mReadOnlyFlg) { if (mReadOnlyFlg) {
rearTitle = getRString(R.string.title_preview); // リソースパターンの適用
rearTitle = PatternStringUtil.patternToString(getApplicationContext(),
R.string.title_preview,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0));
} else { } else {
rearTitle = getRString(R.string.title_input); rearTitle = PatternStringUtil.patternToString(getApplicationContext(),
R.string.title_input,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0));
} }
TextView tvTitle = (TextView) findViewById(R.id.tv_title); TextView tvTitle = (TextView) findViewById(R.id.tv_title);
...@@ -163,7 +178,13 @@ public class CheckOZDViewActivity extends ABVContentViewActivity { ...@@ -163,7 +178,13 @@ public class CheckOZDViewActivity extends ABVContentViewActivity {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
mButtonStatus = R.id.btn_temp_save; // HTML側の分岐処理を行うため変数に値を渡す mButtonStatus = R.id.btn_temp_save; // HTML側の分岐処理を行うため変数に値を渡す
showSaveConfirmAlert(R.string.temp_save, R.string.temp_save_info); // リソースパターンの適用
showSaveConfirmAlert(PatternStringUtil.patternToInt(getApplicationContext(),
R.string.temp_save,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)),
PatternStringUtil.patternToInt(getApplicationContext(),
R.string.temp_save_info,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
} }
}); });
...@@ -172,7 +193,13 @@ public class CheckOZDViewActivity extends ABVContentViewActivity { ...@@ -172,7 +193,13 @@ public class CheckOZDViewActivity extends ABVContentViewActivity {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
mButtonStatus = R.id.btn_save; // HTML側の分岐処理を行うため変数に値を渡す mButtonStatus = R.id.btn_save; // HTML側の分岐処理を行うため変数に値を渡す
showSaveConfirmAlert(R.string.save, R.string.save_info); // リソースパターンの適用
showSaveConfirmAlert(PatternStringUtil.patternToInt(getApplicationContext(),
R.string.save,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)),
PatternStringUtil.patternToInt(getApplicationContext(),
R.string.save_info,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
} }
}); });
...@@ -181,7 +208,13 @@ public class CheckOZDViewActivity extends ABVContentViewActivity { ...@@ -181,7 +208,13 @@ public class CheckOZDViewActivity extends ABVContentViewActivity {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
mButtonStatus = R.id.btn_delete; // HTML側の分岐処理を行うため変数に値を渡す mButtonStatus = R.id.btn_delete; // HTML側の分岐処理を行うため変数に値を渡す
showSaveConfirmAlert(R.string.delete, R.string.delete_info); // リソースパターンの適用
showSaveConfirmAlert(PatternStringUtil.patternToInt(getApplicationContext(),
R.string.delete,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)),
PatternStringUtil.patternToInt(getApplicationContext(),
R.string.delete_info,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
} }
}); });
...@@ -301,7 +334,10 @@ public class CheckOZDViewActivity extends ABVContentViewActivity { ...@@ -301,7 +334,10 @@ public class CheckOZDViewActivity extends ABVContentViewActivity {
return true; return true;
} else { } else {
Logger.w(TAG, "mOzReportViewer doesn't exist"); Logger.w(TAG, "mOzReportViewer doesn't exist");
ABVToastUtil.showMakeText(mContext, R.string.no_ozd_viewer, Toast.LENGTH_SHORT); // リソースパターンの適用
ABVToastUtil.showMakeText(mContext, PatternStringUtil.patternToInt(getApplicationContext(),
R.string.no_ozd_viewer,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), Toast.LENGTH_SHORT);
return false; return false;
} }
} }
...@@ -590,7 +626,10 @@ public class CheckOZDViewActivity extends ABVContentViewActivity { ...@@ -590,7 +626,10 @@ public class CheckOZDViewActivity extends ABVContentViewActivity {
if (!mReadOnlyFlg) { if (!mReadOnlyFlg) {
//OZD臨時保存処理 //OZD臨時保存処理
if (!saveTempOzdFile()) { if (!saveTempOzdFile()) {
ABVToastUtil.showMakeText(mContext, R.string.msg_ozd_save_fail, Toast.LENGTH_LONG); // リソースパターンの適用
ABVToastUtil.showMakeText(mContext, PatternStringUtil.patternToString(getApplicationContext(),
R.string.msg_ozd_save_fail,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), Toast.LENGTH_LONG);
return; return;
} }
} }
......
...@@ -130,6 +130,7 @@ import jp.agentec.abook.abv.ui.common.helper.ABVViewUnbindHelper; ...@@ -130,6 +130,7 @@ import jp.agentec.abook.abv.ui.common.helper.ABVViewUnbindHelper;
import jp.agentec.abook.abv.ui.common.util.ABVToastUtil; import jp.agentec.abook.abv.ui.common.util.ABVToastUtil;
import jp.agentec.abook.abv.ui.common.util.AlertDialogUtil; import jp.agentec.abook.abv.ui.common.util.AlertDialogUtil;
import jp.agentec.abook.abv.ui.common.util.ClipboardUtil; import jp.agentec.abook.abv.ui.common.util.ClipboardUtil;
import jp.agentec.abook.abv.ui.common.util.PatternStringUtil;
import jp.agentec.abook.abv.ui.common.view.ABVEditText; import jp.agentec.abook.abv.ui.common.view.ABVEditText;
import jp.agentec.abook.abv.ui.common.view.ABVPopupListWindow; import jp.agentec.abook.abv.ui.common.view.ABVPopupListWindow;
import jp.agentec.abook.abv.ui.common.vo.Size; import jp.agentec.abook.abv.ui.common.vo.Size;
...@@ -851,6 +852,17 @@ public class ContentViewActivity extends ABVContentViewActivity { ...@@ -851,6 +852,17 @@ public class ContentViewActivity extends ABVContentViewActivity {
mShowedPopupWindow = new ABVPopupListWindow(ContentViewActivity.this, R.layout.popup_meetingroom_setting); mShowedPopupWindow = new ABVPopupListWindow(ContentViewActivity.this, R.layout.popup_meetingroom_setting);
mShowedPopupWindow.setWidth(getRDimensionSize(R.dimen.popup_size_xlarge)); mShowedPopupWindow.setWidth(getRDimensionSize(R.dimen.popup_size_xlarge));
// リソースパターンを適用
TextView meetingRoomSettingTitle = (TextView) mShowedPopupWindow.findViewById(R.id.meetingroom_setting_title);
meetingRoomSettingTitle.setText(PatternStringUtil.patternToInt(getApplicationContext(),
R.string.meetingroom_setting,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
TextView markignShareSettingTitle = (TextView) mShowedPopupWindow.findViewById(R.id.marking_share_setting_title);
markignShareSettingTitle.setText(PatternStringUtil.patternToInt(getApplicationContext(),
R.string.marking_share_setting,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
// 司会者マーキング共有設定(参加者モード場合は非表示) // 司会者マーキング共有設定(参加者モード場合は非表示)
CheckedTextView markingShareCheck = (CheckedTextView) mShowedPopupWindow.findViewById(R.id.checkedMarkingShare); CheckedTextView markingShareCheck = (CheckedTextView) mShowedPopupWindow.findViewById(R.id.checkedMarkingShare);
markingShareCheck.setVisibility(View.GONE); markingShareCheck.setVisibility(View.GONE);
...@@ -1090,6 +1102,12 @@ public class ContentViewActivity extends ABVContentViewActivity { ...@@ -1090,6 +1102,12 @@ public class ContentViewActivity extends ABVContentViewActivity {
CheckedTextView markingShareCheck = (CheckedTextView) mShowedPopupWindow.findViewById(R.id.checkedMarkingShare); CheckedTextView markingShareCheck = (CheckedTextView) mShowedPopupWindow.findViewById(R.id.checkedMarkingShare);
boolean chairmanMarkingShareFlag = PreferenceUtil.get(ContentViewActivity.this, AppDefType.UserPrefKey.CHAIRMAN_MARKING_SHARE, false); boolean chairmanMarkingShareFlag = PreferenceUtil.get(ContentViewActivity.this, AppDefType.UserPrefKey.CHAIRMAN_MARKING_SHARE, false);
markingShareCheck.setChecked(chairmanMarkingShareFlag); markingShareCheck.setChecked(chairmanMarkingShareFlag);
// リソースパターンを適用
markingShareCheck.setText(PatternStringUtil.patternToInt(getApplicationContext(),
R.string.chairman_marking_share,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
markingShareCheck.setOnClickListener(new OnClickListener() { markingShareCheck.setOnClickListener(new OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
...@@ -1104,6 +1122,12 @@ public class ContentViewActivity extends ABVContentViewActivity { ...@@ -1104,6 +1122,12 @@ public class ContentViewActivity extends ABVContentViewActivity {
CheckedTextView markingAutoSaveCheck = (CheckedTextView) mShowedPopupWindow.findViewById(R.id.checkedMarkingAutoSave); CheckedTextView markingAutoSaveCheck = (CheckedTextView) mShowedPopupWindow.findViewById(R.id.checkedMarkingAutoSave);
boolean meetingMarkingAutoSaveFlag = PreferenceUtil.get(ContentViewActivity.this, AppDefType.UserPrefKey.MEETING_MARKING_AUTO_SAVE, false); boolean meetingMarkingAutoSaveFlag = PreferenceUtil.get(ContentViewActivity.this, AppDefType.UserPrefKey.MEETING_MARKING_AUTO_SAVE, false);
markingAutoSaveCheck.setChecked(meetingMarkingAutoSaveFlag); markingAutoSaveCheck.setChecked(meetingMarkingAutoSaveFlag);
// リソースパターンを適用
markingShareCheck.setText(PatternStringUtil.patternToInt(getApplicationContext(),
R.string.marking_share_auto_save,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
markingAutoSaveCheck.setOnClickListener(new OnClickListener() { markingAutoSaveCheck.setOnClickListener(new OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
...@@ -2625,12 +2649,18 @@ public class ContentViewActivity extends ABVContentViewActivity { ...@@ -2625,12 +2649,18 @@ public class ContentViewActivity extends ABVContentViewActivity {
// プロジェクト関連資料なのかをチェック // プロジェクト関連資料なのかをチェック
if (ActivityHandlingHelper.getInstance().isExistCommonContent(getContentId())) { if (ActivityHandlingHelper.getInstance().isExistCommonContent(getContentId())) {
if (!ActivityHandlingHelper.getInstance().isExistCommonContent(linkContentId)) { if (!ActivityHandlingHelper.getInstance().isExistCommonContent(linkContentId)) {
ABVToastUtil.showMakeText(getApplicationContext(), R.string.msg_not_common_content, Toast.LENGTH_SHORT); // リソースパターンの適用
ABVToastUtil.showMakeText(getApplicationContext(), PatternStringUtil.patternToString(getApplicationContext(),
R.string.msg_not_common_content,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), Toast.LENGTH_SHORT);
break; break;
} }
} else if (ActivityHandlingHelper.getInstance().isExistRelatedContent(getContentId(), mOperationId)) { } else if (ActivityHandlingHelper.getInstance().isExistRelatedContent(getContentId(), mOperationId)) {
if (!ActivityHandlingHelper.getInstance().isExistRelatedContent(linkContentId, mOperationId)) { if (!ActivityHandlingHelper.getInstance().isExistRelatedContent(linkContentId, mOperationId)) {
ABVToastUtil.showMakeText(getApplicationContext(), R.string.msg_not_related_content, Toast.LENGTH_SHORT); // リソースパターンの適用
ABVToastUtil.showMakeText(getApplicationContext(), PatternStringUtil.patternToString(getApplicationContext(),
R.string.msg_not_related_content,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), Toast.LENGTH_SHORT);
break; break;
} }
} }
......
...@@ -54,6 +54,7 @@ import jp.agentec.abook.abv.ui.common.appinfo.AppDefType; ...@@ -54,6 +54,7 @@ import jp.agentec.abook.abv.ui.common.appinfo.AppDefType;
import jp.agentec.abook.abv.ui.common.constant.ErrorCode; import jp.agentec.abook.abv.ui.common.constant.ErrorCode;
import jp.agentec.abook.abv.ui.common.constant.ErrorMessage; import jp.agentec.abook.abv.ui.common.constant.ErrorMessage;
import jp.agentec.abook.abv.ui.common.util.ABVToastUtil; import jp.agentec.abook.abv.ui.common.util.ABVToastUtil;
import jp.agentec.abook.abv.ui.common.util.PatternStringUtil;
import jp.agentec.abook.abv.ui.common.view.ABVPopupListWindow; import jp.agentec.abook.abv.ui.common.view.ABVPopupListWindow;
import jp.agentec.abook.abv.ui.home.helper.ActivityHandlingHelper; import jp.agentec.abook.abv.ui.home.helper.ActivityHandlingHelper;
...@@ -309,12 +310,18 @@ public class HTMLXWalkWebViewActivity extends ParentWebViewActivity { ...@@ -309,12 +310,18 @@ public class HTMLXWalkWebViewActivity extends ParentWebViewActivity {
Long dstContentId = Long.valueOf(param.get("contentId")); Long dstContentId = Long.valueOf(param.get("contentId"));
if (ActivityHandlingHelper.getInstance().isExistCommonContent(contentId)) { if (ActivityHandlingHelper.getInstance().isExistCommonContent(contentId)) {
if (!ActivityHandlingHelper.getInstance().isExistCommonContent(dstContentId)) { if (!ActivityHandlingHelper.getInstance().isExistCommonContent(dstContentId)) {
ABVToastUtil.showMakeText(getApplicationContext(), R.string.msg_not_common_content, Toast.LENGTH_SHORT); // リソースパターンの適用
ABVToastUtil.showMakeText(getApplicationContext(), PatternStringUtil.patternToInt(getApplicationContext(),
R.string.msg_not_common_content,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), Toast.LENGTH_SHORT);
return true; return true;
} }
} else if (ActivityHandlingHelper.getInstance().isExistRelatedContent(contentId, mOperationId)) { } else if (ActivityHandlingHelper.getInstance().isExistRelatedContent(contentId, mOperationId)) {
if (!ActivityHandlingHelper.getInstance().isExistRelatedContent(dstContentId, mOperationId)) { if (!ActivityHandlingHelper.getInstance().isExistRelatedContent(dstContentId, mOperationId)) {
ABVToastUtil.showMakeText(getApplicationContext(), R.string.msg_not_related_content, Toast.LENGTH_SHORT); // リソースパターンの適用
ABVToastUtil.showMakeText(getApplicationContext(), PatternStringUtil.patternToInt(getApplicationContext(),
R.string.msg_not_related_content,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), Toast.LENGTH_SHORT);
return true; return true;
} }
} }
...@@ -337,7 +344,10 @@ public class HTMLXWalkWebViewActivity extends ParentWebViewActivity { ...@@ -337,7 +344,10 @@ public class HTMLXWalkWebViewActivity extends ParentWebViewActivity {
} }
}); });
if (ret != null && !ret.startsWith(ABookKeys.OK)) { if (ret != null && !ret.startsWith(ABookKeys.OK)) {
showSimpleAlertDialog(getRString(R.string.error), ret); // リソースパターンの適用
showSimpleAlertDialog(PatternStringUtil.patternToString(getApplicationContext(),
R.string.error,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)), ret);
} }
} else if (url.contains(ABookKeys.ABOOK_CHECK_API)) { } else if (url.contains(ABookKeys.ABOOK_CHECK_API)) {
commonShouldOverrideUrlLoading(uri, null); commonShouldOverrideUrlLoading(uri, null);
......
...@@ -36,6 +36,7 @@ import jp.agentec.abook.abv.ui.common.constant.ErrorCode; ...@@ -36,6 +36,7 @@ import jp.agentec.abook.abv.ui.common.constant.ErrorCode;
import jp.agentec.abook.abv.ui.common.constant.ErrorMessage; import jp.agentec.abook.abv.ui.common.constant.ErrorMessage;
import jp.agentec.abook.abv.ui.common.dialog.ABookAlertDialog; import jp.agentec.abook.abv.ui.common.dialog.ABookAlertDialog;
import jp.agentec.abook.abv.ui.common.util.AlertDialogUtil; import jp.agentec.abook.abv.ui.common.util.AlertDialogUtil;
import jp.agentec.abook.abv.ui.common.util.PatternStringUtil;
import jp.agentec.abook.abv.ui.home.helper.ABookCheckWebViewHelper; import jp.agentec.abook.abv.ui.home.helper.ABookCheckWebViewHelper;
import jp.agentec.abook.abv.ui.home.helper.ActivityHandlingHelper; import jp.agentec.abook.abv.ui.home.helper.ActivityHandlingHelper;
import jp.agentec.abook.abv.ui.home.helper.ContentViewHelper; import jp.agentec.abook.abv.ui.home.helper.ContentViewHelper;
...@@ -96,8 +97,15 @@ public class ParentWebViewActivity extends ABVContentViewActivity { ...@@ -96,8 +97,15 @@ public class ParentWebViewActivity extends ABVContentViewActivity {
// エラーのため、空のURLをロードさせ、白い画面で表示させる // エラーのため、空のURLをロードさせ、白い画面で表示させる
webViewLoadUrl(""); webViewLoadUrl("");
ABookAlertDialog alertDialog = AlertDialogUtil.createAlertDialog(this, R.string.app_name); ABookAlertDialog alertDialog = AlertDialogUtil.createAlertDialog(this, R.string.app_name);
alertDialog.setMessage(String.format(getString(R.string.error_msg_open_pano_edit), statusCode + "")); // リソースパターンの適用
alertDialog.setPositiveButton(R.string.ok, alertDialog.setMessage(String.format(PatternStringUtil.patternToString(getApplicationContext(),
R.string.error_msg_open_pano_edit,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)),
statusCode + ""));
// リソースパターンの適用
alertDialog.setPositiveButton(PatternStringUtil.patternToInt(getApplicationContext(),
R.string.ok,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)),
new DialogInterface.OnClickListener() { new DialogInterface.OnClickListener() {
@Override @Override
public void onClick(DialogInterface dialog, int which) { public void onClick(DialogInterface dialog, int which) {
...@@ -224,15 +232,23 @@ public class ParentWebViewActivity extends ABVContentViewActivity { ...@@ -224,15 +232,23 @@ public class ParentWebViewActivity extends ABVContentViewActivity {
// 画像 // 画像
try { try {
final Uri responseUri = attachmentImageProcessing(result); final Uri responseUri = attachmentImageProcessing(result);
ABookAlertDialog alertDialog = AlertDialogUtil.createAlertDialog(this, R.string.pano_edit); // リソースパターンの適用
alertDialog.setMessage(R.string.msg_confirm_entry_scene); ABookAlertDialog alertDialog = AlertDialogUtil.createAlertDialog(this, PatternStringUtil.patternToInt(getApplicationContext(),
R.string.pano_edit,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
alertDialog.setMessage(PatternStringUtil.patternToInt(getApplicationContext(),
R.string.msg_confirm_entry_scene,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
alertDialog.setNegativeButton(R.string.cancel, null); alertDialog.setNegativeButton(R.string.cancel, null);
alertDialog.setPositiveButton(R.string.ok, alertDialog.setPositiveButton(R.string.ok,
new DialogInterface.OnClickListener() { new DialogInterface.OnClickListener() {
@Override @Override
public void onClick(DialogInterface dialog, int which) { public void onClick(DialogInterface dialog, int which) {
dialog.dismiss(); dialog.dismiss();
showProgressView(getResources().getString(R.string.msg_common_processing)); // リソースパターンの適用
showProgressView(PatternStringUtil.patternToString(getApplicationContext(),
R.string.msg_common_processing,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
CommonExecutor.execute(new Runnable() { CommonExecutor.execute(new Runnable() {
@Override @Override
public void run() { public void run() {
...@@ -314,10 +330,17 @@ public class ParentWebViewActivity extends ABVContentViewActivity { ...@@ -314,10 +330,17 @@ public class ParentWebViewActivity extends ABVContentViewActivity {
* シーン追加API通信で失敗時のダイアログ表示 * シーン追加API通信で失敗時のダイアログ表示
*/ */
private void showFailedSceneApiDialog() { private void showFailedSceneApiDialog() {
ABookAlertDialog alertDialog = AlertDialogUtil.createAlertDialog(this, R.string.pano_edit); // リソースパターンの適用
alertDialog.setMessage(R.string.msg_sence_regist_api_failed); ABookAlertDialog alertDialog = AlertDialogUtil.createAlertDialog(getApplicationContext(), PatternStringUtil.patternToInt(getApplicationContext(),
alertDialog.setPositiveButton(R.string.ok, R.string.pano_edit,
new DialogInterface.OnClickListener() { getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
alertDialog.setMessage(PatternStringUtil.patternToInt(getApplicationContext(),
R.string.msg_sence_regist_api_failed,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
alertDialog.setPositiveButton(PatternStringUtil.patternToInt(getApplicationContext(),
R.string.ok,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)),
new DialogInterface.OnClickListener() {
@Override @Override
public void onClick(DialogInterface dialog, int which) { public void onClick(DialogInterface dialog, int which) {
dialog.dismiss(); dialog.dismiss();
......
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