Bug 700936: Tabs button should be on the right [r=mfinkle]

This commit is contained in:
Sriram Ramasubramanian 2011-11-14 14:26:39 -08:00
parent 4aa67c00ca
commit c184355a4b
18 changed files with 74 additions and 46 deletions

View File

@ -117,8 +117,8 @@ public class BrowserToolbar extends LinearLayout {
public View makeView() {
TextView text = new TextView(mContext);
text.setGravity(Gravity.CENTER);
text.setTextSize(20);
text.setTextColor(Color.WHITE);
text.setTextSize(16);
text.setTextColor(0x99ffffff);
text.setTypeface(text.getTypeface(), Typeface.BOLD);
return text;
}
@ -173,10 +173,11 @@ public class BrowserToolbar extends LinearLayout {
mHandler.postDelayed(new Runnable() {
public void run() {
if (Tabs.getInstance().getCount() == 1) {
mTabs.setImageLevel(1);
int count = Tabs.getInstance().getCount();
mTabs.setImageLevel(count);
if (count == 1)
mTabsCount.setVisibility(View.GONE);
}
}
}, 1500);
}

View File

@ -201,6 +201,10 @@ RES_DRAWABLE_MDPI_V8 = \
res/drawable-mdpi-v8/ic_menu_reload.png \
res/drawable-mdpi-v8/ic_menu_save_as_pdf.png \
res/drawable-mdpi-v8/ic_menu_share.png \
res/drawable-mdpi-v8/tabs_normal.png \
res/drawable-mdpi-v8/tabs_pressed.png \
res/drawable-mdpi-v8/tabs_more.png \
res/drawable-mdpi-v8/tabs_plus.png \
$(NULL)
RES_DRAWABLE_HDPI_V8 = \
@ -237,6 +241,10 @@ RES_DRAWABLE_MDPI_V11 = \
res/drawable-mdpi-v11/ic_menu_reload.png \
res/drawable-mdpi-v11/ic_menu_save_as_pdf.png \
res/drawable-mdpi-v11/ic_menu_share.png \
res/drawable-mdpi-v11/tabs_normal.png \
res/drawable-mdpi-v11/tabs_pressed.png \
res/drawable-mdpi-v11/tabs_more.png \
res/drawable-mdpi-v11/tabs_plus.png \
$(NULL)
RES_DRAWABLE_HDPI_V11 = \
@ -310,10 +318,6 @@ MOZ_ANDROID_DRAWABLES += embedding/android/resources/drawable/address_bar_bg.xml
embedding/android/resources/drawable/tab_close.png \
embedding/android/resources/drawable/tabs_button.xml \
embedding/android/resources/drawable/tabs_level.xml \
embedding/android/resources/drawable/tabs_normal.png \
embedding/android/resources/drawable/tabs_pressed.png \
embedding/android/resources/drawable/tabs_off.png \
embedding/android/resources/drawable/tabs_plus.png \
embedding/android/resources/drawable/tabs_tray_bg.9.png \
embedding/android/resources/drawable/checkerboard.png \
embedding/android/resources/drawable/shadow.png \

Binary file not shown.

After

Width:  |  Height:  |  Size: 223 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 175 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 348 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 591 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

@ -1,10 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<gradient android:type="linear"
android:startColor="#d5d5d5"
android:endColor="#fefefe"
android:angle="90"/>
<item>
<shape android:shape="rectangle">
<solid android:color="#000000"/>
</shape>
</item>
</shape>
<item android:right="20dp"
android:bottom="2dp">
<shape android:shape="rectangle">
<gradient android:type="linear"
android:startColor="#d5d5d5"
android:endColor="#fefefe"
android:angle="90"/>
<corners android:topRightRadius="30dp"/>
</shape>
</item>
<item android:top="52dp">
<shape android:shape="rectangle">
<solid android:color="#d5d5d5"/>
</shape>
</item>
<item android:top="53dp">
<shape android:shape="rectangle">
<solid android:color="#999999"/>
</shape>
</item>
</layer-list>

View File

@ -3,5 +3,6 @@
<item android:maxLevel="0" android:drawable="@android:color/transparent"/>
<item android:maxLevel="1" android:drawable="@drawable/tabs_plus"/>
<item android:minLevel="2" android:maxLevel="100" android:drawable="@drawable/tabs_more"/>
</level-list>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 450 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

View File

@ -7,46 +7,45 @@
<Button android:id="@+id/awesome_bar"
style="@style/AddressBar.Button"
android:layout_width="fill_parent"
android:layout_marginLeft="60dip"
android:layout_marginRight="12dip"
android:layout_marginTop="4dip"
android:layout_marginBottom="4dip"
android:layout_alignParentRight="true"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:singleLine="true"
android:gravity="center_vertical|left"
android:hint="@string/awesomebar_default_text"
android:textColor="#000"
android:paddingLeft="32dp"/>
<ImageButton android:id="@+id/tabs"
style="@style/AddressBar.ImageButton"
android:layout_width="68dip"
android:layout_alignParentLeft="true"
android:background="@drawable/tabs_button"
android:gravity="center_vertical|left"
android:src="@drawable/tabs_level"
android:paddingLeft="12dip"
android:paddingRight="38dip"/>
<TextSwitcher android:id="@+id/tabs_count"
style="@style/AddressBar.ImageButton"
android:layout_width="42dip"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:gravity="center_horizontal"
android:visibility="gone"/>
android:textColor="#222222"
android:paddingLeft="42dip"
android:paddingRight="78dip"/>
<ImageButton android:id="@+id/favicon"
style="@style/AddressBar.ImageButton"
android:layout_width="24dip"
android:layout_height="24dip"
android:layout_marginLeft="0dip"
android:layout_width="21.33dip"
android:layout_height="21.33dip"
android:layout_marginLeft="10dip"
android:layout_centerVertical="true"
android:src="@drawable/favicon"
android:layout_alignLeft="@id/awesome_bar"/>
<ImageButton android:id="@+id/tabs"
style="@style/AddressBar.ImageButton"
android:layout_width="70dip"
android:layout_height="52dip"
android:layout_alignParentRight="true"
android:background="@drawable/tabs_button"
android:gravity="center_vertical|left"
android:src="@drawable/tabs_level"
android:paddingTop="4dip"
android:paddingLeft="25dip"
android:paddingRight="15dip"/>
<TextSwitcher android:id="@+id/tabs_count"
style="@style/AddressBar.ImageButton"
android:layout_width="60dip"
android:layout_height="wrap_content"
android:layout_marginTop="15dip"
android:layout_alignRight="@id/tabs"
android:gravity="center_horizontal"
android:visibility="gone"/>
</RelativeLayout>
</merge>

View File

@ -45,7 +45,7 @@
<!-- Address bar - Button -->
<style name="AddressBar.Button">
<item name="android:layout_height">match_parent</item>
<item name="android:textSize">18sp</item>
<item name="android:textSize">16sp</item>
<item name="android:background">@android:color/transparent</item>
</style>