Can u provide the code to add search key in status bar and how to mod this in smalis in Dex folder of android.policy.jar. if that isn't possible am then any way I can only fork this on aokp source and just compile android.policy.jar ?
<RelativeLayout android:background="@drawable/notification_header_bg" android:paddingTop="3.0dip" android:paddingRight="3.0dip" android:paddingBottom="5.0dip" android:layout_width="fill_parent" android:layout_height="52.0dip">
<com.android.systemui.statusbar.policy.DateView android:textAppearance="@style/TextAppearance.StatusBar.Date" android:gravity="left|center" android:id="@id/date" android:paddingLeft="16.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:layout_alignParentLeft="true" />
<ImageView android:id="@id/settings_button" android:paddingLeft="4.0dip" android:paddingRight="2.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/ic_notify_quicksettings" android:layout_toRightOf="@id/date" android:contentDescription="@string/accessibility_settings_button" />
<com.android.systemui.statusbar.policy.KeyButtonView android:paddingLeft="2.0dip" android:paddingRight="2.0dip" android:id="@id/recent_apps" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/ic_sysbar_recent" android:layout_toRightOf="@id/settings_button" android:contentDescription="@string/accessibility_recent" systemui:keyCode="187" systemui:glowBackground="@drawable/ic_sysbar_highlight" />
[COLOR="Blue"] <com.android.systemui.statusbar.policy.KeyButtonView android:paddingLeft="2.0dip" android:paddingRight="2.0dip" android:id="@id/back" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/ic_sysbar_back" android:layout_toRightOf="@id/recent_apps" android:contentDescription="@string/accessibility_back" systemui:keyCode="26" systemui:glowBackground="@drawable/ic_sysbar_highlight" />[/COLOR]
<ImageView android:id="@id/clear_all_button" android:paddingLeft="8.0dip" android:paddingRight="8.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/ic_notify_clear" android:layout_alignParentRight="true" android:contentDescription="@string/accessibility_clear_all" />
</RelativeLayout>
Dear evilisto
can you help to provide search button icon??
i try photoshop ic_sysbar_search_land form aokp
but fail (it's so ugly....~"~)
Dear evilisto
can you help to provide search button icon??
i try photoshop ic_sysbar_search_land form aokp
but fail (it's so ugly....~"~)
or you can find many good softkeys images in this thread (by atticus182) :
[SOFTKEYS] [09-03] Softkey Collection 2.0 [GSM/CDMA]
<com.android.systemui.statusbar.policy.KeyButtonView android:paddingLeft="2.0dip" android:paddingRight="2.0dip" android:id="@id/back" android:layout_width="wrap_content" android:layout_height="[COLOR="Red"]wrap_content[/COLOR]" android:src="@drawable/[COLOR="red"]ic_sysbar_search_land[/COLOR]" android:layout_toRightOf="@id/recent_apps" android:contentDescription="@string/accessibility_back" systemui:keyCode="[COLOR="red"]84[/COLOR]" systemui:glowBackground="@drawable/ic_sysbar_highlight" />
very thank
i ps ic_sysbar_search_land.png from phone.apk and it's look wonderful
but i have some problem
the highlight red color is my change place
when i press search button on statusbar
not appear google search, but rather voice search , soundhound other search option
maybe coz's Galaxy S without search button (i use aokp build 28)
but recent app button is work great...^^
sorry my english is very poor
i hope you understand me to express
this my code
Code:<com.android.systemui.statusbar.policy.KeyButtonView android:paddingLeft="2.0dip" android:paddingRight="2.0dip" android:id="@id/back" android:layout_width="wrap_content" android:layout_height="[COLOR="Red"]wrap_content[/COLOR]" android:src="@drawable/[COLOR="red"]ic_sysbar_search_land[/COLOR]" android:layout_toRightOf="@id/recent_apps" android:contentDescription="@string/accessibility_back" systemui:keyCode="[COLOR="red"]84[/COLOR]" systemui:glowBackground="@drawable/ic_sysbar_highlight" />
sorry but as i wrote before, i don't know much about smali..
but adding other buttons is easy. because most of other buttons don't require source code change..
so you can easily add other button just by editing layout xml file only.
here is example : i added 'POWER' button next to 'recent apps' button to use it as replacement of screen lock widget.
Code:<RelativeLayout android:background="@drawable/notification_header_bg" android:paddingTop="3.0dip" android:paddingRight="3.0dip" android:paddingBottom="5.0dip" android:layout_width="fill_parent" android:layout_height="52.0dip"> <com.android.systemui.statusbar.policy.DateView android:textAppearance="@style/TextAppearance.StatusBar.Date" android:gravity="left|center" android:id="@id/date" android:paddingLeft="16.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:layout_alignParentLeft="true" /> <ImageView android:id="@id/settings_button" android:paddingLeft="4.0dip" android:paddingRight="2.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/ic_notify_quicksettings" android:layout_toRightOf="@id/date" android:contentDescription="@string/accessibility_settings_button" /> <com.android.systemui.statusbar.policy.KeyButtonView android:paddingLeft="2.0dip" android:paddingRight="2.0dip" android:id="@id/recent_apps" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/ic_sysbar_recent" android:layout_toRightOf="@id/settings_button" android:contentDescription="@string/accessibility_recent" systemui:keyCode="187" systemui:glowBackground="@drawable/ic_sysbar_highlight" /> [COLOR="Blue"] <com.android.systemui.statusbar.policy.KeyButtonView android:paddingLeft="2.0dip" android:paddingRight="2.0dip" android:id="@id/back" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/ic_sysbar_back" android:layout_toRightOf="@id/recent_apps" android:contentDescription="@string/accessibility_back" systemui:keyCode="26" systemui:glowBackground="@drawable/ic_sysbar_highlight" />[/COLOR] <ImageView android:id="@id/clear_all_button" android:paddingLeft="8.0dip" android:paddingRight="8.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/ic_notify_clear" android:layout_alignParentRight="true" android:contentDescription="@string/accessibility_clear_all" /> </RelativeLayout>
i used 'back' button's id and drawable name because i don't use on-screen softkeys. but i think using other less useful drawable (for example, nyandroid..) is better than this..
in above example, systemui:keyCode="26" is for POWER button. if you change this to 84, this will work as SEARCH button.
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/home" android:paddingLeft="4.0dip" android:paddingRight="4.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/ic_sysbar_apps" android:layout_toRightOf="@id/settings_button" android:contentDescription="@string/accessibility_home" systemui:keyCode="102" systemui:glowBackground="@drawable/ic_sysbar_highlight" />
i am trying to add this line of code for locking the screen to my decompiled statusbarexpanded xml, but its not wanting to show up once recompiled and pushed. i have the multitasking button working great, can you assist please? any other code i need or is it really just basically tricking the back button into working?
don't i need to put something in the phonewindowmanager.java like with the other mod, since softkeys aren't turned on by default?
but adding other buttons is easy. because most of other buttons don't require source code change..
so you can easily add other button just by editing layout xml file only.
} else if (keyCode == KeyEvent.KEYCODE_APP_SWITCH) {
if (down && repeatCount == 0) {
showOrHideRecentAppsDialog(RECENT_APPS_BEHAVIOR_SHOW_OR_DISMISS);
}
return -1;
}
} else if (keyCode == KeyEvent.KEYCODE_APP_SWITCH) {
if (down && repeatCount == 0 && !keyguardOn) {
try {
mStatusBarService.toggleRecentApps();
} catch (RemoteException e) {
Slog.e(TAG, "RemoteException when showing recent apps", e);
}
}
return -1;
}
<RelativeLayout android:background="@drawable/notification_header_bg" android:paddingTop="3.0dip" android:paddingRight="3.0dip" android:paddingBottom="5.0dip" android:layout_width="fill_parent" android:layout_height="52.0dip">
<com.android.systemui.statusbar.policy.DateView android:textAppearance="@style/TextAppearance.StatusBar.Date" android:gravity="left|center" android:id="@id/date" android:paddingLeft="16.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:layout_alignParentLeft="true" />
<ImageView android:id="@id/settings_button" android:paddingLeft="8.0dip" android:paddingRight="8.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/ic_notify_quicksettings" android:layout_toRightOf="@id/date" android:contentDescription="@string/accessibility_settings_button" />
<ImageView android:id="@id/clear_all_button" android:paddingLeft="8.0dip" android:paddingRight="8.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/ic_notify_clear" android:layout_alignParentRight="true" android:contentDescription="@string/accessibility_clear_all" />
</RelativeLayout>
<RelativeLayout android:background="@drawable/notification_header_bg" android:paddingTop="3.0dip" android:paddingRight="3.0dip" android:paddingBottom="5.0dip" android:layout_width="fill_parent" android:layout_height="52.0dip">
<com.android.systemui.statusbar.policy.DateView android:textAppearance="@style/TextAppearance.StatusBar.Date" android:gravity="left|center" android:id="@id/date" android:paddingLeft="16.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:layout_alignParentLeft="true" />
<ImageView android:id="@id/settings_button" android:paddingLeft="8.0dip" android:paddingRight="4.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/ic_notify_quicksettings" android:layout_toRightOf="@id/date" android:contentDescription="@string/accessibility_settings_button" />
[COLOR="Blue"]<com.android.systemui.statusbar.policy.KeyButtonView android:paddingLeft="4.0dip" android:paddingRight="4.0dip" android:id="@id/recent_apps" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/ic_sysbar_recent" android:layout_toRightOf="@id/settings_button" android:contentDescription="@string/accessibility_recent" systemui:keyCode="187" systemui:glowBackground="@drawable/ic_sysbar_highlight" />[/COLOR]
<ImageView android:id="@id/clear_all_button" android:paddingLeft="8.0dip" android:paddingRight="8.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/ic_notify_clear" android:layout_alignParentRight="true" android:contentDescription="@string/accessibility_clear_all" />
</RelativeLayout>
Can u provide the code to add search key in status bar and how to mod this in smalis in Dex folder of android.policy.jar. if that isn't possible am then any way I can only fork this on aokp source and just compile android.policy.jar ?
<RelativeLayout android:background="@drawable/notification_header_bg" android:paddingTop="3.0dip" android:paddingRight="3.0dip" android:paddingBottom="5.0dip" android:layout_width="fill_parent" android:layout_height="52.0dip">
<com.android.systemui.statusbar.policy.DateView android:textAppearance="@style/TextAppearance.StatusBar.Date" android:gravity="left|center" android:id="@id/date" android:paddingLeft="16.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:layout_alignParentLeft="true" />
<ImageView android:id="@id/settings_button" android:paddingLeft="4.0dip" android:paddingRight="2.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/ic_notify_quicksettings" android:layout_toRightOf="@id/date" android:contentDescription="@string/accessibility_settings_button" />
<com.android.systemui.statusbar.policy.KeyButtonView android:paddingLeft="2.0dip" android:paddingRight="2.0dip" android:id="@id/recent_apps" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/ic_sysbar_recent" android:layout_toRightOf="@id/settings_button" android:contentDescription="@string/accessibility_recent" systemui:keyCode="187" systemui:glowBackground="@drawable/ic_sysbar_highlight" />
[COLOR="Blue"] <com.android.systemui.statusbar.policy.KeyButtonView android:paddingLeft="2.0dip" android:paddingRight="2.0dip" android:id="@id/back" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/ic_sysbar_back" android:layout_toRightOf="@id/recent_apps" android:contentDescription="@string/accessibility_back" systemui:keyCode="26" systemui:glowBackground="@drawable/ic_sysbar_highlight" />[/COLOR]
<ImageView android:id="@id/clear_all_button" android:paddingLeft="8.0dip" android:paddingRight="8.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/ic_notify_clear" android:layout_alignParentRight="true" android:contentDescription="@string/accessibility_clear_all" />
</RelativeLayout>
What to do with that file?
I don't know exactly, it's my first own mod
Dear evilisto
can you help to provide search button icon??
i try photoshop ic_sysbar_search_land form aokp
but fail (it's so ugly....~"~)