Bug 712574: Use better includes avoiding merges [r=mfinkle r=blassey]

--HG--
rename : mobile/android/base/resources/layout-v11/awesomebar_search.xml => mobile/android/base/resources/layout-v11/awesomebar.xml
This commit is contained in:
Sriram Ramasubramanian 2011-12-21 00:51:56 -08:00
Родитель 4409cedb5c
Коммит 092530e5cc
12 изменённых файлов: 62 добавлений и 111 удалений

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

@ -101,10 +101,10 @@ public class AwesomeBar extends Activity implements GeckoEventListener {
Log.d(LOGTAG, "creating awesomebar");
setContentView(R.layout.awesomebar_search);
setContentView(R.layout.awesomebar);
if (Build.VERSION.SDK_INT >= 11) {
RelativeLayout actionBarLayout = (RelativeLayout) getLayoutInflater().inflate(R.layout.awesomebar_search_actionbar, null);
RelativeLayout actionBarLayout = (RelativeLayout) getLayoutInflater().inflate(R.layout.awesomebar_search, null);
GeckoActionBar.setBackgroundDrawable(this, getResources().getDrawable(R.drawable.gecko_actionbar_bg));
GeckoActionBar.setDisplayOptions(this, ActionBar.DISPLAY_SHOW_CUSTOM, ActionBar.DISPLAY_SHOW_CUSTOM |

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

@ -1470,7 +1470,7 @@ abstract public class GeckoApp
setContentView(R.layout.gecko_app);
if (Build.VERSION.SDK_INT >= 11) {
mBrowserToolbar = (BrowserToolbar) getLayoutInflater().inflate(R.layout.gecko_app_actionbar, null);
mBrowserToolbar = (BrowserToolbar) getLayoutInflater().inflate(R.layout.browser_toolbar, null);
GeckoActionBar.setBackgroundDrawable(this, getResources().getDrawable(R.drawable.gecko_actionbar_bg));
GeckoActionBar.setDisplayOptions(this, ActionBar.DISPLAY_SHOW_CUSTOM, ActionBar.DISPLAY_SHOW_CUSTOM |
@ -1845,7 +1845,7 @@ abstract public class GeckoApp
mAutoCompletePopup.hide();
if (Build.VERSION.SDK_INT >= 11) {
mBrowserToolbar = (BrowserToolbar) getLayoutInflater().inflate(R.layout.gecko_app_actionbar, null);
mBrowserToolbar = (BrowserToolbar) getLayoutInflater().inflate(R.layout.browser_toolbar, null);
Tab tab = Tabs.getInstance().getSelectedTab();
if (tab != null) {

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

@ -196,6 +196,7 @@ endif
RES_LAYOUT = \
$(SYNC_RES_LAYOUT) \
res/layout/autocomplete_list_item.xml \
res/layout/awesomebar.xml \
res/layout/awesomebar_header_row.xml \
res/layout/awesomebar_row.xml \
res/layout/awesomebar_search.xml \
@ -222,10 +223,8 @@ RES_LAYOUT = \
$(NULL)
RES_LAYOUT_V11 = \
res/layout-v11/awesomebar_search.xml \
res/layout-v11/awesomebar_search_actionbar.xml \
res/layout-v11/awesomebar.xml \
res/layout-v11/gecko_app.xml \
res/layout-v11/gecko_app_actionbar.xml \
$(NULL)
RES_VALUES = \

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

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/awesome_screen"
style="@style/Screen">
<include layout="@layout/awesomebar_tabs"/>
</LinearLayout>

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

@ -1,14 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/awesome_screen"
style="@style/Screen">
<org.mozilla.gecko.AwesomeBarTabs android:id="@+id/awesomebar_tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<include layout="@layout/awesomebar_tabs"/>
</org.mozilla.gecko.AwesomeBarTabs>
</LinearLayout>

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

@ -1,31 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:background="@drawable/tabs_tray_bg_repeat">
<view class="org.mozilla.gecko.AwesomeBar$AwesomeBarEditText"
android:id="@+id/awesomebar_text"
style="@style/AddressBar.Button"
android:layout_width="fill_parent"
android:layout_alignParentBottom="true"
android:layout_centerVertical="true"
android:paddingLeft="15dip"
android:paddingRight="40dip"
android:hint="@string/awesomebar_default_text"
android:inputType="textUri"
android:imeOptions="actionGo"
android:singleLine="true"
android:gravity="center_vertical|left">
<requestFocus/>
</view>
<ImageButton android:id="@+id/awesomebar_button"
style="@style/AddressBar.ImageButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="15dip"
android:layout_centerVertical="true"
android:layout_alignRight="@id/awesomebar_text"
android:visibility="gone"
android:src="@drawable/ic_awesomebar_go"/>
</RelativeLayout>

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

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<org.mozilla.gecko.BrowserToolbar xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/browser_toolbar"
style="@style/BrowserToolbar">
<include layout="@layout/browser_toolbar"/>
</org.mozilla.gecko.BrowserToolbar>

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

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/awesome_screen"
style="@style/Screen">
<include layout="@layout/awesomebar_search"/>
<include layout="@layout/awesomebar_tabs"/>
</LinearLayout>

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

@ -1,45 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/awesome_screen"
style="@style/Screen">
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
style="@style/AddressBar"
android:background="@drawable/tabs_tray_bg_repeat">
<RelativeLayout style="@style/AddressBar"
android:background="@drawable/tabs_tray_bg_repeat">
<view class="org.mozilla.gecko.AwesomeBar$AwesomeBarEditText"
android:id="@+id/awesomebar_text"
style="@style/AddressBar.Button"
android:layout_width="fill_parent"
android:layout_alignParentBottom="true"
android:layout_centerVertical="true"
android:paddingLeft="15dip"
android:paddingRight="40dip"
android:hint="@string/awesomebar_default_text"
android:inputType="textUri"
android:imeOptions="actionSearch"
android:singleLine="true"
android:gravity="center_vertical|left">
<requestFocus/>
</view>
<view class="org.mozilla.gecko.AwesomeBar$AwesomeBarEditText"
android:id="@+id/awesomebar_text"
style="@style/AddressBar.Button"
android:layout_width="fill_parent"
android:layout_alignParentBottom="true"
android:layout_centerVertical="true"
android:paddingLeft="15dip"
android:paddingRight="40dip"
android:hint="@string/awesomebar_default_text"
android:inputType="textUri"
android:imeOptions="actionSearch"
android:singleLine="true"
android:gravity="center_vertical|left">
<requestFocus/>
</view>
<ImageButton android:id="@+id/awesomebar_button"
style="@style/AddressBar.ImageButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="15dip"
android:layout_centerVertical="true"
android:layout_alignRight="@id/awesomebar_text"
android:visibility="gone"
android:src="@drawable/ic_awesomebar_go"/>
<ImageButton android:id="@+id/awesomebar_button"
style="@style/AddressBar.ImageButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="15dip"
android:layout_centerVertical="true"
android:layout_alignRight="@id/awesomebar_text"
android:visibility="gone"
android:src="@drawable/ic_awesomebar_go"/>
</RelativeLayout>
<org.mozilla.gecko.AwesomeBarTabs android:id="@+id/awesomebar_tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<include layout="@layout/awesomebar_tabs"/>
</org.mozilla.gecko.AwesomeBarTabs>
</LinearLayout>
</RelativeLayout>

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

@ -1,5 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android">
<org.mozilla.gecko.AwesomeBarTabs xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/awesomebar_tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout android:orientation="vertical"
android:layout_width="fill_parent"
@ -26,4 +29,4 @@
</LinearLayout>
</merge>
</org.mozilla.gecko.AwesomeBarTabs>

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

@ -1,5 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android">
<org.mozilla.gecko.BrowserToolbar xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/browser_toolbar"
style="@style/BrowserToolbar">
<RelativeLayout android:id="@+id/address_bar"
style="@style/AddressBar">
@ -74,4 +76,4 @@
</RelativeLayout>
</merge>
</org.mozilla.gecko.BrowserToolbar>

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

@ -3,12 +3,7 @@
android:id="@+id/main_layout"
style="@style/Screen">
<org.mozilla.gecko.BrowserToolbar android:id="@+id/browser_toolbar"
style="@style/BrowserToolbar">
<include layout="@layout/browser_toolbar"/>
</org.mozilla.gecko.BrowserToolbar>
<include layout="@layout/browser_toolbar"/>
<RelativeLayout android:id="@+id/gecko_layout"
android:layout_width="fill_parent"