Bug 775334: Make about:home clean. [r=mfinkle]

--HG--
extra : rebase_source : 54594ac171a34bec6d454efeb330cef22aff94f5
This commit is contained in:
Sriram Ramasubramanian 2012-07-19 11:42:56 -07:00
Родитель 805f53044e
Коммит 46eaade502
13 изменённых файлов: 51 добавлений и 180 удалений

Просмотреть файл

@ -16,10 +16,10 @@ import android.text.TextUtils;
public class AboutHomeSection extends LinearLayout {
private static final String LOGTAG = "GeckoAboutHomeSection";
private TitleView mTitle;
private SubTitleView mSubtitle;
private TextView mTitle;
private TextView mSubtitle;
private LinearLayout mItemsContainer;
private MoreTextView mMoreText;
private LinkTextView mMoreText;
public AboutHomeSection(Context context, AttributeSet attrs) {
super(context, attrs);
@ -28,10 +28,10 @@ public class AboutHomeSection extends LinearLayout {
LayoutInflater.from(context).inflate(R.layout.abouthome_section, this);
mTitle = (TitleView) this.findViewById(R.id.title);
mSubtitle = (SubTitleView) this.findViewById(R.id.subtitle);
mTitle = (TextView) this.findViewById(R.id.title);
mSubtitle = (TextView) this.findViewById(R.id.subtitle);
mItemsContainer = (LinearLayout) this.findViewById(R.id.items_container);
mMoreText = (MoreTextView) this.findViewById(R.id.more_text);
mMoreText = (LinkTextView) this.findViewById(R.id.more_text);
TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.AboutHomeSection);
setTitle(a.getText(R.styleable.AboutHomeSection_title));
@ -98,55 +98,4 @@ public class AboutHomeSection extends LinearLayout {
public void hideMoreText() {
mMoreText.setVisibility(View.GONE);
}
public static class TitleView extends LinearLayout {
private TextView mText;
public TitleView(Context context, AttributeSet attrs) {
super(context, attrs);
setOrientation(LinearLayout.VERTICAL);
inflate(context, R.layout.abouthome_section_title, this);
mText = (TextView) findViewById(R.id.text);
}
public void setText(CharSequence text) {
mText.setText(text);
}
}
public static class SubTitleView extends LinearLayout {
private TextView mText;
public SubTitleView(Context context, AttributeSet attrs) {
super(context, attrs);
setOrientation(LinearLayout.VERTICAL);
inflate(context, R.layout.abouthome_section_subtitle, this);
mText = (TextView) findViewById(R.id.text);
}
public void setText(CharSequence text) {
mText.setText(text);
}
}
public static class MoreTextView extends LinearLayout {
private TextView mText;
public MoreTextView(Context context, AttributeSet attrs) {
super(context, attrs);
setOrientation(LinearLayout.VERTICAL);
inflate(context, R.layout.abouthome_section_moretext, this);
mText = (TextView) findViewById(R.id.text);
}
public void setText(CharSequence text) {
mText.setText(text);
}
}
}

Просмотреть файл

@ -298,9 +298,6 @@ RES_LAYOUT = \
res/layout/abouthome_addon_row.xml \
res/layout/abouthome_last_tabs_row.xml \
res/layout/abouthome_section.xml \
res/layout/abouthome_section_moretext.xml \
res/layout/abouthome_section_subtitle.xml \
res/layout/abouthome_section_title.xml \
res/layout/abouthome_remote_tab_row.xml \
res/layout/abouthome_topsite_item.xml \
res/layout/validation_message.xml \
@ -363,7 +360,6 @@ RES_ANIM = \
RES_DRAWABLE_NODPI = \
res/drawable-nodpi/abouthome_bg.png \
res/drawable-nodpi/abouthome_topsites_bg.png \
res/drawable-nodpi/background.png \
res/drawable-nodpi/tabs_tray_bg.png \
res/drawable-nodpi/tabs_tray_selected_bg.png \
@ -869,7 +865,6 @@ MOZ_ANDROID_DRAWABLES += \
mobile/android/base/resources/drawable/abouthome_bg_repeat.xml \
mobile/android/base/resources/drawable/abouthome_divider.xml \
mobile/android/base/resources/drawable/abouthome_sync_box.xml \
mobile/android/base/resources/drawable/abouthome_topsites_bg_repeat.xml \
mobile/android/base/resources/drawable/action_bar_button.xml \
mobile/android/base/resources/drawable/address_bar_bg.xml \
mobile/android/base/resources/drawable/address_bar_bg_shadow_repeat.xml \

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 1.2 KiB

Просмотреть файл

@ -3,24 +3,10 @@
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<shape xmlns:android="http://schemas.android.com/apk/res/android">
android:shape="rectangle">
<item>
<size android:height="1dp"/>
<solid android:color="#3460666E"/>
<shape android:shape="rectangle">
<size android:height="1dp"/>
<solid android:color="#C1C7CC"/>
</shape>
</item>
<item android:top="1dp">
<shape android:shape="rectangle">
<size android:height="1dp"/>
<solid android:color="#FFFFFF"/>
</shape>
</item>
</layer-list>
</shape>

Просмотреть файл

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
android:src="@drawable/abouthome_topsites_bg"
android:tileMode="repeat"/>

Просмотреть файл

@ -36,7 +36,7 @@
android:textColor="#666666"/>
<View android:layout_width="fill_parent"
android:layout_height="2dp"
android:layout_height="1dp"
android:background="@drawable/abouthome_divider"
android:layout_alignParentBottom="true"/>

Просмотреть файл

@ -16,8 +16,7 @@
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:isScrollContainer="false"
android:background="@drawable/abouthome_topsites_bg_repeat">
android:isScrollContainer="false">
<ImageView android:id="@+id/top_sites_top"
android:layout_width="fill_parent"
@ -25,21 +24,16 @@
android:gravity="fill"
android:background="@drawable/abouthome_bg_repeat"/>
<ImageView android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_alignParentRight="true"
android:src="@drawable/abouthome_icon"/>
<TextView android:id="@+id/top_sites_title"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_height="26dip"
android:layout_below="@id/top_sites_top"
android:layout_marginLeft="12dip"
android:layout_marginTop="5dip"
android:background="#34FFFFFF"
android:paddingLeft="12dip"
android:textSize="12sp"
android:textColor="#000000"
android:textStyle="bold"
android:gravity="left|center_vertical"
android:text="@string/abouthome_top_sites_title"/>
<TextView android:id="@+id/no_top_sites_text"
@ -60,6 +54,7 @@
android:id="@+id/top_sites_grid"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:layout_below="@id/top_sites_title"
android:verticalSpacing="8dip"
android:horizontalSpacing="0dip"
@ -76,6 +71,13 @@
android:gravity="top|center_horizontal"
android:text="@string/abouthome_top_sites_browse"/>
<ImageView android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:layout_alignParentTop="true"
android:layout_alignParentRight="true"
android:src="@drawable/abouthome_icon"/>
<RelativeLayout android:id="@+id/sync_box_container"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
@ -125,11 +127,6 @@
android:layout_alignParentLeft="true"
android:src="@drawable/abouthome_logo"/>
<View android:layout_width="fill_parent"
android:layout_height="2dp"
android:background="@drawable/abouthome_divider"
android:layout_alignParentBottom="true"/>
</RelativeLayout>
<org.mozilla.gecko.AboutHomeSection android:id="@+id/last_tabs"

Просмотреть файл

@ -39,7 +39,7 @@
android:textColor="#666666"/>
<View android:layout_width="fill_parent"
android:layout_height="2dp"
android:layout_height="1dp"
android:background="@drawable/abouthome_divider"
android:layout_alignParentBottom="true"/>

Просмотреть файл

@ -21,7 +21,7 @@
android:ellipsize="middle"/>
<View android:layout_width="fill_parent"
android:layout_height="2dp"
android:layout_height="1dp"
android:background="@drawable/abouthome_divider"
android:layout_alignParentBottom="true"/>

Просмотреть файл

@ -5,15 +5,25 @@
<merge xmlns:android="http://schemas.android.com/apk/res/android">
<view class="org.mozilla.gecko.AboutHomeSection$TitleView"
android:id="@+id/title"
android:layout_width="fill_parent"
android:layout_height="wrap_content"/>
<TextView android:id="@+id/title"
android:layout_width="fill_parent"
android:layout_height="26dip"
android:background="#34FFFFFF"
android:paddingLeft="12dip"
android:textSize="12sp"
android:textColor="#000000"
android:textStyle="bold"
android:gravity="left|center_vertical"/>
<view class="org.mozilla.gecko.AboutHomeSection$SubTitleView"
android:id="@+id/subtitle"
android:layout_width="fill_parent"
android:layout_height="wrap_content"/>
<TextView android:id="@+id/subtitle"
android:layout_width="fill_parent"
android:layout_height="26dip"
android:layout_marginTop="1dip"
android:background="#34FFFFFF"
android:paddingLeft="12dip"
android:textSize="12sp"
android:textColor="#666666"
android:gravity="left|center_vertical"/>
<LinearLayout android:id="@+id/items_container"
android:layout_width="fill_parent"
@ -21,9 +31,11 @@
android:orientation="vertical"
android:isScrollContainer="false"/>
<view class="org.mozilla.gecko.AboutHomeSection$MoreTextView"
android:id="@+id/more_text"
android:layout_width="fill_parent"
android:layout_height="wrap_content"/>
<org.mozilla.gecko.LinkTextView android:id="@+id/more_text"
android:layout_width="fill_parent"
android:layout_height="47dip"
android:textColor="#22629e"
android:textSize="12sp"
android:gravity="center"/>
</merge>

Просмотреть файл

@ -1,19 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<merge xmlns:android="http://schemas.android.com/apk/res/android">
<org.mozilla.gecko.LinkTextView android:id="@+id/text"
android:layout_width="fill_parent"
android:layout_height="47dip"
android:textColor="#22629e"
android:textSize="12sp"
android:gravity="center"/>
<View android:layout_width="fill_parent"
android:layout_height="2dp"
android:background="@drawable/abouthome_divider"/>
</merge>

Просмотреть файл

@ -1,20 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<merge xmlns:android="http://schemas.android.com/apk/res/android">
<TextView android:id="@+id/text"
android:layout_width="fill_parent"
android:layout_height="26dip"
android:paddingLeft="12dip"
android:textSize="12sp"
android:textColor="#666666"
android:gravity="left|center_vertical"/>
<View android:layout_width="fill_parent"
android:layout_height="2dp"
android:background="@drawable/abouthome_divider"/>
</merge>

Просмотреть файл

@ -1,21 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<merge xmlns:android="http://schemas.android.com/apk/res/android">
<TextView android:id="@+id/text"
android:layout_width="fill_parent"
android:layout_height="26dip"
android:paddingLeft="12dip"
android:textSize="12sp"
android:textColor="#000000"
android:textStyle="bold"
android:gravity="left|center_vertical"/>
<View android:layout_width="fill_parent"
android:layout_height="2dp"
android:background="@drawable/abouthome_divider"/>
</merge>