diff --git a/mobile/android/base/AboutHomeContent.java b/mobile/android/base/AboutHomeContent.java index 8095f2cea3c3..c4d0e8ee918d 100644 --- a/mobile/android/base/AboutHomeContent.java +++ b/mobile/android/base/AboutHomeContent.java @@ -20,6 +20,7 @@ * * Contributor(s): * Brad Lassey + * Lucas Rocha * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or @@ -52,106 +53,168 @@ import org.mozilla.gecko.db.BrowserDB.URLColumns; import android.app.Activity; import android.content.ContentResolver; import android.content.Context; +import android.content.res.Configuration; import android.database.Cursor; import android.graphics.Bitmap; import android.graphics.BitmapFactory; +import android.text.SpannableString; +import android.text.style.UnderlineSpan; import android.util.AttributeSet; import android.util.Log; -import android.view.Display; -import android.view.LayoutInflater; import android.view.View; -import android.view.WindowManager; import android.widget.AdapterView; import android.widget.ArrayAdapter; import android.widget.GridView; import android.widget.ImageView; -import android.widget.LinearLayout; -import android.widget.ListAdapter; import android.widget.ListView; +import android.widget.ScrollView; import android.widget.SimpleCursorAdapter; import android.widget.TextView; -public class AboutHomeContent extends LinearLayout { +public class AboutHomeContent extends ScrollView { + private static final String LOGTAG = "GeckoAboutHome"; + + private static final int NUMBER_OF_TOP_SITES_PORTRAIT = 4; + private static final int NUMBER_OF_TOP_SITES_LANDSCAPE = 3; + + private static final int NUMBER_OF_COLS_PORTRAIT = 2; + private static final int NUMBER_OF_COLS_LANDSCAPE = 3; + + private boolean mInflated; + + private Cursor mCursor; + UriLoadCallback mUriLoadCallback = null; + + protected SimpleCursorAdapter mTopSitesAdapter; + protected GridView mTopSitesGrid; + + protected ArrayAdapter mAddonsAdapter; + protected ListView mAddonsList; + public interface UriLoadCallback { public void callback(String uriSpec); } - UriLoadCallback mUriLoadCallback = null; - - void setUriLoadCallback(UriLoadCallback uriLoadCallback) { - mUriLoadCallback = uriLoadCallback; - } - public AboutHomeContent(Context context, AttributeSet attrs) { super(context, attrs); + mInflated = false; } - private static final String LOGTAG = "GeckoAboutHome"; - private static final int NUMBER_OF_TOP_SITES = 3; - private static final int kTileWidth = 122; + @Override + protected void onFinishInflate() { + super.onFinishInflate(); - private Cursor mCursor; - - protected ListAdapter mGridAdapter; - protected ArrayAdapter mAddonAdapter; - protected GridView mGrid; - protected ListView mAddonList; - - public void onActivityContentChanged(Activity activity) { - mGrid = (GridView)findViewById(R.id.grid); - if (mGrid == null) + // HACK: Without this, the onFinishInflate is called twice + // This issue is due to a bug when Android inflates a layout with a + // parent. Fixed in Honeycomb + if (mInflated) return; - mGrid.setOnItemClickListener(mGridOnClickListener); + mInflated = true; - // we want to do this: mGrid.setNumColumns(GridView.AUTO_FIT); but it doesn't work - Display display = ((WindowManager) activity.getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay(); - int width = display.getWidth(); - mGrid.setNumColumns((int) Math.floor(width / kTileWidth)); - mAddonList = (ListView)findViewById(R.id.recommended_addon_list); - GeckoApp.mAppContext.mMainHandler.post(new Runnable() { - public void run() { - mGrid.setAdapter(mGridAdapter); + mTopSitesGrid = (GridView)findViewById(R.id.top_sites_grid); + mTopSitesGrid.setOnItemClickListener(new AdapterView.OnItemClickListener() { + public void onItemClick(AdapterView parent, View v, int position, long id) { + Cursor c = (Cursor) parent.getItemAtPosition(position); + + String spec = c.getString(c.getColumnIndex(URLColumns.URL)); + Log.i(LOGTAG, "clicked: " + spec); + + if (mUriLoadCallback != null) + mUriLoadCallback.callback(spec); + } + }); + + mAddonsList = (ListView) findViewById(R.id.recommended_addons_list); + + TextView allTopSitesText = (TextView) findViewById(R.id.all_top_sites_text); + allTopSitesText.setOnClickListener(new View.OnClickListener() { + public void onClick(View v) { + GeckoApp.mAppContext.showAwesomebar(AwesomeBar.Type.EDIT); + } + }); + + TextView allAddonsText = (TextView) findViewById(R.id.all_addons_text); + allAddonsText.setOnClickListener(new View.OnClickListener() { + public void onClick(View v) { + if (mUriLoadCallback != null) + mUriLoadCallback.callback("about:addons"); } }); } + private int getNumberOfTopSites() { + Configuration config = getContext().getResources().getConfiguration(); + if (config.orientation == Configuration.ORIENTATION_LANDSCAPE) + return NUMBER_OF_TOP_SITES_LANDSCAPE; + else + return NUMBER_OF_TOP_SITES_PORTRAIT; + } - private AdapterView.OnItemClickListener mGridOnClickListener = new AdapterView.OnItemClickListener() { - public void onItemClick(AdapterView parent, View v, int position, long id) - { - onGridItemClick((GridView)parent, v, position, id); - } - }; + private int getNumberOfColumns() { + Configuration config = getContext().getResources().getConfiguration(); + if (config.orientation == Configuration.ORIENTATION_LANDSCAPE) + return NUMBER_OF_COLS_LANDSCAPE; + else + return NUMBER_OF_COLS_PORTRAIT; + } void init(final Activity activity) { GeckoAppShell.getHandler().post(new Runnable() { public void run() { + if (mCursor != null) + activity.stopManagingCursor(mCursor); + ContentResolver resolver = GeckoApp.mAppContext.getContentResolver(); - mCursor = BrowserDB.filter(resolver, "", NUMBER_OF_TOP_SITES); + mCursor = BrowserDB.filter(resolver, "", NUMBER_OF_TOP_SITES_PORTRAIT); activity.startManagingCursor(mCursor); - onActivityContentChanged(activity); - mAddonAdapter = new ArrayAdapter(activity, R.layout.abouthome_addon_list_item); + mTopSitesAdapter = new TopSitesCursorAdapter(activity, + R.layout.abouthome_topsite_item, + mCursor, + new String[] { URLColumns.TITLE, + URLColumns.THUMBNAIL }, + new int[] { R.id.title, R.id.thumbnail }); + + if (mAddonsAdapter == null) + mAddonsAdapter = new ArrayAdapter(activity, R.layout.abouthome_addon_row); + GeckoApp.mAppContext.mMainHandler.post(new Runnable() { public void run() { - final SimpleCursorAdapter gridAdapter = - new SimpleCursorAdapter(activity, R.layout.abouthome_grid_box, mCursor, - new String[] { URLColumns.TITLE, - URLColumns.FAVICON, - URLColumns.URL, - URLColumns.THUMBNAIL }, - new int[] {R.id.bookmark_title, R.id.bookmark_icon, R.id.bookmark_url, R.id.screenshot}); - mGrid.setAdapter(gridAdapter); - gridAdapter.setViewBinder(new AwesomeCursorViewBinder()); - mAddonList.setAdapter(mAddonAdapter); + mTopSitesGrid.setNumColumns(getNumberOfColumns()); + + mTopSitesGrid.setAdapter(mTopSitesAdapter); + mTopSitesAdapter.setViewBinder(new TopSitesViewBinder()); + + mAddonsList.setAdapter(mAddonsAdapter); } }); + readRecommendedAddons(activity); } }); } + public void setUriLoadCallback(UriLoadCallback uriLoadCallback) { + mUriLoadCallback = uriLoadCallback; + } + + public void onActivityContentChanged(Activity activity) { + GeckoApp.mAppContext.mMainHandler.post(new Runnable() { + public void run() { + mTopSitesGrid.setAdapter(mTopSitesAdapter); + } + }); + } + + @Override + public void onConfigurationChanged(Configuration newConfig) { + mTopSitesGrid.setNumColumns(getNumberOfColumns()); + mTopSitesAdapter.notifyDataSetChanged(); + + super.onConfigurationChanged(newConfig); + } + InputStream getProfileRecommendedAddonsStream() { try { File profileDir = GeckoApp.mAppContext.getProfileDir(); @@ -194,7 +257,7 @@ public class AboutHomeContent extends LinearLayout { try { for (int i = 0; i < array.length(); i++) { JSONObject jsonobj = array.getJSONObject(i); - mAddonAdapter.add(jsonobj.getString("name")); + mAddonsAdapter.add(jsonobj.getString("name")); Log.i("GeckoAddons", "addon #" + i +": " + jsonobj.getString("name")); } } catch (Exception e) { @@ -209,91 +272,111 @@ public class AboutHomeContent extends LinearLayout { }); } - protected void onGridItemClick(GridView l, View v, int position, long id) { - mCursor.moveToPosition(position); - String spec = mCursor.getString(mCursor.getColumnIndex(URLColumns.URL)); - Log.i(LOGTAG, "clicked: " + spec); - if (mUriLoadCallback != null) - mUriLoadCallback.callback(spec); + public static class TopSitesGridView extends GridView { + public TopSitesGridView(Context context, AttributeSet attrs) { + super(context, attrs); + } + + @Override + protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { + // This is to ensure that the GridView always has a size that shows + // all items with no need for scrolling. + int expandedHeightSpec = MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE >> 2, + MeasureSpec.AT_MOST); + super.onMeasure(widthMeasureSpec, expandedHeightSpec); + } } -} -class AwesomeCursorViewBinder implements SimpleCursorAdapter.ViewBinder { - private static final String LOGTAG = "GeckoAwesomeCursorViewBinder"; + public class TopSitesCursorAdapter extends SimpleCursorAdapter { + public TopSitesCursorAdapter(Context context, int layout, Cursor c, + String[] from, int[] to) { + super(context, layout, c, from, to); + } - private boolean updateImage(View view, Cursor cursor, int faviconIndex) { - byte[] b = cursor.getBlob(faviconIndex); - ImageView favicon = (ImageView) view; + @Override + public int getCount() { + return Math.min(super.getCount(), getNumberOfTopSites()); + } + } - if (b == null) { - favicon.setImageResource(R.drawable.favicon); - } else { - try { - Bitmap bitmap = BitmapFactory.decodeByteArray(b, 0, b.length); - favicon.setImageBitmap(bitmap); - } catch (OutOfMemoryError oom) { - Log.e(LOGTAG, "Unable to load thumbnail bitmap", oom); - favicon.setImageResource(R.drawable.favicon); + class TopSitesViewBinder implements SimpleCursorAdapter.ViewBinder { + private boolean updateThumbnail(View view, Cursor cursor, int thumbIndex) { + byte[] b = cursor.getBlob(thumbIndex); + ImageView thumbnail = (ImageView) view; + + if (b == null) { + thumbnail.setImageResource(R.drawable.abouthome_topsite_placeholder); + } else { + try { + Bitmap bitmap = BitmapFactory.decodeByteArray(b, 0, b.length); + thumbnail.setImageBitmap(bitmap); + } catch (OutOfMemoryError oom) { + Log.e(LOGTAG, "Unable to load thumbnail bitmap", oom); + thumbnail.setImageResource(R.drawable.abouthome_topsite_placeholder); + } } + + return true; } - return true; + private boolean updateTitle(View view, Cursor cursor, int titleIndex) { + String title = cursor.getString(titleIndex); + TextView titleView = (TextView) view; + + // Use the URL instead of an empty title for consistency with the normal URL + // bar view - this is the equivalent of getDisplayTitle() in Tab.java + if (title == null || title.length() == 0) { + int urlIndex = cursor.getColumnIndexOrThrow(URLColumns.URL); + title = cursor.getString(urlIndex); + } + + titleView.setText(title); + return true; + } + + @Override + public boolean setViewValue(View view, Cursor cursor, int columnIndex) { + int titleIndex = cursor.getColumnIndexOrThrow(URLColumns.TITLE); + if (columnIndex == titleIndex) { + return updateTitle(view, cursor, titleIndex); + } + + int thumbIndex = cursor.getColumnIndexOrThrow(URLColumns.THUMBNAIL); + if (columnIndex == thumbIndex) { + return updateThumbnail(view, cursor, thumbIndex); + } + + // Other columns are handled automatically + return false; + } } - private boolean updateTitle(View view, Cursor cursor, int titleIndex) { - String title = cursor.getString(titleIndex); - TextView titleView = (TextView)view; - // Use the URL instead of an empty title for consistency with the normal URL - // bar view - this is the equivalent of getDisplayTitle() in Tab.java - if (title == null || title.length() == 0) { - int urlIndex = cursor.getColumnIndexOrThrow(URLColumns.URL); - title = cursor.getString(urlIndex); + public static class AddonsListView extends ListView { + public AddonsListView(Context context, AttributeSet attrs) { + super(context, attrs); } - titleView.setText(title); - return true; + @Override + protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { + // This is to ensure that the ListView always has a size that shows + // all items with no need for scrolling. + int expandedHeightSpec = MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE >> 2, + MeasureSpec.AT_MOST); + super.onMeasure(widthMeasureSpec, expandedHeightSpec); + } } - private boolean updateUrl(View view, Cursor cursor, int urlIndex) { - String title = cursor.getString(urlIndex); - TextView urlView = (TextView)view; - if (title != null) { - int index; - if ((index = title.indexOf("://")) != -1) - title = title.substring(index + 3); - if (title.startsWith("www.")) - title = title.substring(4); - if (title.endsWith("/")) - title = title.substring(0, title.length() -1); + public static class LinkTextView extends TextView { + public LinkTextView(Context context, AttributeSet attrs) { + super(context, attrs); + } + + @Override + public void setText(CharSequence text, BufferType type) { + SpannableString content = new SpannableString(text + " \u00BB"); + content.setSpan(new UnderlineSpan(), 0, text.length(), 0); + + super.setText(content, BufferType.SPANNABLE); } - urlView.setText(title); - return true; } - - @Override - public boolean setViewValue(View view, Cursor cursor, int columnIndex) { - int faviconIndex = cursor.getColumnIndexOrThrow(URLColumns.FAVICON); - if (columnIndex == faviconIndex) { - return updateImage(view, cursor, faviconIndex); - } - - int titleIndex = cursor.getColumnIndexOrThrow(URLColumns.TITLE); - if (columnIndex == titleIndex) { - return updateTitle(view, cursor, titleIndex); - } - - int urlIndex = cursor.getColumnIndexOrThrow(URLColumns.URL); - if (columnIndex == urlIndex) { - return updateUrl(view, cursor, urlIndex); - } - - int thumbIndex = cursor.getColumnIndexOrThrow(URLColumns.THUMBNAIL); - if (columnIndex == thumbIndex) { - return updateImage(view, cursor, thumbIndex); - } - - // Other columns are handled automatically - return false; - } - } diff --git a/mobile/android/base/Makefile.in b/mobile/android/base/Makefile.in index 2373cb79d934..9dc61fa09b27 100644 --- a/mobile/android/base/Makefile.in +++ b/mobile/android/base/Makefile.in @@ -194,8 +194,8 @@ RES_LAYOUT = \ res/layout/list_item_header.xml \ res/layout/select_dialog_list.xml \ res/layout/abouthome_content.xml \ - res/layout/abouthome_grid_box.xml \ - res/layout/abouthome_addon_list_item.xml \ + res/layout/abouthome_topsite_item.xml \ + res/layout/abouthome_addon_row.xml \ $(NULL) RES_LAYOUT_V11 = \ @@ -224,6 +224,11 @@ RES_ANIM = \ $(NULL) RES_DRAWABLE_MDPI_V8 = \ + res/drawable-mdpi-v8/abouthome_icon.png \ + res/drawable-mdpi-v8/abouthome_logo.png \ + res/drawable-mdpi-v8/abouthome_separator.9.png \ + res/drawable-mdpi-v8/abouthome_topsite_placeholder.png \ + res/drawable-mdpi-v8/abouthome_topsite_shadow.9.png \ res/drawable-mdpi-v8/ic_awesomebar_go.png \ res/drawable-mdpi-v8/ic_awesomebar_search.png \ res/drawable-mdpi-v8/ic_menu_bookmark_add.png \ @@ -246,6 +251,11 @@ RES_DRAWABLE_MDPI_V8 = \ $(NULL) RES_DRAWABLE_HDPI_V8 = \ + res/drawable-hdpi-v8/abouthome_icon.png \ + res/drawable-hdpi-v8/abouthome_logo.png \ + res/drawable-hdpi-v8/abouthome_separator.9.png \ + res/drawable-hdpi-v8/abouthome_topsite_placeholder.png \ + res/drawable-hdpi-v8/abouthome_topsite_shadow.9.png \ res/drawable-hdpi-v8/ic_awesomebar_go.png \ res/drawable-hdpi-v8/ic_awesomebar_search.png \ res/drawable-hdpi-v8/ic_menu_bookmark_add.png \ @@ -318,6 +328,11 @@ RES_DRAWABLE_HDPI_V11 = \ $(NULL) RES_DRAWABLE_XHDPI_V11 = \ + res/drawable-xhdpi-v11/abouthome_icon.png \ + res/drawable-xhdpi-v11/abouthome_logo.png \ + res/drawable-xhdpi-v11/abouthome_separator.9.png \ + res/drawable-xhdpi-v11/abouthome_topsite_placeholder.png \ + res/drawable-xhdpi-v11/abouthome_topsite_shadow.9.png \ res/drawable-xhdpi-v11/ic_awesomebar_go.png \ res/drawable-xhdpi-v11/ic_awesomebar_search.png \ res/drawable-xhdpi-v11/ic_menu_bookmark_add.png \ @@ -346,7 +361,11 @@ MOZ_ANDROID_DRAWABLES += mobile/android/base/resources/drawable/crash_reporter.p RES_LAYOUT += res/layout/crash_reporter.xml endif -MOZ_ANDROID_DRAWABLES += mobile/android/base/resources/drawable/address_bar_bg.xml \ +MOZ_ANDROID_DRAWABLES += mobile/android/base/resources/drawable/abouthome_bg.png \ + mobile/android/base/resources/drawable/abouthome_bg_repeat.xml \ + mobile/android/base/resources/drawable/abouthome_topsites_bg.png \ + mobile/android/base/resources/drawable/abouthome_topsites_bg_repeat.xml \ + mobile/android/base/resources/drawable/address_bar_bg.xml \ mobile/android/base/resources/drawable/address_bar_url_default.xml \ mobile/android/base/resources/drawable/address_bar_url_pressed.xml \ mobile/android/base/resources/drawable/awesomebar_tab_focus.xml \ @@ -387,8 +406,6 @@ MOZ_ANDROID_DRAWABLES += mobile/android/base/resources/drawable/address_bar_bg.x mobile/android/base/resources/drawable/tabs_tray_bg.9.png \ mobile/android/base/resources/drawable/checkerboard.png \ mobile/android/base/resources/drawable/shadow.png \ - mobile/android/base/resources/drawable/rounded_grey_border.xml \ - mobile/android/base/resources/drawable/rounded_grey_box.xml \ $(NULL) diff --git a/mobile/android/base/resources/drawable-hdpi-v8/abouthome_icon.png b/mobile/android/base/resources/drawable-hdpi-v8/abouthome_icon.png new file mode 100644 index 000000000000..b86b49e5ceb0 Binary files /dev/null and b/mobile/android/base/resources/drawable-hdpi-v8/abouthome_icon.png differ diff --git a/mobile/android/base/resources/drawable-hdpi-v8/abouthome_logo.png b/mobile/android/base/resources/drawable-hdpi-v8/abouthome_logo.png new file mode 100644 index 000000000000..a7e92b1d9e30 Binary files /dev/null and b/mobile/android/base/resources/drawable-hdpi-v8/abouthome_logo.png differ diff --git a/mobile/android/base/resources/drawable-hdpi-v8/abouthome_separator.9.png b/mobile/android/base/resources/drawable-hdpi-v8/abouthome_separator.9.png new file mode 100644 index 000000000000..bab5b026fb80 Binary files /dev/null and b/mobile/android/base/resources/drawable-hdpi-v8/abouthome_separator.9.png differ diff --git a/mobile/android/base/resources/drawable-hdpi-v8/abouthome_topsite_placeholder.png b/mobile/android/base/resources/drawable-hdpi-v8/abouthome_topsite_placeholder.png new file mode 100644 index 000000000000..82452a943b7d Binary files /dev/null and b/mobile/android/base/resources/drawable-hdpi-v8/abouthome_topsite_placeholder.png differ diff --git a/mobile/android/base/resources/drawable-hdpi-v8/abouthome_topsite_shadow.9.png b/mobile/android/base/resources/drawable-hdpi-v8/abouthome_topsite_shadow.9.png new file mode 100644 index 000000000000..c3afbe3115cc Binary files /dev/null and b/mobile/android/base/resources/drawable-hdpi-v8/abouthome_topsite_shadow.9.png differ diff --git a/mobile/android/base/resources/drawable-mdpi-v8/abouthome_icon.png b/mobile/android/base/resources/drawable-mdpi-v8/abouthome_icon.png new file mode 100644 index 000000000000..0d48d97514c5 Binary files /dev/null and b/mobile/android/base/resources/drawable-mdpi-v8/abouthome_icon.png differ diff --git a/mobile/android/base/resources/drawable-mdpi-v8/abouthome_logo.png b/mobile/android/base/resources/drawable-mdpi-v8/abouthome_logo.png new file mode 100644 index 000000000000..983bfe730cb8 Binary files /dev/null and b/mobile/android/base/resources/drawable-mdpi-v8/abouthome_logo.png differ diff --git a/mobile/android/base/resources/drawable-mdpi-v8/abouthome_separator.9.png b/mobile/android/base/resources/drawable-mdpi-v8/abouthome_separator.9.png new file mode 100644 index 000000000000..bab5b026fb80 Binary files /dev/null and b/mobile/android/base/resources/drawable-mdpi-v8/abouthome_separator.9.png differ diff --git a/mobile/android/base/resources/drawable-mdpi-v8/abouthome_topsite_placeholder.png b/mobile/android/base/resources/drawable-mdpi-v8/abouthome_topsite_placeholder.png new file mode 100644 index 000000000000..7ae2b283350a Binary files /dev/null and b/mobile/android/base/resources/drawable-mdpi-v8/abouthome_topsite_placeholder.png differ diff --git a/mobile/android/base/resources/drawable-mdpi-v8/abouthome_topsite_shadow.9.png b/mobile/android/base/resources/drawable-mdpi-v8/abouthome_topsite_shadow.9.png new file mode 100644 index 000000000000..478fb92498e7 Binary files /dev/null and b/mobile/android/base/resources/drawable-mdpi-v8/abouthome_topsite_shadow.9.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi-v11/abouthome_icon.png b/mobile/android/base/resources/drawable-xhdpi-v11/abouthome_icon.png new file mode 100644 index 000000000000..0ae236be0550 Binary files /dev/null and b/mobile/android/base/resources/drawable-xhdpi-v11/abouthome_icon.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi-v11/abouthome_logo.png b/mobile/android/base/resources/drawable-xhdpi-v11/abouthome_logo.png new file mode 100644 index 000000000000..b145af558ee1 Binary files /dev/null and b/mobile/android/base/resources/drawable-xhdpi-v11/abouthome_logo.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi-v11/abouthome_separator.9.png b/mobile/android/base/resources/drawable-xhdpi-v11/abouthome_separator.9.png new file mode 100644 index 000000000000..835d47cf69b9 Binary files /dev/null and b/mobile/android/base/resources/drawable-xhdpi-v11/abouthome_separator.9.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi-v11/abouthome_topsite_placeholder.png b/mobile/android/base/resources/drawable-xhdpi-v11/abouthome_topsite_placeholder.png new file mode 100644 index 000000000000..6413a45633ee Binary files /dev/null and b/mobile/android/base/resources/drawable-xhdpi-v11/abouthome_topsite_placeholder.png differ diff --git a/mobile/android/base/resources/drawable-xhdpi-v11/abouthome_topsite_shadow.9.png b/mobile/android/base/resources/drawable-xhdpi-v11/abouthome_topsite_shadow.9.png new file mode 100644 index 000000000000..bad57a716659 Binary files /dev/null and b/mobile/android/base/resources/drawable-xhdpi-v11/abouthome_topsite_shadow.9.png differ diff --git a/mobile/android/base/resources/drawable/abouthome_bg.png b/mobile/android/base/resources/drawable/abouthome_bg.png new file mode 100644 index 000000000000..2e4cd6f328b4 Binary files /dev/null and b/mobile/android/base/resources/drawable/abouthome_bg.png differ diff --git a/mobile/android/base/resources/drawable/abouthome_bg_repeat.xml b/mobile/android/base/resources/drawable/abouthome_bg_repeat.xml new file mode 100644 index 000000000000..b9ec3b97759a --- /dev/null +++ b/mobile/android/base/resources/drawable/abouthome_bg_repeat.xml @@ -0,0 +1,4 @@ + + diff --git a/mobile/android/base/resources/drawable/abouthome_topsites_bg.png b/mobile/android/base/resources/drawable/abouthome_topsites_bg.png new file mode 100644 index 000000000000..ee1472319c9a Binary files /dev/null and b/mobile/android/base/resources/drawable/abouthome_topsites_bg.png differ diff --git a/mobile/android/base/resources/drawable/abouthome_topsites_bg_repeat.xml b/mobile/android/base/resources/drawable/abouthome_topsites_bg_repeat.xml new file mode 100644 index 000000000000..3d764f26fc63 --- /dev/null +++ b/mobile/android/base/resources/drawable/abouthome_topsites_bg_repeat.xml @@ -0,0 +1,4 @@ + + diff --git a/mobile/android/base/resources/drawable/rounded_grey_border.xml b/mobile/android/base/resources/drawable/rounded_grey_border.xml deleted file mode 100644 index c4ec322bf390..000000000000 --- a/mobile/android/base/resources/drawable/rounded_grey_border.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - diff --git a/mobile/android/base/resources/drawable/rounded_grey_box.xml b/mobile/android/base/resources/drawable/rounded_grey_box.xml deleted file mode 100644 index ae0ea76a02f9..000000000000 --- a/mobile/android/base/resources/drawable/rounded_grey_box.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - diff --git a/mobile/android/base/resources/layout/abouthome_addon_list_item.xml b/mobile/android/base/resources/layout/abouthome_addon_list_item.xml deleted file mode 100644 index ded03a24cb4a..000000000000 --- a/mobile/android/base/resources/layout/abouthome_addon_list_item.xml +++ /dev/null @@ -1,7 +0,0 @@ - - diff --git a/mobile/android/base/resources/layout/abouthome_addon_row.xml b/mobile/android/base/resources/layout/abouthome_addon_row.xml new file mode 100644 index 000000000000..cdd4b772593e --- /dev/null +++ b/mobile/android/base/resources/layout/abouthome_addon_row.xml @@ -0,0 +1,8 @@ + + diff --git a/mobile/android/base/resources/layout/abouthome_content.xml b/mobile/android/base/resources/layout/abouthome_content.xml index f02147200311..83156c099b61 100644 --- a/mobile/android/base/resources/layout/abouthome_content.xml +++ b/mobile/android/base/resources/layout/abouthome_content.xml @@ -1,37 +1,112 @@ - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + diff --git a/mobile/android/base/resources/layout/abouthome_grid_box.xml b/mobile/android/base/resources/layout/abouthome_grid_box.xml deleted file mode 100644 index 73c8822165ea..000000000000 --- a/mobile/android/base/resources/layout/abouthome_grid_box.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/mobile/android/base/resources/layout/abouthome_topsite_item.xml b/mobile/android/base/resources/layout/abouthome_topsite_item.xml new file mode 100644 index 000000000000..ed835ee41897 --- /dev/null +++ b/mobile/android/base/resources/layout/abouthome_topsite_item.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + +