Modified title bar to show concurrently with copy/paste menu
The title bar will now move down below the copy/paste menu
when initiated, making it so that the URL is viewable
while performing a copy/cut/paste function.
Change-Id: I4fb114ab25fde91bececaf5d3335d89466da96de
diff --git a/src/com/android/browser/BaseUi.java b/src/com/android/browser/BaseUi.java
index f7bd2fb..f5ccb42 100644
--- a/src/com/android/browser/BaseUi.java
+++ b/src/com/android/browser/BaseUi.java
@@ -32,6 +32,7 @@
import android.os.Handler;
import android.os.Message;
import android.text.TextUtils;
+import android.view.ActionMode;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.Menu;
@@ -635,10 +636,6 @@
}
}
- @Override
- public void onActionModeFinished(boolean inLoad) {
- }
-
// active tabs page
public void showActiveTabsPage() {
@@ -873,4 +870,17 @@
protected UiController getUiController() {
return mUiController;
}
+
+ @Override
+ public void onActionModeStarted(ActionMode mode) {
+ int fixedTbarHeight = mTitleBar.isFixed() ? mTitleBar.calculateEmbeddedHeight() : 0;
+ mFixedTitlebarContainer.setY(fixedTbarHeight);
+ setContentViewMarginTop(fixedTbarHeight);
+ }
+
+ @Override
+ public void onActionModeFinished(boolean inLoad) {
+ mFixedTitlebarContainer.setY(0);
+ setContentViewMarginTop(0);
+ }
}