Commit 32ca247f by onuma

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

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