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 {
public ArrayList<ContentDto> contentVersions;
public String fetchDate;
public static final String ResourcePatternType = "resourcePatternType"; // 文言リソースパターン
public int resourcePatternType; // 文言リソースパターン変数
public ContentVersionsJSON(String jsonString) throws AcmsException {
super(jsonString);
}
@Override
protected void parse(JSONObject json) throws JSONValidationException {
// 取得したJSONから事業者リソースパターンを取得する
if (json.has(ResourcePatternType)) {
resourcePatternType = json.getInt(ResourcePatternType);
}
if (json.has(FetchDate)) {
fetchDate = json.getString(FetchDate);
}
......
......@@ -59,6 +59,9 @@ public class ABVEnvironment {
// ダウンロード作業が完了したあと、テーブルに値を更新する。その後、再びクリアするようにする
public String tempContentVersionLastFetchDate = "";
// Serverから取得したcontentVersion時のリソースパターンを一時的に保存するための変数
public int resourcePatternType;
////////////////////////////// 定数 //////////////////////////////////
private static final String ServerTimeKey = "ABook";
......
......@@ -265,6 +265,9 @@ public class ContentRefresher {
return false;
}
// リソースパターンの値を取得する
ABVEnvironment.getInstance().resourcePatternType = json.resourcePatternType;
// 一時値を保存。ダウンロード処理が完了したあとにlastFetchDateを更新
String fetchDate = json.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 @@
android:text="@string/login"
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>
......
......@@ -6,30 +6,6 @@
android:background="@color/background"
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
android:layout_width="match_parent"
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 @@
</string-array>
<string-array name="operation_report_types">
<item>報告</item>
<item>定期点検</item>
<item>報告(回答)</item>
<item>Report</item>
<item>Routine</item>
<item>ReportReply</item>
</string-array>
</resources>
\ No newline at end of file
......@@ -104,10 +104,6 @@
<item>2</item>
<item>3</item>
</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">
<item>0</item>
<item>1</item>
......
......@@ -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.NaviConsts;
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.DisplayUtil;
import jp.agentec.abook.abv.ui.common.util.Initializer;
......
......@@ -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.util.ABVToastUtil;
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.home.helper.ABookCheckWebViewHelper;
import jp.agentec.abook.abv.ui.home.helper.ABookPermissionHelper;
......@@ -658,8 +659,13 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
@Override
public void onClick(View v) {
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.patternToInt(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.setPositiveButton(R.string.ok,
new DialogInterface.OnClickListener() {
......@@ -749,8 +755,14 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
public void onClickOperationHome(View v) {
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.setPositiveButton(R.string.ok,
new DialogInterface.OnClickListener() {
......@@ -881,7 +893,10 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
try {
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,
......@@ -998,8 +1013,13 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
} else if (mCmd.equals(ABookKeys.CMD_SCENE_REGIST)) {
String successFlg = abookCheckParam.get(ABookKeys.SUCCESS_FLG);
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,
new DialogInterface.OnClickListener() {
@Override
......@@ -1143,7 +1163,9 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
// 報告(回答)の場合
if (taskReportLevel > 0) {
// #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 {
} else {
Logger.w(TAG,"onGetLocationFailed AccessFineLocation false");
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;
import jp.agentec.abook.abv.bl.logic.AbstractLogic;
import jp.agentec.abook.abv.bl.logic.OperationLogic;
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.constant.ErrorMessage;
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.PatternStringUtil;
import jp.agentec.abook.abv.ui.home.activity.OperationListActivity;
import jp.agentec.abook.abv.ui.home.helper.ActivityHandlingHelper;
import jp.agentec.adf.util.StringUtil;
......@@ -27,28 +29,47 @@ public class ShowPushMessageDailogActivity extends ABVUIActivity {
if (operationId > 0) {
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
public void onClick(DialogInterface dialog, int whichButton) {
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()) {
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 {
OperationLogic mOperationLogic = AbstractLogic.getLogic(OperationLogic.class);
OperationDto operationDto = mOperationLogic.getOperation(operationId);
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) {
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 {
OperationListActivity operationListActivity = ActivityHandlingHelper.getInstance().getPreviousOperationListActivity();
if (operationListActivity != null) {
operationListActivity.startTaskDirectionOrReportView(operationDto);
} 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 {
String VIEW_MODE = "viewMode";
String OPERATION_REPORT_TYPES = "operationReportTypes";
String RESOURCE_PATTERN_TYPE = "resourcePatternType"; // 文言リソースパターン
}
/**
......
package jp.agentec.abook.abv.ui.common.constant;
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 {
ERROR(R.string.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_P003(R.string.P003),
P_E_ACMS_P004(R.string.P004);
// リソースパターンの適用
P_E_ACMS_P001(PatternStringUtil.patternToInt(getApplicationContext(),
R.string.P001,
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;
......
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;
import jp.agentec.abook.abv.ui.common.helper.ProgressDialogHelper;
import jp.agentec.abook.abv.ui.common.util.ABVToastUtil;
import jp.agentec.abook.abv.ui.common.util.AlertDialogUtil;
import jp.agentec.abook.abv.ui.common.util.PatternStringUtil;
import jp.agentec.abook.abv.ui.home.helper.ABookPermissionHelper;
import jp.agentec.adf.util.DateTimeFormat;
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 {
private static final String TAG = "ABookSettingActivity";
......@@ -266,7 +271,10 @@ public class ABookSettingFragment extends PreferenceFragment {
}
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() {
@Override
public boolean onPreferenceClick(Preference preference) {
......
......@@ -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.util.ABVToastUtil;
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.vo.Size;
import jp.agentec.abook.abv.ui.home.helper.ActivityHandlingHelper;
......@@ -784,7 +785,10 @@ public class GuideViewActivity extends ABVContentViewActivity {
}
});
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, ViewGroup.LayoutParams.WRAP_CONTENT);
......
......@@ -182,7 +182,6 @@ public class LoginActivity extends ABVLoginActivity {
ErrorMessage.showErrorMessageDialog(this, R.string.app_name, ErrorCode.L110);
}
}
findViewById(R.id.guestLayout).setVisibility(View.GONE);
}
@Override
......
......@@ -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.launcher.android.R;
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.dialog.ABookAlertDialog;
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.adf.util.StringUtil;
import static jp.agentec.abook.abv.cl.util.PreferenceUtil.getUserPref;
public class OperationMeetingListActivity extends ABVUIActivity {
private static final String TAG = "OperationMeetingListActivity";
private String mSkey;
......@@ -180,7 +184,14 @@ public class OperationMeetingListActivity extends ABVUIActivity {
if (mMeetingManager.isConnected()) { // 入室している場合(退室ボタン)
if (mMeetingManager.isOwner()) { // 司会者の場合
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() {
@Override
public void onClick(DialogInterface dialog, int whichButton) {
......@@ -214,11 +225,17 @@ public class OperationMeetingListActivity extends ABVUIActivity {
TextView titleTxt = (TextView) mMeetingListLayout.findViewById(R.id.meeting_list_title);
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);
mLeaveBtn.setVisibility(View.VISIBLE);
} 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);
mLeaveBtn.setVisibility(View.GONE);
}
......@@ -286,9 +303,15 @@ public class OperationMeetingListActivity extends ABVUIActivity {
} else {
progressBar.setVisibility(View.GONE);
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 {
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 {
TextView passwordSetTxt = (TextView) convertView.findViewById(R.id.password_set);
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 {
passwordSetTxt.setText(R.string.not_exist);
// リソースパターンの適用
passwordSetTxt.setText(PatternStringUtil.patternToString(getApplicationContext(),
R.string.not_exist,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
}
if (isNormalSize()) {
......@@ -680,7 +709,10 @@ public class OperationMeetingListActivity extends ABVUIActivity {
TextView titleTxt = (TextView) mMeetingListLayout.findViewById(R.id.meeting_list_title);
mCloseBtn = (Button) mMeetingListLayout.findViewById(R.id.close);
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);
final MeetingDto enteredMeetingDto = mMeetingManager.getJoinedMeetingDto();
......@@ -704,9 +736,15 @@ public class OperationMeetingListActivity extends ABVUIActivity {
TextView enteredPasswordSetTxt = (TextView) mMeetingEnteredInfoLayout.findViewById(R.id.entered_room_password_set);
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 {
enteredPasswordSetTxt.setText(R.string.not_exist);
// リソースパターンの適用
enteredPasswordSetTxt.setText(PatternStringUtil.patternToString(getApplicationContext(),
R.string.not_exist,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
}
if (isNormalSize()) {
......@@ -723,7 +761,10 @@ public class OperationMeetingListActivity extends ABVUIActivity {
mLeaveBtn.setVisibility(View.VISIBLE);
}
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);
mMeetingEnteredInfoLayout.setVisibility(View.GONE);
mLeaveBtn.setVisibility(View.GONE);
......
......@@ -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.launcher.android.R;
import jp.agentec.abook.abv.ui.common.activity.ABVUIActivity;
import jp.agentec.abook.abv.ui.common.appinfo.AppDefType;
import jp.agentec.abook.abv.ui.common.constant.ErrorCode;
import jp.agentec.abook.abv.ui.common.constant.ErrorMessage;
import jp.agentec.abook.abv.ui.common.dialog.ABookAlertDialog;
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.PatternStringUtil;
import jp.agentec.abook.abv.ui.home.adapter.OperationRelatedContentSectionAdapter;
import jp.agentec.abook.abv.ui.home.helper.ActivityHandlingHelper;
......@@ -83,9 +85,14 @@ public class OperationRelatedContentActivity extends ABVUIActivity {
llOperationName.setVisibility(View.GONE);
LinearLayout llLine = (LinearLayout) findViewById(R.id.linear_full_border);
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 {
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);
......@@ -316,7 +323,14 @@ public class OperationRelatedContentActivity extends ABVUIActivity {
}
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.setPositiveButton(R.string.confirm, new DialogInterface.OnClickListener() {
@Override
......
......@@ -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.launcher.android.R;
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.adf.util.DateTimeFormat;
import jp.agentec.adf.util.DateTimeUtil;
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;
/**
......@@ -90,12 +92,24 @@ public class OperationListAdapter extends AbstractOperationAdapter {
holder.tvOperationName.setText(operationDto.operationName);
if (operationDto.reportType == ReportType.RoutineTask) {
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 {
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 {
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;
import jp.agentec.abook.abv.bl.dto.OperationDto;
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.DateTimeUtil;
import jp.agentec.adf.util.StringUtil;
......@@ -122,12 +123,20 @@ public class OperationPanelAdapter extends AbstractOperationAdapter {
holder.tvOperationName.setText(operationDto.operationName);
if (operationDto.reportType == ReportType.RoutineTask) {
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 {
holder.tvDate.setText(mContext.getString(R.string.date_label_routineTask) + " : " + operationDto.reportPeriod);
}
} 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;
import jp.agentec.abook.abv.bl.dto.ContentDto;
import jp.agentec.abook.abv.cl.util.BitmapUtil;
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.DateTimeUtil;
import static jp.agentec.abook.abv.cl.util.PreferenceUtil.getUserPref;
public class OperationRelatedContentPanelAdapter extends BaseAdapter {
final private String TAG = "OperationRelatedContentPanelAdapter";
......@@ -149,7 +153,10 @@ public class OperationRelatedContentPanelAdapter extends BaseAdapter {
// 最後の公開処理日
String lastDeliveryDate = DateTimeUtil.toString(contentDto.lastDeliveryDate, DateTimeFormat.yyyyMMdd_slash);
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 {
private void setNewRibbon(ViewHolder holder, final ContentDto contentDto) {
if (!contentDto.downloadedFlg && contentDto.newFlg) {
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 {
holder.tvNewContentMark.setVisibility(View.GONE);
}
......
......@@ -12,9 +12,13 @@ import java.util.List;
import jp.agentec.abook.abv.bl.dto.PushMessageDto;
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.DateTimeUtil;
import static jp.agentec.abook.abv.cl.util.PreferenceUtil.getUserPref;
/**
* Created by kim jinsung on 2018/09/18.
*/
......@@ -82,7 +86,10 @@ public class PushMessageListAdapter extends BaseAdapter {
holder.operationNameTextView.setText(pushMessageDto.operationName);
holder.sendDateTextView.setText(DateTimeUtil.toString(pushMessageDto.pushSendDate, DateTimeFormat.yyyyMMddHHmm_slash));
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) {
holder.detailButton.setBackgroundResource(R.drawable.btn_detail);
......
......@@ -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.launcher.android.R;
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.adf.util.DateTimeFormat;
import jp.agentec.adf.util.DateTimeUtil;
import jp.agentec.adf.util.FileUtil;
import jp.agentec.adf.util.StringUtil;
import static jp.agentec.abook.abv.cl.util.PreferenceUtil.getUserPref;
/**
* Created by leej on 2018/08/31.
*/
......@@ -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() {
@Override
public void run() {
......@@ -171,7 +179,10 @@ public class ABookCheckWebViewHelper extends ABookHelper {
try {
mOperationLogic.updateSyncOperation(operationId, true);
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) {
......@@ -179,7 +190,13 @@ public class ABookCheckWebViewHelper extends ABookHelper {
// if (isDirections) {
// context.showSimpleAlertDialog(R.string.app_name, R.string.msg_send_error_task_directions_data);
// } 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;
} catch (Exception e) {
......@@ -187,7 +204,13 @@ public class ABookCheckWebViewHelper extends ABookHelper {
// if (isDirections) {
// context.showSimpleAlertDialog(R.string.app_name, R.string.msg_send_error_task_directions_data);
// } 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;
} finally {
......
......@@ -14,14 +14,18 @@ import java.util.ArrayList;
import jp.agentec.abook.abv.bl.common.Callback;
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.util.AlertDialogUtil;
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.viewer.activity.HTMLWebViewActivity;
import jp.agentec.abook.abv.ui.viewer.activity.HTMLXWalkWebViewActivity;
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 {
if (ContextCompat.checkSelfPermission(mActivity, android.Manifest.permission.READ_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) {
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 {
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 {
// 位置情報
if (ContextCompat.checkSelfPermission(mActivity,
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,
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;
......@@ -117,14 +133,20 @@ public class ABookPermissionHelper {
// カメラ
if (ContextCompat.checkSelfPermission(mActivity,
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;
case Constant.ABookPermissionType.Audio:
// マイク(オーディオ)
if (ContextCompat.checkSelfPermission(mActivity,
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;
}
......@@ -132,7 +154,10 @@ public class ABookPermissionHelper {
if (permitionTextResourceId > 0) {
if (showDialogFlg) {
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.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {
@Override
......
......@@ -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.ErrorMessage;
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.adapter.AbstractOperationAdapter;
import jp.agentec.abook.abv.ui.home.adapter.OperationListAdapter;
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.cl.util.PreferenceUtil.getUserPref;
/**
* Created by leej on 2019/03/06.
......@@ -63,7 +65,7 @@ public class OperationListHelper {
private List<OperationDto> filterOperationList() {
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);
} catch (Exception e) {
Logger.e(TAG, "findOperationList", e);
......@@ -102,9 +104,19 @@ public class OperationListHelper {
});
// ラベル変更
mPullToRefreshGridView.getLoadingLayoutProxy().setRefreshingLabel(mAppActivity.getString(R.string.updating));
mPullToRefreshGridView.getLoadingLayoutProxy().setPullLabel(mAppActivity.getString(R.string.pull_to_refresh_label));
mPullToRefreshGridView.getLoadingLayoutProxy().setReleaseLabel(mAppActivity.getString(R.string.release_to_refresh_label));
mAppActivity.getIntent();
// リソースパターンの適用
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));
......@@ -188,9 +200,17 @@ public class OperationListHelper {
});
// ラベル変更
mPullToRefreshListView.getLoadingLayoutProxy().setRefreshingLabel(mAppActivity.getString(R.string.updating));
mPullToRefreshListView.getLoadingLayoutProxy().setPullLabel(mAppActivity.getString(R.string.pull_to_refresh_label));
mPullToRefreshListView.getLoadingLayoutProxy().setReleaseLabel(mAppActivity.getString(R.string.release_to_refresh_label));
mPullToRefreshListView.getLoadingLayoutProxy().setRefreshingLabel(mAppActivity.getString(PatternStringUtil.patternToInt(mAppActivity.getApplicationContext(),
R.string.updating,
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() {
......
......@@ -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.NetworkDisconnectedException;
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.OzdFileHelper;
import jp.agentec.abook.abv.launcher.android.PDFFileProvider;
......@@ -39,6 +41,9 @@ import oz.api.OZReportAPI;
import oz.api.OZReportCommandListener;
import oz.api.OZReportViewer;
import static jp.agentec.abook.abv.cl.util.PreferenceUtil.getUserPref;
import static org.chromium.base.ContextUtils.getApplicationContext;
/**
* ABook Report(仮)ビュアー
* ① 原本ozdファイル (暗号化されてない)
......@@ -106,15 +111,25 @@ public class CheckOZDViewActivity extends ABVContentViewActivity {
String rearTitle = "";
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 {
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) {
rearTitle = getRString(R.string.title_preview);
// リソースパターンの適用
rearTitle = PatternStringUtil.patternToString(getApplicationContext(),
R.string.title_preview,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0));
} 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);
......@@ -163,7 +178,13 @@ public class CheckOZDViewActivity extends ABVContentViewActivity {
@Override
public void onClick(View v) {
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 {
@Override
public void onClick(View v) {
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 {
@Override
public void onClick(View v) {
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 {
return true;
} else {
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;
}
}
......@@ -590,7 +626,10 @@ public class CheckOZDViewActivity extends ABVContentViewActivity {
if (!mReadOnlyFlg) {
//OZD臨時保存処理
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;
}
}
......
......@@ -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.AlertDialogUtil;
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.ABVPopupListWindow;
import jp.agentec.abook.abv.ui.common.vo.Size;
......@@ -851,6 +852,17 @@ public class ContentViewActivity extends ABVContentViewActivity {
mShowedPopupWindow = new ABVPopupListWindow(ContentViewActivity.this, R.layout.popup_meetingroom_setting);
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);
markingShareCheck.setVisibility(View.GONE);
......@@ -1090,6 +1102,12 @@ public class ContentViewActivity extends ABVContentViewActivity {
CheckedTextView markingShareCheck = (CheckedTextView) mShowedPopupWindow.findViewById(R.id.checkedMarkingShare);
boolean chairmanMarkingShareFlag = PreferenceUtil.get(ContentViewActivity.this, AppDefType.UserPrefKey.CHAIRMAN_MARKING_SHARE, false);
markingShareCheck.setChecked(chairmanMarkingShareFlag);
// リソースパターンを適用
markingShareCheck.setText(PatternStringUtil.patternToInt(getApplicationContext(),
R.string.chairman_marking_share,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
markingShareCheck.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
......@@ -1104,6 +1122,12 @@ public class ContentViewActivity extends ABVContentViewActivity {
CheckedTextView markingAutoSaveCheck = (CheckedTextView) mShowedPopupWindow.findViewById(R.id.checkedMarkingAutoSave);
boolean meetingMarkingAutoSaveFlag = PreferenceUtil.get(ContentViewActivity.this, AppDefType.UserPrefKey.MEETING_MARKING_AUTO_SAVE, false);
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() {
@Override
public void onClick(View v) {
......@@ -2625,12 +2649,18 @@ public class ContentViewActivity extends ABVContentViewActivity {
// プロジェクト関連資料なのかをチェック
if (ActivityHandlingHelper.getInstance().isExistCommonContent(getContentId())) {
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;
}
} else if (ActivityHandlingHelper.getInstance().isExistRelatedContent(getContentId(), 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;
}
}
......
......@@ -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.ErrorMessage;
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.home.helper.ActivityHandlingHelper;
......@@ -309,12 +310,18 @@ public class HTMLXWalkWebViewActivity extends ParentWebViewActivity {
Long dstContentId = Long.valueOf(param.get("contentId"));
if (ActivityHandlingHelper.getInstance().isExistCommonContent(contentId)) {
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;
}
} else if (ActivityHandlingHelper.getInstance().isExistRelatedContent(contentId, 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;
}
}
......@@ -337,7 +344,10 @@ public class HTMLXWalkWebViewActivity extends ParentWebViewActivity {
}
});
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)) {
commonShouldOverrideUrlLoading(uri, null);
......
......@@ -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.dialog.ABookAlertDialog;
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.ActivityHandlingHelper;
import jp.agentec.abook.abv.ui.home.helper.ContentViewHelper;
......@@ -96,8 +97,15 @@ public class ParentWebViewActivity extends ABVContentViewActivity {
// エラーのため、空のURLをロードさせ、白い画面で表示させる
webViewLoadUrl("");
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() {
@Override
public void onClick(DialogInterface dialog, int which) {
......@@ -224,15 +232,23 @@ public class ParentWebViewActivity extends ABVContentViewActivity {
// 画像
try {
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.setPositiveButton(R.string.ok,
new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
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() {
@Override
public void run() {
......@@ -314,10 +330,17 @@ public class ParentWebViewActivity extends ABVContentViewActivity {
* シーン追加API通信で失敗時のダイアログ表示
*/
private void showFailedSceneApiDialog() {
ABookAlertDialog alertDialog = AlertDialogUtil.createAlertDialog(this, R.string.pano_edit);
alertDialog.setMessage(R.string.msg_sence_regist_api_failed);
alertDialog.setPositiveButton(R.string.ok,
new DialogInterface.OnClickListener() {
// リソースパターンの適用
ABookAlertDialog alertDialog = AlertDialogUtil.createAlertDialog(getApplicationContext(), PatternStringUtil.patternToInt(getApplicationContext(),
R.string.pano_edit,
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
public void onClick(DialogInterface dialog, int which) {
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