[Sony Cross-Device Development Themes and Apps] venkat kamesh:
hello guys

After long day

i got free time [emoji14]

Today i am going to share Switch settings and adv Dashboard customization ;)

View attachment 4005661

This mods Contain

Firstly Follow this Guide Implement it ( post 1 and 2 )

If you failed to Implement the about Instructions... then dont try this too [emoji14]

Ok now come to point guys

1. Decompile Settings.apk

2. Open settings.apk/res/layout_land/dashboard_tile.xml

select all the code lines and replace with this

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:minHeight="@dimen/dashboard_tile_minimum_height"
xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent">
<LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="0.0dip" android:layout_weight="1.0">
<ImageView android:id="@+id/icon" android:layout_width="@dimen/dashboard_tile_image_size" android:layout_height="@dimen/dashboard_tile_image_size" android:scaleType="centerInside" android:layout_marginStart="@dimen/dashboard_tile_image_margin_start" android:layout_marginEnd="@dimen/dashboard_tile_image_margin_end" />
<RelativeLayout android:layout_width="0.0dip" android:layout_height="wrap_content" android:layout_weight="1.0">
<TextView android:textAppearance="@style/TextAppearance.TileTitle" android:ellipsize="marquee" android:id="@+id/title" android:fadingEdge="horizontal" android:layout_width="wrap_content" android:layout_height="wrap_content" android:singleLine="true" />
<TextView android:textAppearance="@style/TextAppearance.Small" android:textColor="?android:textColorSecondary" android:id="@+id/status" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@+id/title" android:layout_alignStart="@android:id/title" />
</RelativeLayout>
<Switch android:id="@+id/dashboard_switch" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" android:paddingEnd="@dimen/action_bar_switch_padding" />
</LinearLayout>
<View android:id="@+id/tile_divider" android:background="?android:dividerVertical" android:layout_width="fill_parent" android:layout_height="1.0dip" />
</LinearLayout>
</LinearLayout>

3. Open settings.apk/res/layout/dashboard_tile.xml

select all the code and replace with this code

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:gravity="center_vertical" android:layout_width="fill_parent" android:layout_height="wrap_content" android:minHeight="@dimen/dashboard_tile_minimum_height"
xmlns:android="http://schemas.android.com/apk/res/android">
<ImageView android:id="@+id/icon" android:layout_width="@dimen/dashboard_tile_image_size" android:layout_height="@dimen/dashboard_tile_image_size" android:scaleType="centerInside" android:layout_marginStart="@dimen/dashboard_tile_image_margin_start" android:layout_marginEnd="@dimen/dashboard_tile_image_margin_end" />
<LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent">
<LinearLayout android:gravity="center_vertical" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="0.0dip" android:layout_weight="1.0">
<RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content">
<Switch android:id="@+id/dashboard_switch" android:paddingRight="@dimen/action_bar_switch_padding" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" />
<TextView android:textAppearance="@style/TextAppearance.TileTitle" android:ellipsize="marquee" android:id="@+id/title" android:fadingEdge="horizontal" android:layout_width="wrap_content" android:layout_height="wrap_content" android:singleLine="true" android:layout_toStartOf="@+id/dashboard_switch" android:layout_alignParentStart="true" android:layout_alignParentEnd="false" />
<TextView android:textAppearance="@style/TextAppearance.Small" android:textColor="?android:textColorSecondary" android:id="@+id/status" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@+id/title" android:layout_toStartOf="@+id/dashboard_switch" android:layout_alignStart="@android:id/title" android:layout_alignParentStart="true" />
</RelativeLayout>
</LinearLayout>
<View android:id="@+id/tile_divider" android:background="?android:dividerVertical" android:layout_width="fill_parent" android:layout_height="1.0dip" />
</LinearLayout>
</LinearLayout>

4. Open settings.apk/res/xml/dashboard_categories.xml

find this code

xmlns:android="http://schemas.android.com/apk/res/android" >

Replace with this

xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings">

in the same xml find the lines with the id's wifi_settings and bluetooth_settings ( those lines will be one after other )

Replace those lines with this

<dashboard-tile android:icon="@drawable/ic_settings_wireless" android:id="@+id/wifi_settings" android:title="@string/wifi_settings_title" android:fragment="com.android.settings.wifi.WifiSettings" settings:switchClass="com.android.settings.wifi.WifiEnabler" />
<dashboard-tile android:icon="@drawable/ic_settings_bluetooth2" android:id="@+id/bluetooth_settings" android:title="@string/bluetooth_settings_title" android:fragment="com.android.settings.bluetooth.BluetoothSettings" settings:switchClass="com.android.settings.bluetooth.BluetoothEnabler" />
<dashboard-tile android:icon="@drawable/ic_settings_cellular" android:id="@+id/mobile_networks" android:title="@string/network_settings_title" settings:switchClass="com.android.settings.dashboard.MobileNetworksEnabler">
<intent android:targetPackage="com.android.phone" android:action="android.intent.action.MAIN" android:targetClass="com.android.phone.MobileNetworkSettings" />
</dashboard-tile>

5. Now Download this View attachment 4005260 Merge into your settings

6. Compile and Decompile

Continued in Next post