[Galaxy S II Themes and Apps] MyLifeRocks10:
Hi guys,:)

I received no. of PMs regarding how to modify or adjust layout of stock JB apps which breaks after changing DPI. So I created this thread to help people modify those stock Samsung JB apps like TWLauncher,Camera,VideoPlayer,Dialer,etc. which breaks after changing DPI.

REQUIREMENTS:

Java

Android SDK

Apk Manager or Apktool or Apk Multitool

Notepad++

Brain and patience:p

I won't teach how to decompile/recompile apk files as there are plenty of guides on how to do that but I will try to help as much as I can if u have specific app errors while decompiling/recompiling.

Also note that I use Windows 7 to do all these works so requirements and tools may vary for other OS.

OK Let's start:

1. TW Launcher

Grab

SecLauncher2.apk

from ur Rom's zip file and decompile it. Then goto values-sw320dp-hdpi folder and open dimens.xml file with Notepad++. In dimens.xml file edit these lines:

For Homescreen:

<dimen name="home_cellWidth_port">80.0dip</dimen>
<dimen name="home_cellHeight_port">96.0dip</dimen>
<dimen name="home_cellGapX_port">0.0dip</dimen>
<dimen name="home_cellGapY_port">0.0dip</dimen>
<dimen name="home_pageMarginRight">0.0dip</dimen>
<dimen name="home_pageMarginLeft">0.0dip</dimen>
<dimen name="home_pageSpacing">-1.0dip</dimen>
<dimen name="home_pageIndicatorTop">402.0dip</dimen>
<dimen name="home_pageIndicatorTopShrunken">402.0dip</dimen>

For App & Widgets Drawer:

<dimen name="menuAppsGrid_pageMarginPlusPaddingTop">4.0dip</dimen>
<dimen name="menuAppsGrid_cellWidth">78.0dip</dimen>
<dimen name="menuAppsGrid_cellHeight">84.0dip</dimen>
<dimen name="menuAppsGrid_cellGapY">0.0dip</dimen>
<dimen name="menu_pageIndicatorGap">8.0dip</dimen>
<dimen name="menu_pageIndicatorTop">428.0dip</dimen>
<dimen name="menuWidgets_pageMarginPlusPaddingTop">13.0dip</dimen>
<dimen name="menuWidgets_previewWidth">138.0dip</dimen>
<dimen name="menuWidgets_previewHeight">100.0dip</dimen>
<dimen name="menuWidgets_cellGapX">20.0dip</dimen>
<dimen name="menuWidgets_cellGapY">1.0dip</dimen>
<dimen name="menuWidgets_pagePaddingLeft">12.0dip</dimen>
<dimen name="menuWidgets_pagePaddingRight">12.0dip</dimen>
<dimen name="app_widget_padding_left">8.0dip</dimen>
<dimen name="app_widget_padding_right">8.0dip</dimen>
<dimen name="app_widget_padding_top">8.0dip</dimen>
<dimen name="app_widget_padding_bottom">8.0dip</dimen>

Note:

U will have experiment with these values to suit ur layout.

To Increase Grid Size:

Open integers.xml from values-sw320dp-hdpi folder and edit these values:

For Homescreen:

<integer name="home_cellCountX">4</integer>
<integer name="home_cellCountY">4</integer>

For App Drawer:

<integer name="menuAppsGrid_cellCountX">4</integer>
<integer name="menuAppsGrid_cellCountY">5</integer>

Then recompile SecLauncher2.apk

2. Camera

Grab

SamsungCamera.apk

and decompile it. Then goto values-sw320dp-hdpi folder, open dimens.xml file with Notepad++ and edit these lines:

<dimen name="recording_icon_pos_x">12.0px</dimen>
<dimen name="recording_icon_pos_y">5.0px</dimen>
<dimen name="sidemenu_shutter_button_image_pos_x">18.0px</dimen>
<dimen name="sidemenu_shutter_button_image_pos_y">218.0px</dimen>
<dimen name="thumbnail_width">53.0px</dimen>
<dimen name="thumbnail_height">53.0px</dimen>

The grey color images on the side will not be adjusted so u will have to replace those grey color images with the transparent one. For this open drawable-sw320dp-hdpi folder and replace camera_normal_opacity_l_bg.png and camera_normal_opacity_r_bg.png images with transparent ones.

Then recompile SamsungCamera.apk

3. VideoPlayer

Grab

VideoPlayer.apk

and decompile it. Goto layout-sw320dp-hdpi folder and open videoplayer_controllayout_horizontal.xml and videoplayer_controllayout_vertical.xml files with Notepad++.

For Portrait Mode:

Open videoplayer_controllayout_vertical.xml file, then search and edit red lines:

<ImageButton android:id="@id/videoplayer_btn_rew" android:background="#00000000" android:layout_width="60.0dip" android:layout_height="60.0dip" [COLOR="Red"]android:layout_marginLeft="66.0dip"[/COLOR] android:src="@drawable/btn_control_rew" android:layout_alignParentLeft="true" android:layout_centerVertical="true" />
<ImageButton android:id="@id/videoplayer_btn_pause" android:background="@drawable/btn_control_play" android:layout_width="60.0dip" android:layout_height="60.0dip" [COLOR="Red"]android:layout_marginLeft="130.0dip"[/COLOR] android:layout_alignParentLeft="true" android:layout_centerVertical="true" />
<ImageButton android:id="@id/videoplayer_btn_ff" android:background="#00000000" android:layout_width="60.0dip" android:layout_height="60.0dip" [COLOR="Red"]android:layout_marginLeft="194.0dip"[/COLOR] android:src="@drawable/btn_control_ff" android:layout_alignParentLeft="true" android:layout_centerVertical="true" />

For Landscape Mode:

Open videoplayer_controllayout_horizontal.xml file,then search and edit red lines:

<ImageButton android:id="@id/videoplayer_btn_rew" android:background="#00000000" android:layout_width="60.0dip" android:layout_height="60.0dip" [COLOR="Red"]android:layout_marginLeft="144.0dip"[/COLOR] android:src="@drawable/btn_control_rew" android:layout_alignParentLeft="true" android:layout_centerVertical="true" />
<ImageButton android:id="@id/videoplayer_btn_pause" android:background="@drawable/btn_control_play" android:layout_width="60.0dip" android:layout_height="60.0dip" [COLOR="Red"]android:layout_marginLeft="240.0dip"[/COLOR] android:layout_alignParentLeft="true" android:layout_centerVertical="true" />
<ImageButton android:id="@id/videoplayer_btn_ff" android:background="#00000000" android:layout_width="60.0dip" android:layout_height="60.0dip" [COLOR="Red"]android:layout_marginLeft="336.0dip"[/COLOR] android:src="@drawable/btn_control_ff" android:layout_alignParentLeft="true" android:layout_centerVertical="true" />

Hint:

U have to increase those values in red lines.

4. Accuweather Widget

Grab

AccuweatherWidget.apk

and decompile it. After decompiling goto values-sw320dp-hdpi folder and open dimens.xml file and edit both lines in that file:

<dimen name="type_b_width">304.0dip</dimen>
<dimen name="type_b_height">176.0dip</dimen>

5. Music Player

1. To be able to resize Music Player's widget both horizontally and vertically on TW Launcher grab

MusicPlayer.apk

and decompile it.

2. Goto xml folder, open music_widget_info.xml file and search for android:resizeMode keyword then make changes as follow:

android:resizeMode="horizontal|vertical"

6. MultiWindow Bar

Grab

FlashBarService.apk

and decompile it.

For Portrait Mode:

Goto values folder,open dimens.xml file and make changes in these lines:

<dimen name="full_width">360.0dip</dimen>
<dimen name="full_height">640.0dip</dimen>
<dimen name="applist_bar_text_size">6.0dip</dimen>
<dimen name="applist_move_button_width">82.0dip</dimen>
<dimen name="applist_appicon_text_width">70.0dip</dimen>
<dimen name="applist_appicon_text_height">18.0dip</dimen>
<dimen name="applist_flash_bar_height">107.0dip</dimen>
<dimen name="applist_flashbar_full_width">360.0dip</dimen>
<dimen name="applist_flashbar_full_height">615.0dip</dimen>

For Landscape Mode:

Goto values-land folder,open dimens.xml and make changes same as above.

I will write guides for Dialer and Calculator aswell but it may take time. Also if u have any problems regarding modifying these apps then post in this thread instead of PMing me so that others can also learn about it.

Happy Modding.;):D

If u don't want to or don't know how to do this then u can find already modded apps in my other thread.

Click Here!