SyntaxHighlighter

2010/09/20

MEMO: Change the number of screens of Home application and expand widget layout to 8x8

Archos 7 8GB Home Tablet with Android (Black)The Android default home application, Launcher2, has some limitations for compatibility:
  1. Launcher2 has 4x4 appwidget grid.
  2. There are six standard widget sizes, based on a Home screen grid of 4 x 4 (portrait) or 4 x 4 (landscape) cells.
These are considered as Android's default. However, if we have a large screen Android device like a tablet, we may want to utilize a home application more because a home application on such a device can display more information with the large screen than mobile devices.

So here are some hint to expand the ability of Launcher2. Please note the number of home screens and the grid layout should be kept as its standard for compatibility.

  1. How to change the layout of appwidgets:
  2. Modify launcher.java and the layout xml files:
    • launcher.java
    • --- a/src/com/android/launcher2/Launcher.java
      +++ b/src/com/android/launcher2/Launcher.java
      @@ -125,2 +125,2 @@ public final class Launcher extends Activity
      -    static final int NUMBER_CELLS_X = 4;
      -    static final int NUMBER_CELLS_Y = 4;
      +    static final int NUMBER_CELLS_X = 8;
      +    static final int NUMBER_CELLS_Y = 8;
      
    • res/layout-port/launcher.xml
    • res/layout-port/workspace_screen.xml
    • res/values-port/dimens.xml
  3. How to increase the number of home screens
  4. As the same way, modify Launcher.java as follows:
    --- a/src/com/android/launcher2/Launcher.java
    +++ b/src/com/android/launcher2/Launcher.java
    @@ -123 +123 @@ public final class Launcher extends Activity
    -    static final int SCREEN_COUNT = 5;
    +    static final int SCREEN_COUNT = 8;
    

0 件のコメント:

コメントを投稿