Bug 887269 - Split last tabs/history layouts into separate files (r=sriram)
authorLucas Rocha <lucasr@mozilla.com>
Wed, 24 Jul 2013 00:33:40 +0100
changeset 143435 b46dc80ff462228a5ee7cb15bb8dc912cbcde4d8
parent 143434 ce8381f138ccc611d0ce17b655bf6fc6edc68e1e
child 143436 ff3604761a5f5294df8990373ba2caa8c9a85e48
push id25130
push userlrocha@mozilla.com
push dateWed, 21 Aug 2013 09:41:27 +0000
treeherdermozilla-central@b2486721572e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssriram
bugs887269
milestone25.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 887269 - Split last tabs/history layouts into separate files (r=sriram)
mobile/android/base/Makefile.in
mobile/android/base/home/HistoryPage.java
mobile/android/base/home/LastTabsPage.java
mobile/android/base/resources/layout/home_history_page.xml
mobile/android/base/resources/layout/home_last_tabs_page.xml
mobile/android/base/resources/layout/home_list_with_title.xml
--- a/mobile/android/base/Makefile.in
+++ b/mobile/android/base/Makefile.in
@@ -458,16 +458,18 @@ RES_LAYOUT = \
   res/layout/doorhanger.xml \
   res/layout/doorhanger_button.xml \
   res/layout/find_in_page_content.xml \
   res/layout/font_size_preference.xml \
   res/layout/gecko_app.xml \
   res/layout/home_bookmarks_page.xml \
   res/layout/home_item_row.xml \
   res/layout/home_header_row.xml \
+  res/layout/home_history_page.xml \
+  res/layout/home_last_tabs_page.xml \
   res/layout/home_list_with_title.xml \
   res/layout/home_search_item_row.xml \
   res/layout/home_visited_page.xml \
   res/layout/web_app.xml \
   res/layout/launch_app_list.xml \
   res/layout/launch_app_listitem.xml \
   res/layout/menu_action_bar.xml \
   res/layout/menu_item_action_view.xml \
--- a/mobile/android/base/home/HistoryPage.java
+++ b/mobile/android/base/home/HistoryPage.java
@@ -98,17 +98,17 @@ public class HistoryPage extends HomeFra
 
         mHistorySections = null;
         mInflater = null;
         mUrlOpenListener = null;
     }
 
     @Override
     public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
-        return inflater.inflate(R.layout.home_list_with_title, container, false);
+        return inflater.inflate(R.layout.home_history_page, container, false);
     }
 
     @Override
     public void onViewCreated(View view, Bundle savedInstanceState) {
         final TextView title = (TextView) view.findViewById(R.id.title);
         title.setText(R.string.history_title);
 
         mList = (ListView) view.findViewById(R.id.list);
--- a/mobile/android/base/home/LastTabsPage.java
+++ b/mobile/android/base/home/LastTabsPage.java
@@ -90,17 +90,17 @@ public class LastTabsPage extends HomeFr
         super.onDetach();
 
         mInflater = null;
         mNewTabsListener = null;
     }
 
     @Override
     public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
-        return inflater.inflate(R.layout.home_list_with_title, container, false);
+        return inflater.inflate(R.layout.home_last_tabs_page, container, false);
     }
 
     @Override
     public void onViewCreated(View view, Bundle savedInstanceState) {
         final TextView title = (TextView) view.findViewById(R.id.title);
         title.setText(R.string.home_last_tabs_title);
 
         mList = (ListView) view.findViewById(R.id.list);
new file mode 100644
--- /dev/null
+++ b/mobile/android/base/resources/layout/home_history_page.xml
@@ -0,0 +1,14 @@
+<?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/. -->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+              android:layout_width="fill_parent"
+              android:layout_height="fill_parent"
+              android:orientation="vertical"
+              android:background="@android:color/white">
+
+    <include layout="@layout/home_list_with_title"/>
+
+</LinearLayout>
\ No newline at end of file
new file mode 100644
--- /dev/null
+++ b/mobile/android/base/resources/layout/home_last_tabs_page.xml
@@ -0,0 +1,14 @@
+<?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/. -->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+              android:layout_width="fill_parent"
+              android:layout_height="fill_parent"
+              android:orientation="vertical"
+              android:background="@android:color/white">
+
+    <include layout="@layout/home_list_with_title"/>
+
+</LinearLayout>
--- a/mobile/android/base/resources/layout/home_list_with_title.xml
+++ b/mobile/android/base/resources/layout/home_list_with_title.xml
@@ -1,20 +1,17 @@
 <?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/. -->
 
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-              android:layout_width="fill_parent"
-              android:layout_height="fill_parent"
-              android:orientation="vertical"
-              android:background="@android:color/white">
+<merge xmlns:android="http://schemas.android.com/apk/res/android">
 
     <TextView android:id="@+id/title"
               style="@style/Widget.Home.PageTitle"/>
 
     <org.mozilla.gecko.home.HomeListView
             android:id="@+id/list"
             android:layout_width="fill_parent"
-            android:layout_height="fill_parent"/>
+            android:layout_height="0dp"
+            android:layout_weight="1"/>
 
-</LinearLayout>
+</merge>