summaryrefslogtreecommitdiffstats
path: root/src/com/android/browser/NavScreen.java
diff options
context:
space:
mode:
authorMichael Kolb <kolby@google.com>2011-06-04 13:29:00 -0700
committerMichael Kolb <kolby@google.com>2011-06-17 15:03:52 -0700
commit9829b43575a4e517a8f7f4aae836bf28728fb85b (patch)
tree5eb930c3acc4a0aae060d195cb443a082992f8b0 /src/com/android/browser/NavScreen.java
parent7dc444b4c3b70a09a33c0892fb8677922bdf1ecc (diff)
downloadpackages_apps_Browser-9829b43575a4e517a8f7f4aae836bf28728fb85b.zip
packages_apps_Browser-9829b43575a4e517a8f7f4aae836bf28728fb85b.tar.gz
packages_apps_Browser-9829b43575a4e517a8f7f4aae836bf28728fb85b.tar.bz2
nav mods
Change-Id: I80afd61d8d85b39fdeefacb1303294a33f696b75
Diffstat (limited to 'src/com/android/browser/NavScreen.java')
-rw-r--r--src/com/android/browser/NavScreen.java20
1 files changed, 9 insertions, 11 deletions
diff --git a/src/com/android/browser/NavScreen.java b/src/com/android/browser/NavScreen.java
index eeca95a..a841989 100644
--- a/src/com/android/browser/NavScreen.java
+++ b/src/com/android/browser/NavScreen.java
@@ -31,10 +31,13 @@ import android.widget.FrameLayout;
import android.widget.Gallery;
import android.widget.ImageButton;
import android.widget.ImageView;
+import android.widget.LinearLayout;
import android.widget.ListPopupWindow;
import android.widget.RelativeLayout;
import android.widget.TextView;
+import com.android.browser.view.Gallery.OnItemSelectedListener;
+
import java.util.ArrayList;
import java.util.List;
@@ -57,7 +60,7 @@ public class NavScreen extends RelativeLayout implements OnClickListener {
ImageView mFavicon;
ImageButton mCloseTab;
- NavTabScroller mScroller;
+ NavTabGallery mScroller;
float mTabAspect = 0.66f;
int mTabWidth;
int mTabHeight;
@@ -111,9 +114,9 @@ public class NavScreen extends RelativeLayout implements OnClickListener {
if (newconfig.orientation != mOrientation) {
int selIx = mScroller.getSelectionIndex();
removeAllViews();
+ mOrientation = newconfig.orientation;
init();
mScroller.setSelection(selIx);
- mOrientation = newconfig.orientation;
mAdapter.notifyDataSetChanged();
}
}
@@ -128,10 +131,11 @@ public class NavScreen extends RelativeLayout implements OnClickListener {
mNewTab.setOnClickListener(this);
mNewIncognito.setOnClickListener(this);
mMore.setOnClickListener(this);
- mScroller = (NavTabScroller) findViewById(R.id.scroller);
+ mScroller = (NavTabGallery) findViewById(R.id.scroller);
mAdapter = new TabAdapter(mContext, mUiController.getTabControl());
mScroller.setAdapter(mAdapter);
-
+ mScroller.setOrientation(mOrientation == Configuration.ORIENTATION_LANDSCAPE
+ ? LinearLayout.HORIZONTAL : LinearLayout.VERTICAL);
// update state for active tab
mScroller.setSelection(mUiController.getTabControl().getTabPosition(mUi.getActiveTab()));
}
@@ -261,19 +265,13 @@ public class NavScreen extends RelativeLayout implements OnClickListener {
tabview.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
- if (tabview.isRefresh(v)) {
- mUi.hideNavScreen(true);
- web.reload();
- } else if (tabview.isClose(v)) {
+ if (tabview.isClose(v)) {
onCloseTab((Tab) (mScroller.getSelectedItem()));
} else if (tabview.isTitle(v)) {
mUi.getTitleBar().setSkipTitleBarAnimations(true);
close(false);
mUi.editUrl(false);
mUi.getTitleBar().setSkipTitleBarAnimations(false);
- } else if (tabview.isForward(v)) {
- mUi.hideNavScreen(true);
- web.goForward();
} else if (tabview.isWebView(v)) {
mScroller.setSelection(position);
close();