Commit 575d4f86 by NGUYEN HOANG SON

improve footer of related content screen

parent 75aefbdd
......@@ -697,6 +697,29 @@ public class OperationListActivity extends ABVUIActivity {
activityResultFlg = false;
}
@Override
protected void onNewIntent(Intent intent) {
super.onNewIntent(intent);
String activeTab = intent.getStringExtra("activeTab");
if (mCheckWebView != null && activeTab != null) {
String jsUrl = null;
if (activeTab.contentEquals("dashboard")) {
jsUrl = "javascript:CHK_Footer.goDashboard();";
} else if (activeTab.contentEquals("operationList")) {
jsUrl = "javascript:CHK_Footer.goOperationList();";
}
if (jsUrl != null) {
final String url = jsUrl;
runOnUiThread(new Runnable() {
@Override
public void run() {
mCheckWebView.loadUrl(url);
}
});
}
}
}
// 検索ダイアログ表示
private void showSearchDialog() {
contentRefresher.stopRefresh();
......
......@@ -333,14 +333,14 @@ public class OperationRelatedContentActivity extends ABVUIActivity {
mDashboardHomeButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
backToHome();
backToHome("dashboard");
}
});
// 作業のホーム画面へ
mOperationHomeButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
backToHome();
backToHome("operationList");
}
});
......@@ -416,11 +416,14 @@ public class OperationRelatedContentActivity extends ABVUIActivity {
/**
* 作業一覧へ戻る
*/
private void backToHome() {
private void backToHome(String activeTab) {
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.baseActivityName, OperationRelatedContentActivity.class.getName());
if (activeTab != null && activeTab.length() > 0) {
intent.putExtra("activeTab", activeTab);
}
// 左へ移動しながら戻る
startActivity(intent, NaviConsts.Left);
}
......@@ -490,7 +493,7 @@ public class OperationRelatedContentActivity extends ABVUIActivity {
if (isCollaboration) {
return true;
}
backToHome();
backToHome("");
return true;
}
return super.onKeyUp(keyCode, event);
......
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