Commit 32ca247f by onuma

問題点No.56,57,80,81,82,83,84 アプリの画面遷移を修正した。

アプリ終了時にプッシュ受信でチャットルーム遷移した場合、画面が真っ白くなる問題などを修正した。
parent 6203c9f8
package jp.agentec.abook.abv.ui.common.activity; package jp.agentec.abook.abv.ui.common.activity;
import android.app.Activity;
import android.app.Dialog; import android.app.Dialog;
import android.content.ActivityNotFoundException; import android.content.ActivityNotFoundException;
import android.content.Context; import android.content.Context;
...@@ -90,9 +91,11 @@ import jp.agentec.abook.abv.ui.common.util.KeyboardUtils; ...@@ -90,9 +91,11 @@ import jp.agentec.abook.abv.ui.common.util.KeyboardUtils;
import jp.agentec.abook.abv.ui.common.util.PatternStringUtil; import jp.agentec.abook.abv.ui.common.util.PatternStringUtil;
import jp.agentec.abook.abv.ui.common.view.ABVBatchSyncView; import jp.agentec.abook.abv.ui.common.view.ABVBatchSyncView;
import jp.agentec.abook.abv.ui.common.vo.Size; import jp.agentec.abook.abv.ui.common.vo.Size;
import jp.agentec.abook.abv.ui.home.activity.ChatWebViewActivity;
import jp.agentec.abook.abv.ui.home.activity.HelpActivity; import jp.agentec.abook.abv.ui.home.activity.HelpActivity;
import jp.agentec.abook.abv.ui.home.activity.LoginActivity; import jp.agentec.abook.abv.ui.home.activity.LoginActivity;
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.activity.OperationRelatedContentActivity;
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;
import jp.agentec.abook.abv.ui.home.adapter.PushMessageListAdapter; import jp.agentec.abook.abv.ui.home.adapter.PushMessageListAdapter;
...@@ -163,7 +166,7 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co ...@@ -163,7 +166,7 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co
// 遷移元のアクティビティ名 // 遷移元のアクティビティ名
// PushMessage受信時に直接ChatRoomへ行かずに、ひとつまえのActivityに戻る為に使用する。 // PushMessage受信時に直接ChatRoomへ行かずに、ひとつまえのActivityに戻る為に使用する。
public String baseActivityName; public String fromActivityName;
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
...@@ -868,10 +871,18 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co ...@@ -868,10 +871,18 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co
// chat // chat
LinearLayout ll_menuItem_chat = (LinearLayout)mCommunicationMenuDialog.findViewById(R.id.ll_item_chat); LinearLayout ll_menuItem_chat = (LinearLayout)mCommunicationMenuDialog.findViewById(R.id.ll_item_chat);
if (ABVDataCache.getInstance().serviceOption.isChat()) { if (ABVDataCache.getInstance().serviceOption.isChat()) {
final Activity baseActivity = this;
ll_menuItem_chat.setOnClickListener(new View.OnClickListener() { ll_menuItem_chat.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View view) { public void onClick(View view) {
ActivityHandlingHelper.getInstance().startChatWebViewActivity(); // 戻り先
String nextActivity;
if (baseActivity instanceof OperationListActivity) {
nextActivity = OperationListActivity.class.getName();
} else {
nextActivity = OperationRelatedContentActivity.class.getName();
}
ActivityHandlingHelper.getInstance().startChatWebViewActivity(new Long(0),"", ChatWebViewActivity.class.getName(), nextActivity);
mCommunicationMenuDialog.dismiss(); mCommunicationMenuDialog.dismiss();
} }
}); });
......
...@@ -159,8 +159,8 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity { ...@@ -159,8 +159,8 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
isLinkedContent = intent.getBooleanExtra("isLinkedContent", false); isLinkedContent = intent.getBooleanExtra("isLinkedContent", false);
mOperationId = intent.getLongExtra(ABookKeys.OPERATION_ID, -1); mOperationId = intent.getLongExtra(ABookKeys.OPERATION_ID, -1);
// 遷移元のActivity // 戻り先のActivity名を保存しておく
baseActivityName = getIntent().getStringExtra(AppDefType.ChatPushMessageKey.fromActivityName); fromActivityName = getIntent().getStringExtra(AppDefType.ChatPushMessageKey.fromActivityName);
if (!isLinkedContent) { if (!isLinkedContent) {
operationDto = AbstractLogic.getLogic(OperationLogic.class).getOperation(mOperationId); operationDto = AbstractLogic.getLogic(OperationLogic.class).getOperation(mOperationId);
......
...@@ -168,7 +168,7 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity implements ...@@ -168,7 +168,7 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity implements
chatData.setIsMobile(!isNormalSize()); chatData.setIsMobile(!isNormalSize());
// どのアクティビティから遷移してきたか保存 // どのアクティビティから遷移してきたか保存
baseActivityName = intent.getStringExtra(AppDefType.ChatPushMessageKey.fromActivityName); fromActivityName = intent.getStringExtra(AppDefType.ChatPushMessageKey.fromActivityName);
} }
private void setupChatWebView() { private void setupChatWebView() {
...@@ -191,7 +191,7 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity implements ...@@ -191,7 +191,7 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity implements
} }
boolean isSIDValid = false; boolean isSIDValid = false;
try { try {
isSIDValid = AcmsClient.getInstance(ABVEnvironment.getInstance().networkAdapter).checkSid(chatData.sid); isSIDValid = AcmsClient.getInstance(chatData.shopName,ABVEnvironment.getInstance().networkAdapter).checkSid(chatData.sid);
} catch (Exception e) { } catch (Exception e) {
Logger.d("SID_CHECK_ERROR"); Logger.d("SID_CHECK_ERROR");
} }
...@@ -787,13 +787,15 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity implements ...@@ -787,13 +787,15 @@ public class ChatWebViewActivity extends CommunicationWebViewActivity implements
finish(); finish();
// 戻るの作業一覧か、関連資料のどちらかのActivityのみ // 戻るの作業一覧か、関連資料のどちらかのActivityのみ
// デフォルトでは、作業一覧に戻る
Intent intent = new Intent(); Intent intent = new Intent();
if (OperationListActivity.class.getName().equals(baseActivityName)) { if (OperationRelatedContentActivity.class.getName().equals(fromActivityName)) {
intent.setClass(ChatWebViewActivity.this, OperationListActivity.class);
} else {
intent.setClass(ChatWebViewActivity.this, OperationRelatedContentActivity.class); intent.setClass(ChatWebViewActivity.this, OperationRelatedContentActivity.class);
} else {
intent.setClass(ChatWebViewActivity.this, OperationListActivity.class);
} }
intent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP | Intent.FLAG_ACTIVITY_CLEAR_TASK); intent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP | Intent.FLAG_ACTIVITY_CLEAR_TASK);
intent.putExtra(AppDefType.ChatPushMessageKey.fromActivityName, ChatWebViewActivity.class.getName());
startActivity(intent, NaviConsts.Left); startActivity(intent, NaviConsts.Left);
} }
......
...@@ -21,7 +21,6 @@ import android.widget.ArrayAdapter; ...@@ -21,7 +21,6 @@ import android.widget.ArrayAdapter;
import android.widget.DatePicker; import android.widget.DatePicker;
import android.widget.EditText; import android.widget.EditText;
import android.widget.GridView; import android.widget.GridView;
import android.widget.ImageButton;
import android.widget.ListView; import android.widget.ListView;
import android.widget.RadioGroup; import android.widget.RadioGroup;
import android.widget.TextView; import android.widget.TextView;
...@@ -98,7 +97,6 @@ import jp.agentec.abook.abv.ui.common.view.ABVBatchSyncView; ...@@ -98,7 +97,6 @@ import jp.agentec.abook.abv.ui.common.view.ABVBatchSyncView;
import jp.agentec.abook.abv.ui.common.view.ABVListDialog; import jp.agentec.abook.abv.ui.common.view.ABVListDialog;
import jp.agentec.abook.abv.ui.common.view.ABVPopupListWindow; import jp.agentec.abook.abv.ui.common.view.ABVPopupListWindow;
import jp.agentec.abook.abv.ui.home.adapter.HierarchyOperationGroupListAdapter; import jp.agentec.abook.abv.ui.home.adapter.HierarchyOperationGroupListAdapter;
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;
import jp.agentec.abook.abv.ui.home.helper.ActivityHandlingHelper; import jp.agentec.abook.abv.ui.home.helper.ActivityHandlingHelper;
import jp.agentec.abook.abv.ui.home.helper.HomeOperationListHelper; import jp.agentec.abook.abv.ui.home.helper.HomeOperationListHelper;
...@@ -448,6 +446,7 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -448,6 +446,7 @@ public class OperationListActivity extends ABVUIActivity {
private void showCommonContent() { private void showCommonContent() {
Intent intent = new Intent(); Intent intent = new Intent();
intent.setClass(OperationListActivity.this, OperationRelatedContentActivity.class); intent.setClass(OperationListActivity.this, OperationRelatedContentActivity.class);
intent.putExtra(AppDefType.ChatPushMessageKey.fromActivityName, OperationListActivity.class.getName());
intent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP); intent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
startActivity(intent, NaviConsts.Right); startActivity(intent, NaviConsts.Right);
} }
......
...@@ -75,6 +75,7 @@ public class OperationRelatedContentActivity extends ABVUIActivity { ...@@ -75,6 +75,7 @@ public class OperationRelatedContentActivity extends ABVUIActivity {
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
Logger.i(TAG,"onCreate");
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
updateCollaborationInfo(); updateCollaborationInfo();
setContentView(R.layout.ac_operation_related_content); setContentView(R.layout.ac_operation_related_content);
...@@ -407,9 +408,12 @@ public class OperationRelatedContentActivity extends ABVUIActivity { ...@@ -407,9 +408,12 @@ public class OperationRelatedContentActivity extends ABVUIActivity {
* 作業一覧へ戻る * 作業一覧へ戻る
*/ */
private void backToHome() { private void backToHome() {
finish(); Intent intent = new Intent();
// 終了後、アニメーション追加(左へ移動) intent.setClass(OperationRelatedContentActivity.this, OperationListActivity.class);
overridePendingTransition(R.anim.viewin_left_to_right, R.anim.viewout_left_to_right); intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
intent.putExtra(AppDefType.ChatPushMessageKey.fromActivityName, OperationRelatedContentActivity.class.getName());
// 左へ移動しながら戻る
startActivity(intent, NaviConsts.Left);
} }
public void showCancelDownloadDialog(final ContentDto contentDto) { public void showCancelDownloadDialog(final ContentDto contentDto) {
......
...@@ -1671,7 +1671,7 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve ...@@ -1671,7 +1671,7 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
* @param roomId chatRoom の Id * @param roomId chatRoom の Id
* @param roomName chatRoom の名前 * @param roomName chatRoom の名前
* @param targetActivityName 直接chatRoom に遷移する場合は、ChatWebViewActivity名。chatRoomに遷移する前に、別のActivityを経由する場合は、そのActivity名 * @param targetActivityName 直接chatRoom に遷移する場合は、ChatWebViewActivity名。chatRoomに遷移する前に、別のActivityを経由する場合は、そのActivity名
* @param fromActivityName この関数を呼び出したActivity名 * @param fromActivityName この関数を呼び出したActivity名。戻る時にはこのアクティビティに戻る
*/ */
public void startChatWebViewActivity(Long roomId, String roomName, String targetActivityName, String fromActivityName) { public void startChatWebViewActivity(Long roomId, String roomName, String targetActivityName, String fromActivityName) {
Intent intent = new Intent(); Intent intent = new Intent();
......
...@@ -3828,9 +3828,9 @@ public class ContentViewActivity extends ABVContentViewActivity { ...@@ -3828,9 +3828,9 @@ public class ContentViewActivity extends ABVContentViewActivity {
if (requestCode == ABookCommConstants.PUSH_MESSAGE_DLG_REQUEST_CODE) { if (requestCode == ABookCommConstants.PUSH_MESSAGE_DLG_REQUEST_CODE) {
// プッシュメッセージダイアログのリザルトだった場合 // プッシュメッセージダイアログのリザルトだった場合
if (resultCode == ABookCommConstants.PUSH_MESSAGE_DLG_RESULT.OK && !StringUtil.isNullOrEmpty(baseActivityName)) { if (resultCode == ABookCommConstants.PUSH_MESSAGE_DLG_RESULT.OK && !StringUtil.isNullOrEmpty(fromActivityName)) {
finishActivity(); finishActivity();
goChatRoom(intent, baseActivityName, ContentViewActivity.class.getName()); goChatRoom(intent, fromActivityName, ContentViewActivity.class.getName());
} }
return; return;
} }
......
...@@ -28,15 +28,8 @@ import android.webkit.URLUtil; ...@@ -28,15 +28,8 @@ import android.webkit.URLUtil;
import android.webkit.CookieManager; import android.webkit.CookieManager;
import android.webkit.DownloadListener; import android.webkit.DownloadListener;
import android.os.Environment; import android.os.Environment;
import android.webkit.WebViewClient;
import android.content.Context;
import android.graphics.Bitmap;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List;
import java.io.File;
import java.io.FileOutputStream;
import java.util.Objects;
import jp.agentec.abook.abv.bl.acms.client.json.content.ContentJSON; import jp.agentec.abook.abv.bl.acms.client.json.content.ContentJSON;
import jp.agentec.abook.abv.bl.acms.type.AcmsApis; import jp.agentec.abook.abv.bl.acms.type.AcmsApis;
...@@ -751,9 +744,9 @@ public class HTMLWebViewActivity extends ParentWebViewActivity { ...@@ -751,9 +744,9 @@ public class HTMLWebViewActivity extends ParentWebViewActivity {
if (requestCode == ABookCommConstants.PUSH_MESSAGE_DLG_REQUEST_CODE) { if (requestCode == ABookCommConstants.PUSH_MESSAGE_DLG_REQUEST_CODE) {
// プッシュメッセージダイアログのリザルトだった場合 // プッシュメッセージダイアログのリザルトだった場合
if (resultCode == ABookCommConstants.PUSH_MESSAGE_DLG_RESULT.OK && !StringUtil.isNullOrEmpty(baseActivityName)) { if (resultCode == ABookCommConstants.PUSH_MESSAGE_DLG_RESULT.OK && !StringUtil.isNullOrEmpty(fromActivityName)) {
finishActivity(); finishActivity();
goChatRoom(intent, baseActivityName, HTMLWebViewActivity.class.getName()); goChatRoom(intent, fromActivityName, HTMLWebViewActivity.class.getName());
} }
return; return;
} }
......
...@@ -215,9 +215,9 @@ public class NoPdfViewActivity extends ABVContentViewActivity { ...@@ -215,9 +215,9 @@ public class NoPdfViewActivity extends ABVContentViewActivity {
if (requestCode == ABookCommConstants.PUSH_MESSAGE_DLG_REQUEST_CODE) { if (requestCode == ABookCommConstants.PUSH_MESSAGE_DLG_REQUEST_CODE) {
// プッシュメッセージダイアログのリザルトだった場合 // プッシュメッセージダイアログのリザルトだった場合
if (resultCode == ABookCommConstants.PUSH_MESSAGE_DLG_RESULT.OK && !StringUtil.isNullOrEmpty(baseActivityName)) { if (resultCode == ABookCommConstants.PUSH_MESSAGE_DLG_RESULT.OK && !StringUtil.isNullOrEmpty(fromActivityName)) {
finishActivity(); finishActivity();
goChatRoom(intent, baseActivityName, getClass().getName()); goChatRoom(intent, fromActivityName, getClass().getName());
} }
return; return;
} }
......
...@@ -147,7 +147,7 @@ public class FoxitPdfCore { ...@@ -147,7 +147,7 @@ public class FoxitPdfCore {
* @throws PDFException * @throws PDFException
*/ */
public PointF getPageSize(int pageIndex) throws PDFException { public PointF getPageSize(int pageIndex) throws PDFException {
Logger.i("getPageSize : " + pageIndex); Logger.d("getPageSize : " + pageIndex);
PDFPage pdfPage = mPDFDoc.getPage(pageIndex); PDFPage pdfPage = mPDFDoc.getPage(pageIndex);
return new PointF(pdfPage.getWidth(), pdfPage.getHeight()); return new PointF(pdfPage.getWidth(), pdfPage.getHeight());
} }
......
...@@ -307,7 +307,7 @@ public class PdfImageProvider { ...@@ -307,7 +307,7 @@ public class PdfImageProvider {
int width = (int) (size.x * pageScale); int width = (int) (size.x * pageScale);
int height = (int) (size.y * pageScale); int height = (int) (size.y * pageScale);
Logger.i(TAG, "[drawPage]: pageNumber=" + pageNumber + " width=" + width + " height=" + height + " imagePath=" + imagePath); Logger.d(TAG, "[drawPage]: pageNumber=" + pageNumber + " width=" + width + " height=" + height + " imagePath=" + imagePath);
Bitmap bm = null; Bitmap bm = null;
try { try {
bm = mFoxitPdfCore.drawPage(pageNumber, width, height, 0, 0, width, height); bm = mFoxitPdfCore.drawPage(pageNumber, width, height, 0, 0, width, height);
......
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