You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2393 lines
174 KiB
Java

package name.mikanoshi.thedarksix;
import static de.robv.android.xposed.XposedHelpers.*;
import java.util.ArrayList;
import com.htc.widget.HtcListView;
import name.mikanoshi.thedarksix.R;
import android.app.Activity;
import android.content.Context;
import android.content.res.AssetManager;
import android.content.res.Resources;
import android.content.res.XModuleResources;
import android.content.res.XResources;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.LightingColorFilter;
import android.graphics.Paint;
import android.graphics.PorterDuffColorFilter;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.hardware.Sensor;
import android.os.Bundle;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewParent;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemSelectedListener;
import android.widget.CheckBox;
import android.widget.EditText;
import android.widget.FrameLayout;
import android.widget.GridView;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.PopupWindow;
import android.widget.RelativeLayout;
import android.widget.ScrollView;
import android.widget.Spinner;
import android.widget.TextView;
import android.widget.Toast;
import de.robv.android.xposed.IXposedHookInitPackageResources;
import de.robv.android.xposed.IXposedHookLoadPackage;
import de.robv.android.xposed.IXposedHookZygoteInit;
import de.robv.android.xposed.XC_MethodHook;
import de.robv.android.xposed.XposedBridge;
import de.robv.android.xposed.XposedHelpers;
import de.robv.android.xposed.callbacks.XC_InitPackageResources.InitPackageResourcesParam;
import de.robv.android.xposed.callbacks.XC_LayoutInflated;
import de.robv.android.xposed.callbacks.XC_LoadPackage.LoadPackageParam;
public class MainModule implements IXposedHookZygoteInit, IXposedHookLoadPackage, IXposedHookInitPackageResources {
private String MODULE_PATH = null;
private final String color = "color";
private final String drawable = "drawable";
private final String layout = "layout";
private static class resItem {
public String pkg;
public String type;
public String name;
public int resId;
resItem(String pkg0, String type0, String name0, int resId0){
pkg = pkg0;
type = type0;
name = name0;
resId = resId0;
}
}
private static void changeToast(View toastView) {
try {
TextView toast = (TextView)toastView.findViewById(android.R.id.message);
toast.setTextColor(toast.getResources().getColor(android.R.color.primary_text_dark));
} catch (Throwable t) {
XposedBridge.log(t);
}
}
@Override
public void initZygote(IXposedHookZygoteInit.StartupParam startupParam) throws Throwable {
MODULE_PATH = startupParam.modulePath;
ArrayList<resItem> allRes = new ArrayList<resItem>();
allRes.add(new resItem("android", color, "background_dark", R.color.background_dark));
allRes.add(new resItem("android", color, "background_light", R.color.background_light));
allRes.add(new resItem("android", color, "bright_foreground_light", R.color.bright_foreground_light));
allRes.add(new resItem("android", color, "bright_foreground_dark", R.color.bright_foreground_dark));
allRes.add(new resItem("android", color, "bright_foreground_dark_disabled", R.color.bright_foreground_dark_disabled));
allRes.add(new resItem("android", color, "bright_foreground_dark_inverse", R.color.bright_foreground_dark_inverse));
allRes.add(new resItem("android", color, "bright_foreground_light_disabled", R.color.bright_foreground_light_disabled));
allRes.add(new resItem("android", color, "bright_foreground_light_inverse", R.color.bright_foreground_light_inverse));
allRes.add(new resItem("android", color, "dim_foreground_light", R.color.dim_foreground_light));
allRes.add(new resItem("android", color, "dim_foreground_light_disabled", R.color.dim_foreground_light_disabled));
allRes.add(new resItem("android", color, "dim_foreground_light_inverse", R.color.dim_foreground_light_inverse));
allRes.add(new resItem("android", color, "dim_foreground_light_inverse_disabled", R.color.dim_foreground_light_inverse_disabled));
allRes.add(new resItem("android", color, "background_holo_dark", R.color.background_holo_dark));
allRes.add(new resItem("android", color, "background_holo_light", R.color.background_holo_light));
allRes.add(new resItem("android", color, "bright_foreground_holo_dark", R.color.bright_foreground_holo_dark));
allRes.add(new resItem("android", color, "bright_foreground_holo_light", R.color.bright_foreground_holo_light));
allRes.add(new resItem("android", color, "bright_foreground_disabled_holo_dark", R.color.bright_foreground_disabled_holo_dark));
allRes.add(new resItem("android", color, "bright_foreground_disabled_holo_light", R.color.bright_foreground_disabled_holo_light));
allRes.add(new resItem("android", color, "bright_foreground_inverse_holo_dark", R.color.bright_foreground_inverse_holo_dark));
allRes.add(new resItem("android", color, "bright_foreground_inverse_holo_light", R.color.bright_foreground_inverse_holo_light));
allRes.add(new resItem("android", color, "dim_foreground_holo_light", R.color.dim_foreground_holo_light));
allRes.add(new resItem("android", color, "dim_foreground_disabled_holo_light", R.color.dim_foreground_disabled_holo_light));
allRes.add(new resItem("android", color, "dim_foreground_inverse_holo_light", R.color.dim_foreground_inverse_holo_light));
allRes.add(new resItem("android", color, "dim_foreground_inverse_disabled_holo_light", R.color.dim_foreground_inverse_disabled_holo_light));
allRes.add(new resItem("android", color, "dim_foreground_holo_dark", R.color.dim_foreground_holo_dark));
allRes.add(new resItem("android", color, "dim_foreground_disabled_holo_dark", R.color.dim_foreground_disabled_holo_dark));
allRes.add(new resItem("android", color, "dim_foreground_inverse_holo_dark", R.color.dim_foreground_inverse_holo_dark));
allRes.add(new resItem("android", color, "dim_foreground_inverse_disabled_holo_dark", R.color.dim_foreground_inverse_disabled_holo_dark));
// UnHolo
allRes.add(new resItem("android", color, "group_button_dialog_pressed_holo_light", R.color.group_button_dialog_pressed_holo_light));
allRes.add(new resItem("android", color, "group_button_dialog_focused_holo_light", R.color.group_button_dialog_focused_holo_light));
allRes.add(new resItem("android", color, "holo_blue_light", R.color.sense_green));
allRes.add(new resItem("android", color, "holo_blue_dark", R.color.sense_green));
allRes.add(new resItem("android", color, "perms_dangerous_grp_color", R.color.perms_dangerous_grp_color));
allRes.add(new resItem("android", color, "perms_dangerous_perm_color", R.color.perms_dangerous_perm_color));
allRes.add(new resItem("android", color, "link_text_light", R.color.link_text_light));
allRes.add(new resItem("android", color, "link_text_holo_light", R.color.link_text_holo_light));
allRes.add(new resItem("android", drawable, "ab_bottom_transparent_dark_holo", R.drawable.ab_bottom_transparent_dark_holo));
allRes.add(new resItem("android", drawable, "ab_bottom_transparent_light_holo", R.drawable.ab_bottom_transparent_light_holo));
allRes.add(new resItem("android", drawable, "ab_transparent_dark_holo", R.drawable.ab_transparent_dark_holo));
allRes.add(new resItem("android", drawable, "ab_transparent_light_holo", R.drawable.ab_transparent_light_holo));
allRes.add(new resItem("android", drawable, "ab_solid_dark_holo", R.drawable.ab_solid_dark_holo));
allRes.add(new resItem("android", drawable, "ab_solid_light_holo", R.drawable.ab_solid_light_holo));
allRes.add(new resItem("android", drawable, "ab_solid_shadow_holo", R.drawable.ab_solid_shadow_holo));
allRes.add(new resItem("android", drawable, "ab_stacked_solid_dark_holo", R.drawable.ab_stacked_solid_dark_holo));
allRes.add(new resItem("android", drawable, "ab_stacked_solid_inverse_holo", R.drawable.ab_stacked_solid_inverse_holo));
allRes.add(new resItem("android", drawable, "ab_stacked_solid_light_holo", R.drawable.ab_stacked_solid_light_holo));
allRes.add(new resItem("android", drawable, "cab_background_bottom_holo_dark", R.drawable.cab_background_bottom_holo_dark));
allRes.add(new resItem("android", drawable, "cab_background_bottom_holo_light", R.drawable.cab_background_bottom_holo_light));
allRes.add(new resItem("android", drawable, "cab_background_top_holo_dark", R.drawable.cab_background_top_holo_dark));
allRes.add(new resItem("android", drawable, "cab_background_top_holo_light", R.drawable.cab_background_top_holo_light));
allRes.add(new resItem("android", drawable, "list_activated_holo", R.drawable.list_activated_holo));
allRes.add(new resItem("android", drawable, "list_focused_holo", R.drawable.list_focused_holo));
allRes.add(new resItem("android", drawable, "list_longpressed_holo", R.drawable.list_longpressed_holo));
allRes.add(new resItem("android", drawable, "magnified_region_frame", R.drawable.magnified_region_frame));
allRes.add(new resItem("android", drawable, "progress_primary_holo_dark", R.drawable.progress_primary_holo_dark));
allRes.add(new resItem("android", drawable, "progress_primary_holo_light", R.drawable.progress_primary_holo_light));
allRes.add(new resItem("android", drawable, "progress_secondary_holo_dark", R.drawable.progress_secondary_holo_dark));
allRes.add(new resItem("android", drawable, "progress_secondary_holo_light", R.drawable.progress_secondary_holo_light));
allRes.add(new resItem("android", drawable, "progressbar_indeterminate_holo1", R.drawable.progressbar_indeterminate_holo1));
allRes.add(new resItem("android", drawable, "progressbar_indeterminate_holo2", R.drawable.progressbar_indeterminate_holo2));
allRes.add(new resItem("android", drawable, "progressbar_indeterminate_holo3", R.drawable.progressbar_indeterminate_holo3));
allRes.add(new resItem("android", drawable, "progressbar_indeterminate_holo4", R.drawable.progressbar_indeterminate_holo4));
allRes.add(new resItem("android", drawable, "progressbar_indeterminate_holo5", R.drawable.progressbar_indeterminate_holo5));
allRes.add(new resItem("android", drawable, "progressbar_indeterminate_holo6", R.drawable.progressbar_indeterminate_holo6));
allRes.add(new resItem("android", drawable, "progressbar_indeterminate_holo7", R.drawable.progressbar_indeterminate_holo7));
allRes.add(new resItem("android", drawable, "progressbar_indeterminate_holo8", R.drawable.progressbar_indeterminate_holo8));
allRes.add(new resItem("android", drawable, "scrubber_control_disabled_holo", R.drawable.scrubber_control_disabled_holo));
allRes.add(new resItem("android", drawable, "scrubber_control_focused_holo", R.drawable.scrubber_control_focused_holo));
allRes.add(new resItem("android", drawable, "scrubber_control_normal_holo", R.drawable.scrubber_control_normal_holo));
allRes.add(new resItem("android", drawable, "scrubber_control_pressed_holo", R.drawable.scrubber_control_pressed_holo));
allRes.add(new resItem("android", drawable, "scrubber_primary_holo", R.drawable.scrubber_primary_holo));
allRes.add(new resItem("android", drawable, "scrubber_secondary_holo", R.drawable.scrubber_secondary_holo));
allRes.add(new resItem("android", drawable, "tab_bottom_holo", R.drawable.tab_bottom_holo));
allRes.add(new resItem("android", drawable, "tab_selected_focused_holo", R.drawable.tab_selected_focused_holo));
allRes.add(new resItem("android", drawable, "tab_selected_holo", R.drawable.tab_selected_holo));
allRes.add(new resItem("android", drawable, "tab_selected_pressed_holo", R.drawable.tab_selected_pressed_holo));
allRes.add(new resItem("android", drawable, "tab_unselected_focused_holo", R.drawable.tab_unselected_focused_holo));
allRes.add(new resItem("android", drawable, "tab_unselected_holo", R.drawable.tab_unselected_holo));
allRes.add(new resItem("android", drawable, "tab_unselected_pressed_holo", R.drawable.tab_unselected_pressed_holo));
allRes.add(new resItem("android", drawable, "text_select_handle_left", R.drawable.text_select_handle_left));
allRes.add(new resItem("android", drawable, "text_select_handle_middle", R.drawable.text_select_handle_middle));
allRes.add(new resItem("android", drawable, "text_select_handle_right", R.drawable.text_select_handle_right));
allRes.add(new resItem("android", drawable, "textfield_activated_holo_dark", R.drawable.textfield_activated_holo_dark));
allRes.add(new resItem("android", drawable, "textfield_activated_holo_light", R.drawable.textfield_activated_holo_light));
allRes.add(new resItem("android", drawable, "textfield_focused_holo_dark", R.drawable.textfield_focused_holo_dark));
allRes.add(new resItem("android", drawable, "textfield_focused_holo_light", R.drawable.textfield_focused_holo_light));
allRes.add(new resItem("android", drawable, "textfield_multiline_activated_holo_dark", R.drawable.textfield_multiline_activated_holo_dark));
allRes.add(new resItem("android", drawable, "textfield_multiline_activated_holo_light", R.drawable.textfield_multiline_activated_holo_light));
allRes.add(new resItem("android", drawable, "textfield_multiline_focused_holo_dark", R.drawable.textfield_multiline_focused_holo_dark));
allRes.add(new resItem("android", drawable, "textfield_multiline_focused_holo_light", R.drawable.textfield_multiline_focused_holo_light));
allRes.add(new resItem("android", drawable, "textfield_search_right_selected_holo_dark", R.drawable.textfield_search_right_selected_holo_dark));
allRes.add(new resItem("android", drawable, "textfield_search_right_selected_holo_light", R.drawable.textfield_search_right_selected_holo_light));
allRes.add(new resItem("android", drawable, "textfield_search_selected_holo_dark", R.drawable.textfield_search_selected_holo_dark));
allRes.add(new resItem("android", drawable, "textfield_search_selected_holo_light", R.drawable.textfield_search_selected_holo_light));
allRes.add(new resItem("android", drawable, "btn_check_off_disabled_focused_holo_dark", R.drawable.btn_check_off_disabled_focused_holo_dark));
allRes.add(new resItem("android", drawable, "btn_check_off_disabled_focused_holo_light", R.drawable.btn_check_off_disabled_focused_holo_light));
allRes.add(new resItem("android", drawable, "btn_check_off_focused_holo_dark", R.drawable.btn_check_off_focused_holo_dark));
allRes.add(new resItem("android", drawable, "btn_check_off_focused_holo_light", R.drawable.btn_check_off_focused_holo_light));
allRes.add(new resItem("android", drawable, "btn_check_on_disabled_focused_holo_dark", R.drawable.btn_check_on_disabled_focused_holo_dark));
allRes.add(new resItem("android", drawable, "btn_check_on_disabled_focused_holo_light", R.drawable.btn_check_on_disabled_focused_holo_light));
allRes.add(new resItem("android", drawable, "btn_check_on_focused_holo_dark", R.drawable.btn_check_on_focused_holo_dark));
allRes.add(new resItem("android", drawable, "btn_check_on_focused_holo_light", R.drawable.btn_check_on_focused_holo_light));
allRes.add(new resItem("android", drawable, "btn_check_on_holo_dark", R.drawable.btn_check_on_holo_dark));
allRes.add(new resItem("android", drawable, "btn_check_on_holo_light", R.drawable.btn_check_on_holo_light));
allRes.add(new resItem("android", drawable, "btn_default_disabled_focused_holo_dark", R.drawable.btn_default_disabled_focused_holo_dark));
allRes.add(new resItem("android", drawable, "btn_default_disabled_focused_holo_light", R.drawable.btn_default_disabled_focused_holo_light));
allRes.add(new resItem("android", drawable, "btn_default_focused_holo", R.drawable.btn_default_focused_holo));
allRes.add(new resItem("android", drawable, "btn_default_focused_holo_dark", R.drawable.btn_default_focused_holo_dark));
allRes.add(new resItem("android", drawable, "btn_default_focused_holo_light", R.drawable.btn_default_focused_holo_light));
allRes.add(new resItem("android", drawable, "btn_radio_off_disabled_focused_holo_dark", R.drawable.btn_radio_off_disabled_focused_holo_dark));
allRes.add(new resItem("android", drawable, "btn_radio_off_disabled_focused_holo_light", R.drawable.btn_radio_off_disabled_focused_holo_light));
allRes.add(new resItem("android", drawable, "btn_radio_off_focused_holo_dark", R.drawable.btn_radio_off_focused_holo_dark));
allRes.add(new resItem("android", drawable, "btn_radio_off_focused_holo_light", R.drawable.btn_radio_off_focused_holo_light));
allRes.add(new resItem("android", drawable, "btn_radio_on_disabled_focused_holo_dark", R.drawable.btn_radio_on_disabled_focused_holo_dark));
allRes.add(new resItem("android", drawable, "btn_radio_on_disabled_focused_holo_light", R.drawable.btn_radio_on_disabled_focused_holo_light));
allRes.add(new resItem("android", drawable, "btn_radio_on_focused_holo_dark", R.drawable.btn_radio_on_focused_holo_dark));
allRes.add(new resItem("android", drawable, "btn_radio_on_focused_holo_light", R.drawable.btn_radio_on_focused_holo_light));
allRes.add(new resItem("android", drawable, "btn_radio_on_holo_dark", R.drawable.btn_radio_on_holo_dark));
allRes.add(new resItem("android", drawable, "btn_radio_on_holo_light", R.drawable.btn_radio_on_holo_light));
allRes.add(new resItem("android", drawable, "btn_square_overlay_normal", R.drawable.btn_square_overlay_normal));
allRes.add(new resItem("android", drawable, "btn_toggle_off_disabled_focused_holo_dark", R.drawable.btn_toggle_off_disabled_focused_holo_dark));
allRes.add(new resItem("android", drawable, "btn_toggle_off_disabled_focused_holo_light", R.drawable.btn_toggle_off_disabled_focused_holo_light));
allRes.add(new resItem("android", drawable, "btn_toggle_off_focused_holo_dark", R.drawable.btn_toggle_off_focused_holo_dark));
allRes.add(new resItem("android", drawable, "btn_toggle_off_focused_holo_light", R.drawable.btn_toggle_off_focused_holo_light));
allRes.add(new resItem("android", drawable, "btn_toggle_on_disabled_focused_holo_dark", R.drawable.btn_toggle_on_disabled_focused_holo_dark));
allRes.add(new resItem("android", drawable, "btn_toggle_on_disabled_focused_holo_light", R.drawable.btn_toggle_on_disabled_focused_holo_light));
allRes.add(new resItem("android", drawable, "btn_toggle_on_disabled_holo_dark", R.drawable.btn_toggle_on_disabled_holo_dark));
allRes.add(new resItem("android", drawable, "btn_toggle_on_disabled_holo_light", R.drawable.btn_toggle_on_disabled_holo_light));
allRes.add(new resItem("android", drawable, "btn_toggle_on_focused_holo_dark", R.drawable.btn_toggle_on_focused_holo_dark));
allRes.add(new resItem("android", drawable, "btn_toggle_on_focused_holo_light", R.drawable.btn_toggle_on_focused_holo_light));
allRes.add(new resItem("android", drawable, "btn_toggle_on_normal_holo_dark", R.drawable.btn_toggle_on_normal_holo_dark));
allRes.add(new resItem("android", drawable, "btn_toggle_on_normal_holo_light", R.drawable.btn_toggle_on_normal_holo_light));
allRes.add(new resItem("android", drawable, "switch_bg_focused_holo_dark", R.drawable.switch_bg_focused_holo_dark));
allRes.add(new resItem("android", drawable, "switch_bg_focused_holo_light", R.drawable.switch_bg_focused_holo_light));
allRes.add(new resItem("android", drawable, "switch_thumb_activated_holo_dark", R.drawable.switch_thumb_activated_holo_dark));
allRes.add(new resItem("android", drawable, "switch_thumb_activated_holo_light", R.drawable.switch_thumb_activated_holo_light));
// Framework
allRes.add(new resItem("com.htc.framework", color, "ap_background_color", R.color.ap_background_color));
allRes.add(new resItem("com.htc.framework", color, "light_expand_list_color", R.color.light_expand_list_color));
allRes.add(new resItem("com.htc.framework", color, "light_primaryfont_color", R.color.light_primaryfont_color));
allRes.add(new resItem("com.htc.framework", color, "light_primaryfont_disable_color", R.color.light_primaryfont_disable_color));
allRes.add(new resItem("com.htc.framework", color, "list_item_bg_center_color", R.color.list_item_bg_center_color));
allRes.add(new resItem("com.htc.framework", color, "list_item_bg_top_color", R.color.list_item_bg_top_color));
allRes.add(new resItem("com.htc.framework", color, "list_item_bg_bottom_color", R.color.list_item_bg_bottom_color));
allRes.add(new resItem("com.htc.framework", color, "text_selection_opacity_color", R.color.text_selection_opacity_color));
allRes.add(new resItem("com.htc.framework", color, "text_selection_color", R.color.text_selection_color));
allRes.add(new resItem("com.htc.framework", color, "multiply_color", R.color.multiply_color));
allRes.add(new resItem("com.htc.framework", color, "multiply_opacity_color", R.color.multiply_opacity_color));
allRes.add(new resItem("com.htc.framework", color, "overlay_color", R.color.overlay_color));
allRes.add(new resItem("com.htc.framework", color, "all_hyperlink_color", R.color.all_hyperlink_color));
allRes.add(new resItem("com.htc", color, "all_hyperlink_color", R.color.all_hyperlink_color));
allRes.add(new resItem("com.htc", color, "ap_background_color", R.color.ap_background_color));
allRes.add(new resItem("com.htc", color, "light_expand_list_color", R.color.light_expand_list_color));
allRes.add(new resItem("com.htc", color, "light_primaryfont_color", R.color.light_primaryfont_color));
allRes.add(new resItem("com.htc", color, "light_primaryfont_disable_color", R.color.light_primaryfont_disable_color));
allRes.add(new resItem("com.htc", color, "list_item_bg_center_color", R.color.list_item_bg_center_color));
allRes.add(new resItem("com.htc", color, "list_item_bg_top_color", R.color.list_item_bg_top_color));
allRes.add(new resItem("com.htc", color, "list_item_bg_bottom_color", R.color.list_item_bg_bottom_color));
allRes.add(new resItem("com.htc", color, "CategoryOne_list_item_bg_center_color", R.color.list_item_bg_center_color));
allRes.add(new resItem("com.htc", color, "CategoryOne_list_item_bg_top_color", R.color.list_item_bg_top_color));
allRes.add(new resItem("com.htc", color, "CategoryOne_list_item_bg_bottom_color", R.color.list_item_bg_bottom_color));
allRes.add(new resItem("com.htc", color, "CategoryTwo_list_item_bg_center_color", R.color.list_item_bg_center_color));
allRes.add(new resItem("com.htc", color, "CategoryTwo_list_item_bg_top_color", R.color.list_item_bg_top_color));
allRes.add(new resItem("com.htc", color, "CategoryTwo_list_item_bg_bottom_color", R.color.list_item_bg_bottom_color));
allRes.add(new resItem("com.htc", color, "CategoryThree_list_item_bg_center_color", R.color.list_item_bg_center_color));
allRes.add(new resItem("com.htc", color, "CategoryThree_list_item_bg_top_color", R.color.list_item_bg_top_color));
allRes.add(new resItem("com.htc", color, "CategoryThree_list_item_bg_bottom_color", R.color.list_item_bg_bottom_color));
allRes.add(new resItem("com.htc", color, "CategoryFour_list_item_bg_center_color", R.color.list_item_bg_center_color));
allRes.add(new resItem("com.htc", color, "CategoryFour_list_item_bg_top_color", R.color.list_item_bg_top_color));
allRes.add(new resItem("com.htc", color, "CategoryFour_list_item_bg_bottom_color", R.color.list_item_bg_bottom_color));
allRes.add(new resItem("com.htc", color, "text_selection_opacity_color", R.color.text_selection_opacity_color));
allRes.add(new resItem("com.htc", color, "text_selection_color", R.color.text_selection_color));
allRes.add(new resItem("com.htc", color, "listview_app_background", R.color.listview_app_background));
allRes.add(new resItem("com.htc", color, "tabfont_color", R.color.tabfont_color));
allRes.add(new resItem("com.htc", color, "focused_color", R.color.focused_color));
allRes.add(new resItem("com.htc", color, "multiply_color", R.color.multiply_color));
allRes.add(new resItem("com.htc", color, "overlay_color", R.color.overlay_color));
allRes.add(new resItem("com.htc", color, "all_hyperlink_color", R.color.all_hyperlink_color));
allRes.add(new resItem("com.htc.framework", drawable, "common_div", R.drawable.common_div));
allRes.add(new resItem("com.htc", drawable, "common_div", R.drawable.common_div));
allRes.add(new resItem("com.htc", drawable, "common_app_bkg_down_land_src", R.drawable.common_app_bkg_down_land_src));
allRes.add(new resItem("com.htc", drawable, "common_app_bkg_down_src", R.drawable.common_app_bkg_down_src));
allRes.add(new resItem("com.htc", drawable, "common_b_bg_div", R.drawable.common_b_bg_div));
allRes.add(new resItem("com.htc", drawable, "common_b_div", R.drawable.common_b_div));
allRes.add(new resItem("com.htc", drawable, "common_b_div_detail", R.drawable.common_b_div_detail));
allRes.add(new resItem("com.htc", drawable, "common_bg_div", R.drawable.common_bg_div));
allRes.add(new resItem("com.htc", drawable, "common_button_rest", R.drawable.common_button_rest));
allRes.add(new resItem("com.htc", drawable, "common_dialogbox_bottom_bright", R.drawable.common_dialogbox_bottom_dark));
allRes.add(new resItem("com.htc", drawable, "common_dialogbox_bottom_dark", R.drawable.common_dialogbox_bottom_dark));
allRes.add(new resItem("com.htc", drawable, "common_dialogbox_bottom_medium", R.drawable.common_dialogbox_bottom_dark));
allRes.add(new resItem("com.htc", drawable, "common_dialogbox_center_bright", R.drawable.common_dialogbox_center_dark));
allRes.add(new resItem("com.htc", drawable, "common_dialogbox_center_dark", R.drawable.common_dialogbox_center_dark));
allRes.add(new resItem("com.htc", drawable, "common_dialogbox_center_medium", R.drawable.common_dialogbox_center_dark));
//allRes.add(new resItem("com.htc", drawable, "common_div_detail", R.drawable.common_div_detail));
allRes.add(new resItem("com.htc", drawable, "common_div_land", R.drawable.common_div_land));
allRes.add(new resItem("com.htc", drawable, "common_div_footer", R.drawable.common_div_footer));
allRes.add(new resItem("com.htc", drawable, "common_dropdown_background", R.drawable.common_dropdown_background));
allRes.add(new resItem("com.htc", drawable, "common_folder_bg", R.drawable.common_folder_bg));
allRes.add(new resItem("com.htc", drawable, "common_grid_background", R.drawable.common_grid_background));
allRes.add(new resItem("com.htc", drawable, "common_icon_clear_input_rest", R.drawable.common_icon_clear_input_rest));
allRes.add(new resItem("com.htc", drawable, "common_list_div_top", R.drawable.common_list_div_top));
allRes.add(new resItem("com.htc", drawable, "common_list_divider", R.drawable.common_list_divider));
allRes.add(new resItem("com.htc", drawable, "common_list_shadow", R.drawable.common_list_shadow));
allRes.add(new resItem("com.htc", drawable, "common_inputfield_full_rest", R.drawable.common_inputfield_full_rest));
allRes.add(new resItem("com.htc", drawable, "common_inputfield_rest", R.drawable.common_inputfield_rest));
allRes.add(new resItem("com.htc", drawable, "common_photo_frame", R.drawable.common_photo_frame));
allRes.add(new resItem("com.htc", drawable, "common_stripe_off", R.drawable.common_stripe_off));
allRes.add(new resItem("com.htc", drawable, "common_tab_div", R.drawable.common_tab_div));
allRes.add(new resItem("com.htc", drawable, "common_timer_shadow", R.drawable.common_timer_shadow));
allRes.add(new resItem("com.htc", drawable, "common_timer_tumblers", R.drawable.common_timer_tumblers));
allRes.add(new resItem("com.htc", drawable, "common_toggle_outer", R.drawable.common_toggle_outer_dark));
allRes.add(new resItem("com.htc", drawable, "common_toggle_rest", R.drawable.common_toggle_rest_dark));
allRes.add(new resItem("com.htc", drawable, "section_b_divider_top", R.drawable.section_b_divider_top));
allRes.add(new resItem("com.htc", drawable, "section_divider_top", R.drawable.section_divider_top));
allRes.add(new resItem("com.htc", drawable, "common_rearrange_frame", R.drawable.common_rearrange_frame));
allRes.add(new resItem("com.htc", drawable, "htcthumb", R.drawable.htcthumb_b));
allRes.add(new resItem("com.htc", drawable, "htcthumb_b", R.drawable.htcthumb_b));
allRes.add(new resItem("android", drawable, "menu_dropdown_panel_holo_dark", R.drawable.menu_dropdown_panel_holo_dark));
//allRes.add(new resItem("android", drawable, "menu_dropdown_panel_holo_light", R.drawable.menu_dropdown_panel_holo_dark));
allRes.add(new resItem("android", drawable, "menu_hardkey_panel_holo_dark", R.drawable.menu_hardkey_panel_holo_dark));
//allRes.add(new resItem("android", drawable, "menu_hardkey_panel_holo_light", R.drawable.menu_hardkey_panel_holo_dark));
allRes.add(new resItem("android", drawable, "background_holo_dark", R.drawable.background_holo_dark));
allRes.add(new resItem("android", drawable, "bottom_bar", R.drawable.bottom_bar));
//allRes.add(new resItem("android", drawable, "btn_square_overlay_normal", R.drawable.btn_square_overlay_normal));
allRes.add(new resItem("android", drawable, "dialog_bottom_holo_dark", R.drawable.dialog_bottom_holo_dark));
allRes.add(new resItem("android", drawable, "dialog_full_holo_dark", R.drawable.dialog_full_holo_dark));
allRes.add(new resItem("android", drawable, "dialog_middle_holo_dark", R.drawable.dialog_middle_holo_dark_android));
allRes.add(new resItem("android", drawable, "dialog_top_holo_dark", R.drawable.dialog_top_holo_dark_android));
allRes.add(new resItem("android", drawable, "dialog_bottom_holo_light", R.drawable.dialog_bottom_holo_dark));
allRes.add(new resItem("android", drawable, "dialog_full_holo_light", R.drawable.dialog_full_holo_dark));
allRes.add(new resItem("android", drawable, "dialog_middle_holo_light", R.drawable.dialog_middle_holo_dark_android));
allRes.add(new resItem("android", drawable, "dialog_top_holo_light", R.drawable.dialog_top_holo_dark_android));
allRes.add(new resItem("android", drawable, "popup_bottom_bright", R.drawable.popup_bottom_dark));
allRes.add(new resItem("android", drawable, "popup_bottom_dark", R.drawable.popup_bottom_dark));
allRes.add(new resItem("android", drawable, "popup_bottom_medium", R.drawable.popup_bottom_dark));
allRes.add(new resItem("android", drawable, "popup_center_bright", R.drawable.popup_center_dark));
allRes.add(new resItem("android", drawable, "popup_center_dark", R.drawable.popup_center_dark));
allRes.add(new resItem("android", drawable, "popup_center_medium", R.drawable.popup_center_dark));
allRes.add(new resItem("android", drawable, "popup_full_bright", R.drawable.popup_full_dark));
allRes.add(new resItem("android", drawable, "popup_full_dark", R.drawable.popup_full_dark));
allRes.add(new resItem("android", drawable, "popup_top_bright", R.drawable.popup_top_dark));
allRes.add(new resItem("android", drawable, "popup_top_dark", R.drawable.popup_top_dark));
allRes.add(new resItem("android", drawable, "seek_thumb_normal", R.drawable.seek_thumb_normal));
allRes.add(new resItem("android", drawable, "title_bar_portrait", R.drawable.title_bar_portrait));
allRes.add(new resItem("android", drawable, "overscroll_edge", R.drawable.overscroll_edge));
allRes.add(new resItem("android", drawable, "overscroll_glow", R.drawable.overscroll_glow));
allRes.add(new resItem("android", drawable, "list_selector_background_focus", R.drawable.list_selector_background_focus));
allRes.add(new resItem("android", drawable, "list_selector_background_longpress", R.drawable.list_selector_background_longpress));
allRes.add(new resItem("android", drawable, "list_selector_background_pressed", R.drawable.list_selector_background_pressed));
final XModuleResources modRes = XModuleResources.createInstance(MODULE_PATH, null);
for (resItem resi : allRes) try {
XResources.setSystemWideReplacement(resi.pkg, resi.type, resi.name, modRes.fwd(resi.resId));
} catch (Throwable t) { XposedBridge.log(t); }
XResources.setSystemWideReplacement("android", drawable, "tab_unselected", new XResources.DrawableLoader() {
@Override
public Drawable newDrawable(XResources res, int id) throws Throwable {
return new ColorDrawable(Color.TRANSPARENT);
}
});
XResources.setSystemWideReplacement("com.htc", drawable, "common_app_bkg", new XResources.DrawableLoader() {
@Override
public Drawable newDrawable(XResources res, int id) throws Throwable {
return new ColorDrawable(modRes.getColor(R.color.ap_background_color));
}
});
XResources.setSystemWideReplacement("com.htc:drawable/common_panel", new XResources.DrawableLoader(){
@Override
public Drawable newDrawable(XResources res, int id) throws Throwable {
return new ColorDrawable(Color.TRANSPARENT);
}
});
XResources.setSystemWideReplacement("com.htc:drawable/common_footer", new XResources.DrawableLoader(){
@Override
public Drawable newDrawable(XResources res, int id) throws Throwable {
return new ColorDrawable(Color.TRANSPARENT);
}
});
findAndHookMethod("com.htc.fragment.widget.CarouselUtil.Skin", null, "getBackgroundColorDark", Context.class, AttributeSet.class, new XC_MethodHook() {
@Override
protected void beforeHookedMethod(final MethodHookParam param) throws Throwable {
param.setResult(0xff161616);
}
});
findAndHookMethod("com.htc.fragment.widget.CarouselUtil.Skin", null, "getBackgroundColorLight", Context.class, AttributeSet.class, new XC_MethodHook() {
@Override
protected void beforeHookedMethod(final MethodHookParam param) throws Throwable {
param.setResult(0xff161616);
}
});
findAndHookMethod("com.htc.fragment.widget.CarouselUtil.Skin", null, "getExpandedBackgroundColor", Context.class, AttributeSet.class, new XC_MethodHook() {
@Override
protected void beforeHookedMethod(final MethodHookParam param) throws Throwable {
param.setResult(0xff161616);
}
});
findAndHookMethod("com.htc.fragment.widget.CarouselUtil.Skin", null, "getExpandedShadowColor", Context.class, AttributeSet.class, new XC_MethodHook() {
@Override
protected void beforeHookedMethod(final MethodHookParam param) throws Throwable {
param.setResult(0xff232323);
}
});
findAndHookMethod("com.htc.view.viewpager.HtcViewPager", null, "initViewPager", new XC_MethodHook() {
@Override
protected void afterHookedMethod(final MethodHookParam param) throws Throwable {
ViewGroup viewPager = (ViewGroup)param.thisObject;
viewPager.setBackgroundColor(0xff161616);
}
});
XposedBridge.hookAllConstructors(findClass("android.widget.ListView", null), new XC_MethodHook() {
@Override
protected void afterHookedMethod(final MethodHookParam param) throws Throwable {
XposedHelpers.setObjectField(param.thisObject, "mLightDivider", new ColorDrawable(0xff161616));
}
});
XposedBridge.hookAllConstructors(findClass("com.htc.widget.HtcReorderListView", null), new XC_MethodHook() {
@Override
protected void afterHookedMethod(final MethodHookParam param) throws Throwable {
Paint mBoundPaint = (Paint)XposedHelpers.getObjectField(param.thisObject, "mBoundPaint");
mBoundPaint.setColorFilter(new LightingColorFilter(0xff000000, 0xff161616));
XposedHelpers.setObjectField(param.thisObject, "mBoundPaint", mBoundPaint);
}
});
findAndHookMethod("android.widget.Editor.SuggestionsPopupWindow", null, "createPopupWindow", new XC_MethodHook() {
@Override
protected void afterHookedMethod(final MethodHookParam param) throws Throwable {
PopupWindow mPopupWindow = (PopupWindow)XposedHelpers.getObjectField(param.thisObject, "mPopupWindow");
if (mPopupWindow != null) mPopupWindow.setBackgroundDrawable(new ColorDrawable(0xff161616));
}
});
try {
XResources.hookSystemWideLayout("android", layout, "transient_notification", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
changeToast(liparam.view);
}
});
findAndHookMethod("android.widget.Toast", null, "makeText", Context.class, CharSequence.class, int.class, new XC_MethodHook() {
@Override
public void afterHookedMethod(final MethodHookParam param) throws Throwable {
Toast tst = (Toast)param.getResult();
if (tst != null) changeToast(tst.getView());
}
});
} catch (Throwable t) {
XposedBridge.log(t);
}
}
@Override
public void handleInitPackageResources(final InitPackageResourcesParam resparam) throws Throwable {
final XModuleResources modRes = XModuleResources.createInstance(MODULE_PATH, resparam.res);
if (resparam.packageName.equals("com.android.systemui")) try {
resparam.res.setReplacement("com.android.systemui", drawable, "status_bar_close_on", modRes.fwd(R.drawable.status_bar_close_on));
//resparam.res.setReplacement("com.android.systemui", drawable, "status_bar_background", modRes.fwd(R.drawable.status_bar_background));
} catch (Throwable t) { XposedBridge.log(t); }
if (resparam.packageName.equals("com.htc.contacts")) try {
resparam.res.setReplacement(resparam.packageName, color, "ap_background_color", modRes.fwd(R.color.background_dark));
resparam.res.setReplacement(resparam.packageName, color, "bright_foreground_light", modRes.fwd(R.color.listview_app_background));
resparam.res.setReplacement(resparam.packageName, color, "bright_foreground_light_inverse", modRes.fwd(R.color.listview_app_background));
resparam.res.setReplacement(resparam.packageName, color, "common_app_bkg", modRes.fwd(R.color.background_dark));
resparam.res.setReplacement(resparam.packageName, color, "divider_black_color", modRes.fwd(R.color.list_item_bg_top_color));
resparam.res.setReplacement(resparam.packageName, color, "black", modRes.fwd(R.color.list_item_bg_top_color));
resparam.res.setReplacement(resparam.packageName, color, "divider_call_color", modRes.fwd(R.color.dialer_green));
resparam.res.setReplacement(resparam.packageName, color, "button_call_font_color", modRes.fwd(R.color.dialer_green));
resparam.res.setReplacement(resparam.packageName, drawable, "phone_keypad_bg", modRes.fwd(R.color.list_item_bg_top_color));
resparam.res.setReplacement(resparam.packageName, drawable, "automotive_phone_bg_keypad", modRes.fwd(R.color.list_item_bg_top_color));
resparam.res.setReplacement(resparam.packageName, drawable, "automotive_phone_bg_keypad_down", modRes.fwd(R.color.list_item_bg_top_color));
resparam.res.setReplacement(resparam.packageName, drawable, "common_dialogbox_bottom_bright", modRes.fwd(R.drawable.common_dialogbox_bottom_dark));
resparam.res.setReplacement(resparam.packageName, drawable, "common_dialogbox_center_bright", modRes.fwd(R.drawable.common_dialogbox_center_dark));
resparam.res.hookLayout(resparam.packageName, layout, "specific_accumulator", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
FrameLayout accumulator_left_btn_parent = (FrameLayout)liparam.view.findViewById(liparam.res.getIdentifier("accumulator_left_btn_parent", "id", resparam.packageName));
if (accumulator_left_btn_parent != null) accumulator_left_btn_parent.setBackgroundColor(modRes.getColor(R.color.list_item_bg_top_color));
LinearLayout accumulator_l = (LinearLayout)liparam.view.findViewById(liparam.res.getIdentifier("accumulator_l", "id", resparam.packageName));
if (accumulator_l != null) accumulator_l.setBackgroundColor(modRes.getColor(R.color.list_item_bg_top_color));
FrameLayout backspace_parent = (FrameLayout)liparam.view.findViewById(liparam.res.getIdentifier("backspace_parent", "id", resparam.packageName));
if (backspace_parent != null) backspace_parent.setBackgroundColor(modRes.getColor(R.color.list_item_bg_top_color));
}
});
resparam.res.hookLayout(resparam.packageName, layout, "main_htc_contact_edit_speed_dial_activity", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
FrameLayout MyFrameLayout = (FrameLayout)liparam.view;
if (MyFrameLayout != null)
MyFrameLayout.setBackgroundColor(modRes.getColor(R.color.listview_app_background));
ScrollView scroll = (ScrollView)liparam.view.findViewById(liparam.res.getIdentifier("scroll", "id", resparam.packageName));
if (scroll != null)
scroll.setBackgroundColor(modRes.getColor(R.color.listview_app_background));
}
});
} catch (Throwable t) { XposedBridge.log(t); }
if (resparam.packageName.equals("com.htc.htccontactwidgets")) try {
resparam.res.setReplacement(resparam.packageName, drawable, "common_panel_light", new XResources.DrawableLoader(){
@Override
public Drawable newDrawable(XResources res, int id) throws Throwable {
return new ColorDrawable(Color.TRANSPARENT);
}
});
} catch (Throwable t) { XposedBridge.log(t); }
if (resparam.packageName.equals("com.htc.fm")) try {
resparam.res.setReplacement(resparam.packageName, color, "ap_background_color", modRes.fwd(R.color.background_dark));
resparam.res.setReplacement(resparam.packageName, drawable, "fmradio_tuner_panel", modRes.fwd(R.drawable.fmradio_tuner_panel));
} catch (Throwable t) { XposedBridge.log(t); }
if (resparam.packageName.equals("com.htc.soundrecorder")) try {
resparam.res.setReplacement(resparam.packageName, color, "ap_background_color", modRes.fwd(R.color.background_dark));
resparam.res.setReplacement(resparam.packageName, color, "selection_light_primaryfont_color", modRes.fwd(R.color.light_primaryfont_color));
resparam.res.setReplacement(resparam.packageName, color, "sound_wave_background_color", modRes.fwd(R.color.recorder_sound_wave_background_color));
resparam.res.setReplacement(resparam.packageName, drawable, "bitmap_voice_recorder_bkg", modRes.fwd(R.drawable.bitmap_voice_recorder_bkg));
resparam.res.setReplacement(resparam.packageName, drawable, "voice_recorder_bkg", modRes.fwd(R.drawable.voice_recorder_bkg));
} catch (Throwable t) { XposedBridge.log(t); }
if (resparam.packageName.equals("com.htc.launcher")) try {
resparam.res.setReplacement(resparam.packageName, color, "side_panel_background_color", modRes.fwd(R.color.dim_foreground_light_inverse));
resparam.res.setReplacement(resparam.packageName, color, "light_primaryfont_color", modRes.fwd(R.color.light_primaryfont_color));
resparam.res.setReplacement(resparam.packageName, color, "light_primaryfont_disable_color", modRes.fwd(R.color.light_primaryfont_disable_color));
resparam.res.setReplacement(resparam.packageName, color, "light_expand_list_color", modRes.fwd(R.color.light_expand_list_color));
resparam.res.setReplacement(resparam.packageName, color, "list_item_bg_center_color", modRes.fwd(R.color.list_item_bg_center_color));
resparam.res.setReplacement(resparam.packageName, color, "list_item_bg_top_color", modRes.fwd(R.color.list_item_bg_top_color));
resparam.res.setReplacement(resparam.packageName, color, "list_item_bg_bottom_color", modRes.fwd(R.color.list_item_bg_bottom_color));
resparam.res.setReplacement(resparam.packageName, color, "text_selection_opacity_color", modRes.fwd(R.color.text_selection_opacity_color));
resparam.res.setReplacement(resparam.packageName, color, "text_selection_color", modRes.fwd(R.color.text_selection_color));
resparam.res.setReplacement(resparam.packageName, color, "listview_app_background", modRes.fwd(R.color.listview_app_background));
resparam.res.setReplacement(resparam.packageName, color, "ap_background_color", modRes.fwd(R.color.ap_background_color));
resparam.res.setReplacement(resparam.packageName, color, "calendar_gridview_background", modRes.fwd(R.color.ap_background_color));
resparam.res.setReplacement(resparam.packageName, color, "feedview_newsbundle_second_content_background", modRes.fwd(R.color.ap_background_color));
resparam.res.setReplacement(resparam.packageName, color, "CategoryOne_ap_background_color", modRes.fwd(R.color.ap_background_color));
resparam.res.setReplacement(resparam.packageName, color, "CategoryTwo_ap_background_color", modRes.fwd(R.color.ap_background_color));
resparam.res.setReplacement(resparam.packageName, color, "CategoryThree_ap_background_color", modRes.fwd(R.color.ap_background_color));
resparam.res.setReplacement(resparam.packageName, color, "CategoryFour_ap_background_color", modRes.fwd(R.color.ap_background_color));
resparam.res.setReplacement(resparam.packageName, color, "tabfont_color", modRes.fwd(R.color.tabfont_color));
resparam.res.setReplacement(resparam.packageName, color, "CategoryOne_tabfont_color", modRes.fwd(R.color.tabfont_color));
resparam.res.setReplacement(resparam.packageName, color, "CategoryTwo_tabfont_color", modRes.fwd(R.color.tabfont_color));
resparam.res.setReplacement(resparam.packageName, color, "CategoryThree_tabfont_color", modRes.fwd(R.color.tabfont_color));
resparam.res.setReplacement(resparam.packageName, color, "CategoryFour_tabfont_color", modRes.fwd(R.color.tabfont_color));
resparam.res.setReplacement(resparam.packageName, color, "focused_color", modRes.fwd(R.color.focused_color));
resparam.res.setReplacement(resparam.packageName, color, "white", modRes.fwd(R.color.list_item_bg_center_color));
resparam.res.setReplacement(resparam.packageName, color, "feedview_newsbundle_second_content_background", modRes.fwd(R.color.list_item_bg_center_color));
resparam.res.setReplacement(resparam.packageName, drawable, "common_app_bkg", modRes.fwd(R.color.ap_background_color));
resparam.res.setReplacement(resparam.packageName, drawable, "common_app_bkg_down_land_src", modRes.fwd(R.drawable.common_app_bkg_down_land_src));
resparam.res.setReplacement(resparam.packageName, drawable, "common_app_bkg_down_src", modRes.fwd(R.drawable.common_app_bkg_down_src));
resparam.res.setReplacement(resparam.packageName, drawable, "common_dropdown_background", modRes.fwd(R.drawable.common_dropdown_background));
resparam.res.setReplacement(resparam.packageName, drawable, "common_div", modRes.fwd(R.drawable.common_div));
resparam.res.setReplacement(resparam.packageName, drawable, "common_div_footer", modRes.fwd(R.drawable.common_div_footer));
resparam.res.setReplacement(resparam.packageName, drawable, "common_list_divider", modRes.fwd(R.drawable.common_list_divider));
resparam.res.setReplacement(resparam.packageName, drawable, "common_b_div", modRes.fwd(R.drawable.common_b_div));
resparam.res.setReplacement(resparam.packageName, drawable, "inset_list_divider", modRes.fwd(R.drawable.common_list_divider));
resparam.res.setReplacement(resparam.packageName, drawable, "section_divider_top", modRes.fwd(R.drawable.section_divider_top));
resparam.res.setReplacement(resparam.packageName, drawable, "section_b_divider_top", modRes.fwd(R.drawable.section_b_divider_top));
resparam.res.setReplacement(resparam.packageName, drawable, "section_b_divider", modRes.fwd(R.drawable.section_b_divider_top));
resparam.res.setReplacement(resparam.packageName, drawable, "common_feed_arrow", modRes.fwd(R.drawable.common_feed_arrow));
resparam.res.setReplacement(resparam.packageName, drawable, "common_circle_pressed", modRes.fwd(R.drawable.common_circle_pressed));
resparam.res.setReplacement(resparam.packageName, drawable, "common_button_rest", modRes.fwd(R.drawable.common_button_rest));
resparam.res.setReplacement(resparam.packageName, drawable, "common_dialogbox_center_bright", modRes.fwd(R.drawable.common_dialogbox_center_bright));
resparam.res.setReplacement(resparam.packageName, drawable, "common_dialogbox_bottom_bright", modRes.fwd(R.drawable.common_dialogbox_bottom_bright));
resparam.res.setReplacement(resparam.packageName, drawable, "common_dialogbox_bottom_medium", modRes.fwd(R.drawable.common_dialogbox_bottom_medium));
resparam.res.setReplacement(resparam.packageName, drawable, "common_dialogbox_full_bright", modRes.fwd(R.drawable.common_dialogbox_full_bright));
resparam.res.hookLayout(resparam.packageName, layout, "specific_feed_grid_view", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
TextView notify_title = (TextView)liparam.view.findViewById(liparam.res.getIdentifier("notify_title", "id", resparam.packageName));
if (notify_title != null)
notify_title.setBackgroundColor(modRes.getColor(R.color.background_dark));
}
});
resparam.res.hookLayout(resparam.packageName, layout, "specific_feedview_newsbundle", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
FrameLayout featured_video_title = (FrameLayout)liparam.view.findViewById(liparam.res.getIdentifier("feed_content_secondary", "id", resparam.packageName));
if (featured_video_title != null)
featured_video_title.setBackgroundColor(modRes.getColor(R.color.background_dark));
}
});
resparam.res.hookLayout(resparam.packageName, layout, "preference_list_content_single", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
LinearLayout headers = (LinearLayout)liparam.view.findViewById(liparam.res.getIdentifier("headers", "id", resparam.packageName));
if (headers != null)
headers.setBackgroundColor(modRes.getColor(R.color.background_dark));
}
});
resparam.res.hookLayout(resparam.packageName, layout, "specific_newsplugin_viewstub_feature_item", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
RelativeLayout feature_layout = (RelativeLayout)liparam.view.findViewById(liparam.res.getIdentifier("feature_layout", "id", resparam.packageName));
if (feature_layout != null) feature_layout.setBackgroundColor(modRes.getColor(R.color.focused_color));
FrameLayout layout1 = (FrameLayout)liparam.view.findViewById(liparam.res.getIdentifier("layout1", "id", resparam.packageName));
if (layout1 != null) layout1.setBackgroundColor(modRes.getColor(R.color.list_item_bg_top_color));
FrameLayout layout2 = (FrameLayout)liparam.view.findViewById(liparam.res.getIdentifier("layout2", "id", resparam.packageName));
if (layout2 != null) layout2.setBackgroundColor(modRes.getColor(R.color.list_item_bg_top_color));
FrameLayout layout3 = (FrameLayout)liparam.view.findViewById(liparam.res.getIdentifier("layout3", "id", resparam.packageName));
if (layout3 != null) layout3.setBackgroundColor(modRes.getColor(R.color.list_item_bg_top_color));
}
});
resparam.res.hookLayout(resparam.packageName, layout, "common_catalog_group_item", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
liparam.view.setBackgroundColor(modRes.getColor(R.color.ap_background_color));
ImageView item_divide = (ImageView)liparam.view.findViewById(liparam.res.getIdentifier("item_divide", "id", resparam.packageName));
if (item_divide != null) {
item_divide.setImageDrawable(null);
item_divide.setBackground(null);
item_divide.setBackgroundColor(0x232323);
}
}
});
} catch (Throwable t) { XposedBridge.log(t); }
if (resparam.packageName.equals("com.htc.album")) try {
resparam.res.setReplacement(resparam.packageName, color, "gallery_common_app_background_color", modRes.fwd(R.color.ap_background_color));
resparam.res.setReplacement(resparam.packageName, color, "gallery_common_drawer_header_color", modRes.fwd(R.color.multiply_color));
resparam.res.setReplacement(resparam.packageName, color, "light_primaryfont_color", modRes.fwd(R.color.light_primaryfont_color));
resparam.res.setReplacement(resparam.packageName, color, "light_primaryfont_disable_color", modRes.fwd(R.color.light_primaryfont_disable_color));
resparam.res.setReplacement(resparam.packageName, color, "light_expand_list_color", modRes.fwd(R.color.light_expand_list_color));
resparam.res.setReplacement(resparam.packageName, color, "list_item_bg_center_color", modRes.fwd(R.color.list_item_bg_center_color));
resparam.res.setReplacement(resparam.packageName, color, "list_item_bg_top_color", modRes.fwd(R.color.list_item_bg_top_color));
resparam.res.setReplacement(resparam.packageName, color, "list_item_bg_bottom_color", modRes.fwd(R.color.list_item_bg_bottom_color));
resparam.res.setReplacement(resparam.packageName, color, "text_selection_opacity_color", modRes.fwd(R.color.text_selection_opacity_color));
resparam.res.setReplacement(resparam.packageName, color, "text_selection_color", modRes.fwd(R.color.text_selection_color));
resparam.res.setReplacement(resparam.packageName, color, "listview_app_background", modRes.fwd(R.color.listview_app_background));
resparam.res.setReplacement(resparam.packageName, color, "ap_background_color", modRes.fwd(R.color.ap_background_color));
resparam.res.setReplacement(resparam.packageName, color, "CategoryOne_ap_background_color", modRes.fwd(R.color.ap_background_color));
resparam.res.setReplacement(resparam.packageName, color, "CategoryTwo_ap_background_color", modRes.fwd(R.color.ap_background_color));
resparam.res.setReplacement(resparam.packageName, color, "CategoryThree_ap_background_color", modRes.fwd(R.color.ap_background_color));
resparam.res.setReplacement(resparam.packageName, color, "CategoryFour_ap_background_color", modRes.fwd(R.color.ap_background_color));
resparam.res.setReplacement(resparam.packageName, color, "tabfont_color", modRes.fwd(R.color.tabfont_color));
resparam.res.setReplacement(resparam.packageName, color, "CategoryOne_tabfont_color", modRes.fwd(R.color.tabfont_color));
resparam.res.setReplacement(resparam.packageName, color, "CategoryTwo_tabfont_color", modRes.fwd(R.color.tabfont_color));
resparam.res.setReplacement(resparam.packageName, color, "CategoryThree_tabfont_color", modRes.fwd(R.color.tabfont_color));
resparam.res.setReplacement(resparam.packageName, color, "CategoryFour_tabfont_color", modRes.fwd(R.color.tabfont_color));
resparam.res.setReplacement(resparam.packageName, color, "focused_color", modRes.fwd(R.color.focused_color));
resparam.res.setReplacement(resparam.packageName, color, "white", modRes.fwd(R.color.list_item_bg_center_color));
resparam.res.setReplacement(resparam.packageName, drawable, "gallery_app_background", modRes.fwd(R.color.ap_background_color));
resparam.res.setReplacement(resparam.packageName, drawable, "common_app_bkg", modRes.fwd(R.color.ap_background_color));
resparam.res.setReplacement(resparam.packageName, drawable, "common_app_bkg_down_land_src", modRes.fwd(R.drawable.common_app_bkg_down_land_src));
resparam.res.setReplacement(resparam.packageName, drawable, "common_app_bkg_down_src", modRes.fwd(R.drawable.common_app_bkg_down_src));
resparam.res.setReplacement(resparam.packageName, drawable, "common_dropdown_background", modRes.fwd(R.drawable.common_dropdown_background));
resparam.res.setReplacement(resparam.packageName, drawable, "common_div", modRes.fwd(R.drawable.common_div));
resparam.res.setReplacement(resparam.packageName, drawable, "common_div_footer", modRes.fwd(R.drawable.common_div_footer));
resparam.res.setReplacement(resparam.packageName, drawable, "common_list_divider", modRes.fwd(R.drawable.common_list_divider));
resparam.res.setReplacement(resparam.packageName, drawable, "common_b_div", modRes.fwd(R.drawable.common_b_div));
resparam.res.setReplacement(resparam.packageName, drawable, "common_inputfield_full_rest", modRes.fwd(R.drawable.common_inputfield_full_rest));
resparam.res.setReplacement(resparam.packageName, drawable, "common_inputfield_rest", modRes.fwd(R.drawable.common_inputfield_rest));
resparam.res.setReplacement(resparam.packageName, drawable, "common_button_rest", modRes.fwd(R.drawable.common_button_rest));
resparam.res.setReplacement(resparam.packageName, drawable, "inset_list_divider", modRes.fwd(R.drawable.common_list_divider));
resparam.res.setReplacement(resparam.packageName, drawable, "section_divider_top", modRes.fwd(R.drawable.section_divider_top));
resparam.res.setReplacement(resparam.packageName, drawable, "section_b_divider_top", modRes.fwd(R.drawable.section_b_divider_top));
resparam.res.setReplacement(resparam.packageName, drawable, "section_b_divider", modRes.fwd(R.drawable.section_b_divider_top));
resparam.res.setReplacement(resparam.packageName, drawable, "common_dialogbox_center_bright", modRes.fwd(R.drawable.common_dialogbox_center_bright));
resparam.res.setReplacement(resparam.packageName, drawable, "common_dialogbox_bottom_bright", modRes.fwd(R.drawable.common_dialogbox_bottom_bright));
resparam.res.setReplacement(resparam.packageName, drawable, "common_dialogbox_bottom_medium", modRes.fwd(R.drawable.common_dialogbox_bottom_medium));
resparam.res.setReplacement(resparam.packageName, drawable, "common_dialogbox_full_bright", modRes.fwd(R.drawable.common_dialogbox_full_bright));
} catch (Throwable t) { XposedBridge.log(t); }
if (resparam.packageName.equals("com.android.settings")) try {
resparam.res.setReplacement(resparam.packageName, color, "background_color", modRes.fwd(R.color.ap_background_color));
resparam.res.setReplacement(resparam.packageName, color, "list_light_background", modRes.fwd(R.color.list_light_background));
resparam.res.setReplacement(resparam.packageName, drawable, "common_list_item_divider", modRes.fwd(R.drawable.common_list_divider));
} catch (Throwable t) { XposedBridge.log(t); }
if (resparam.packageName.equals("com.htc.android.worldclock")) try {
resparam.res.setReplacement(resparam.packageName, color, "light_primaryfont_color", modRes.fwd(R.color.light_primaryfont_color));
resparam.res.setReplacement(resparam.packageName, color, "light_primaryfont_disable_color", modRes.fwd(R.color.light_primaryfont_disable_color));
resparam.res.setReplacement(resparam.packageName, color, "light_expand_list_color", modRes.fwd(R.color.light_expand_list_color));
resparam.res.setReplacement(resparam.packageName, color, "list_item_bg_center_color", modRes.fwd(R.color.list_item_bg_center_color));
resparam.res.setReplacement(resparam.packageName, color, "list_item_bg_top_color", modRes.fwd(R.color.list_item_bg_top_color));
resparam.res.setReplacement(resparam.packageName, color, "list_item_bg_bottom_color", modRes.fwd(R.color.list_item_bg_bottom_color));
resparam.res.setReplacement(resparam.packageName, color, "text_selection_opacity_color", modRes.fwd(R.color.text_selection_opacity_color));
resparam.res.setReplacement(resparam.packageName, color, "text_selection_color", modRes.fwd(R.color.text_selection_color));
resparam.res.setReplacement(resparam.packageName, color, "listview_app_background", modRes.fwd(R.color.listview_app_background));
resparam.res.setReplacement(resparam.packageName, color, "ap_background_color", modRes.fwd(R.color.ap_background_color));
resparam.res.setReplacement(resparam.packageName, color, "tabfont_color", modRes.fwd(R.color.tabfont_color));
resparam.res.setReplacement(resparam.packageName, color, "focused_color", modRes.fwd(R.color.focused_color));
resparam.res.setReplacement(resparam.packageName, color, "white", modRes.fwd(R.color.list_item_bg_center_color));
resparam.res.setReplacement(resparam.packageName, color, "black", modRes.fwd(R.color.worldclock_black));
resparam.res.setReplacement(resparam.packageName, color, "day_color", modRes.fwd(R.color.worldclock_day_color));
//resparam.res.setReplacement(resparam.packageName, color, "list_primary_font_color", modRes.fwd(R.color.worldclock_list_primary_font_color));
//resparam.res.setReplacement(resparam.packageName, color, "list_secondary_font_color", modRes.fwd(R.color.worldclock_list_secondary_font_color));
resparam.res.setReplacement(resparam.packageName, drawable, "common_app_bkg", modRes.fwd(R.color.ap_background_color));
resparam.res.setReplacement(resparam.packageName, drawable, "common_app_bkg_down_land_src", modRes.fwd(R.drawable.common_app_bkg_down_land_src));
resparam.res.setReplacement(resparam.packageName, drawable, "common_app_bkg_down_src", modRes.fwd(R.drawable.common_app_bkg_down_src));
resparam.res.setReplacement(resparam.packageName, drawable, "common_dropdown_background", modRes.fwd(R.drawable.common_dropdown_background));
resparam.res.setReplacement(resparam.packageName, drawable, "common_div", modRes.fwd(R.drawable.common_div));
resparam.res.setReplacement(resparam.packageName, drawable, "common_div_footer", modRes.fwd(R.drawable.common_div_footer));
resparam.res.setReplacement(resparam.packageName, drawable, "common_list_divider", modRes.fwd(R.drawable.common_list_divider));
resparam.res.setReplacement(resparam.packageName, drawable, "common_list_div_top", modRes.fwd(R.drawable.common_list_div_top));
resparam.res.setReplacement(resparam.packageName, drawable, "common_tab_div", modRes.fwd(R.drawable.common_tab_div));
resparam.res.setReplacement(resparam.packageName, drawable, "common_b_div", modRes.fwd(R.drawable.common_b_div));
resparam.res.setReplacement(resparam.packageName, drawable, "common_inputfield_full_rest", modRes.fwd(R.drawable.common_inputfield_full_rest));
resparam.res.setReplacement(resparam.packageName, drawable, "common_inputfield_rest", modRes.fwd(R.drawable.common_inputfield_rest));
resparam.res.setReplacement(resparam.packageName, drawable, "inset_list_divider", modRes.fwd(R.drawable.common_list_divider));
resparam.res.setReplacement(resparam.packageName, drawable, "section_divider_top", modRes.fwd(R.drawable.section_divider_top));
resparam.res.setReplacement(resparam.packageName, drawable, "section_b_divider_top", modRes.fwd(R.drawable.section_b_divider_top));
resparam.res.setReplacement(resparam.packageName, drawable, "section_b_divider", modRes.fwd(R.drawable.section_b_divider_top));
resparam.res.setReplacement(resparam.packageName, drawable, "htcthumb", modRes.fwd(R.drawable.htcthumb_b));
resparam.res.setReplacement(resparam.packageName, drawable, "htcthumb_b", modRes.fwd(R.drawable.htcthumb_b));
resparam.res.setReplacement(resparam.packageName, drawable, "common_dialogbox_center_bright", modRes.fwd(R.drawable.common_dialogbox_center_bright));
resparam.res.setReplacement(resparam.packageName, drawable, "common_dialogbox_bottom_bright", modRes.fwd(R.drawable.common_dialogbox_bottom_bright));
resparam.res.setReplacement(resparam.packageName, drawable, "common_dialogbox_bottom_medium", modRes.fwd(R.drawable.common_dialogbox_bottom_medium));
resparam.res.setReplacement(resparam.packageName, drawable, "common_dialogbox_full_bright", modRes.fwd(R.drawable.common_dialogbox_full_bright));
resparam.res.setReplacement(resparam.packageName, drawable, "common_button_rest", modRes.fwd(R.drawable.common_button_rest));
resparam.res.setReplacement(resparam.packageName, drawable, "common_rearrange_frame", modRes.fwd(R.drawable.common_rearrange_frame));
} catch (Throwable t) { XposedBridge.log(t); }
if (resparam.packageName.equals("com.htc.calendar")) try {
resparam.res.setReplacement(resparam.packageName, color, "tab_bar_background", modRes.fwd(R.color.calendar_tab_bar_background));
resparam.res.setReplacement(resparam.packageName, color, "month_event_color", modRes.fwd(R.color.calendar_month_event_color));
resparam.res.setReplacement(resparam.packageName, color, "month_event_background_color", modRes.fwd(R.color.calendar_month_event_background_color));
resparam.res.setReplacement(resparam.packageName, color, "htc_more_all_day_event", modRes.fwd(R.color.calendar_htc_more_all_day_event));
resparam.res.setReplacement(resparam.packageName, color, "event_center", modRes.fwd(R.color.calendar_event_center));
} catch (Throwable t) { XposedBridge.log(t); }
if (resparam.packageName.equals("com.htc.calculator")) try {
resparam.res.setReplacement(resparam.packageName, color, "lcd_text_color", modRes.fwd(R.color.calculator_lcd_text_color));
resparam.res.setReplacement(resparam.packageName, color, "lcd_background_color", modRes.fwd(R.color.calculator_lcd_background_color));
resparam.res.setReplacement(resparam.packageName, color, "function_button_background_color", modRes.fwd(R.color.calculator_function_button_background_color));
resparam.res.setReplacement(resparam.packageName, color, "number_button_background_color", modRes.fwd(R.color.calculator_number_button_background_color));
resparam.res.setReplacement(resparam.packageName, color, "divider_color", modRes.fwd(R.color.calculator_divider_color));
resparam.res.setReplacement(resparam.packageName, color, "button_sideline_bright_color", modRes.fwd(R.color.calculator_button_sideline_bright_color));
resparam.res.setReplacement(resparam.packageName, color, "button_sideline_shadow_color", modRes.fwd(R.color.calculator_button_sideline_shadow_color));
} catch (Throwable t) { XposedBridge.log(t); }
if (resparam.packageName.equals("com.htc.notes")) try {
resparam.res.setReplacement(resparam.packageName, color, "editor_background", modRes.fwd(R.color.notes_editor_background));
resparam.res.setReplacement(resparam.packageName, color, "textview_background", modRes.fwd(R.color.notes_textview_background));
resparam.res.setReplacement(resparam.packageName, color, "recorder_background", modRes.fwd(R.color.notes_recorder_background));
resparam.res.setReplacement(resparam.packageName, color, "white", modRes.fwd(R.color.list_item_bg_center_color));
resparam.res.setReplacement(resparam.packageName, color, "black", modRes.fwd(R.color.bright_foreground_dark));
resparam.res.setReplacement(resparam.packageName, color, "htc_text_color_white", modRes.fwd(R.color.list_item_bg_center_color));
resparam.res.setReplacement(resparam.packageName, color, "htc_text_color_black", modRes.fwd(R.color.bright_foreground_dark));
} catch (Throwable t) { XposedBridge.log(t); }
if (resparam.packageName.equals("com.android.documentsui")) try {
resparam.res.setReplacement(resparam.packageName, drawable, "ic_breadcrumb_arrow", modRes.fwd(R.drawable.ic_breadcrumb_arrow));
resparam.res.setReplacement(resparam.packageName, drawable, "ic_cab_accept", modRes.fwd(R.drawable.ic_cab_accept));
resparam.res.setReplacement(resparam.packageName, drawable, "ic_cab_cancel", modRes.fwd(R.drawable.ic_cab_cancel));
resparam.res.setReplacement(resparam.packageName, drawable, "ic_cab_select_item", modRes.fwd(R.drawable.ic_cab_select_item));
resparam.res.setReplacement(resparam.packageName, drawable, "ic_dialog_alert", modRes.fwd(R.drawable.ic_dialog_alert));
resparam.res.setReplacement(resparam.packageName, drawable, "ic_dialog_info", modRes.fwd(R.drawable.ic_dialog_info));
resparam.res.setReplacement(resparam.packageName, drawable, "ic_dir_shadow_am", modRes.fwd(R.drawable.ic_dir_shadow_am));
resparam.res.setReplacement(resparam.packageName, drawable, "ic_dir_shadow", modRes.fwd(R.drawable.ic_dir_shadow));
resparam.res.setReplacement(resparam.packageName, drawable, "ic_doc_album", modRes.fwd(R.drawable.ic_doc_album));
resparam.res.setReplacement(resparam.packageName, drawable, "ic_doc_apk", modRes.fwd(R.drawable.ic_doc_apk));
resparam.res.setReplacement(resparam.packageName, drawable, "ic_doc_audio", modRes.fwd(R.drawable.ic_doc_audio));
resparam.res.setReplacement(resparam.packageName, drawable, "ic_doc_certificate", modRes.fwd(R.drawable.ic_doc_certificate));
resparam.res.setReplacement(resparam.packageName, drawable, "ic_doc_codes", modRes.fwd(R.drawable.ic_doc_codes));
resparam.res.setReplacement(resparam.packageName, drawable, "ic_doc_compressed", modRes.fwd(R.drawable.ic_doc_compressed));
resparam.res.setReplacement(resparam.packageName, drawable, "ic_doc_contact", modRes.fwd(R.drawable.ic_doc_contact));
resparam.res.setReplacement(resparam.packageName, drawable, "ic_doc_event", modRes.fwd(R.drawable.ic_doc_event));
resparam.res.setReplacement(resparam.packageName, drawable, "ic_doc_font", modRes.fwd(R.drawable.ic_doc_font));
resparam.res.setReplacement(resparam.packageName, drawable, "ic_doc_generic", modRes.fwd(R.drawable.ic_doc_generic));
resparam.res.setReplacement(resparam.packageName, drawable, "ic_doc_image", modRes.fwd(R.drawable.ic_doc_image));
resparam.res.setReplacement(resparam.packageName, drawable, "ic_doc_pdf", modRes.fwd(R.drawable.ic_doc_pdf));
resparam.res.setReplacement(resparam.packageName, drawable, "ic_doc_presentation", modRes.fwd(R.drawable.ic_doc_presentation));
resparam.res.setReplacement(resparam.packageName, drawable, "ic_doc_spreadsheet", modRes.fwd(R.drawable.ic_doc_spreadsheet));
resparam.res.setReplacement(resparam.packageName, drawable, "ic_doc_text", modRes.fwd(R.drawable.ic_doc_text));
resparam.res.setReplacement(resparam.packageName, drawable, "ic_doc_video", modRes.fwd(R.drawable.ic_doc_video));
resparam.res.setReplacement(resparam.packageName, drawable, "ic_drawer_glyph", modRes.fwd(R.drawable.ic_drawer_glyph));
resparam.res.setReplacement(resparam.packageName, drawable, "ic_drawer_hairline_divider", modRes.fwd(R.drawable.ic_drawer_hairline_divider));
resparam.res.setReplacement(resparam.packageName, drawable, "ic_drawer_shadow_am", modRes.fwd(R.drawable.ic_drawer_shadow_am));
resparam.res.setReplacement(resparam.packageName, drawable, "ic_drawer_shadow", modRes.fwd(R.drawable.ic_drawer_shadow));
resparam.res.setReplacement(resparam.packageName, drawable, "ic_drawer_shadow_tablet_am", modRes.fwd(R.drawable.ic_drawer_shadow_tablet_am));
resparam.res.setReplacement(resparam.packageName, drawable, "ic_drawer_shadow_tablet", modRes.fwd(R.drawable.ic_drawer_shadow_tablet));
resparam.res.setReplacement(resparam.packageName, drawable, "ic_drawer_tall_divider", modRes.fwd(R.drawable.ic_drawer_tall_divider));
resparam.res.setReplacement(resparam.packageName, drawable, "ic_grid_card_background", modRes.fwd(R.drawable.ic_grid_card_background));
resparam.res.setReplacement(resparam.packageName, drawable, "ic_grid_folder", modRes.fwd(R.drawable.ic_grid_folder));
resparam.res.setReplacement(resparam.packageName, drawable, "ic_menu_copy", modRes.fwd(R.drawable.ic_menu_copy));
resparam.res.setReplacement(resparam.packageName, drawable, "ic_menu_delete", modRes.fwd(R.drawable.ic_menu_delete));
resparam.res.setReplacement(resparam.packageName, drawable, "ic_menu_new_folder", modRes.fwd(R.drawable.ic_menu_new_folder));
resparam.res.setReplacement(resparam.packageName, drawable, "ic_menu_overflow", modRes.fwd(R.drawable.ic_menu_overflow));
resparam.res.setReplacement(resparam.packageName, drawable, "ic_menu_rename", modRes.fwd(R.drawable.ic_menu_rename));
resparam.res.setReplacement(resparam.packageName, drawable, "ic_menu_search", modRes.fwd(R.drawable.ic_menu_search));
resparam.res.setReplacement(resparam.packageName, drawable, "ic_menu_settings", modRes.fwd(R.drawable.ic_menu_settings));
resparam.res.setReplacement(resparam.packageName, drawable, "ic_menu_share", modRes.fwd(R.drawable.ic_menu_share));
resparam.res.setReplacement(resparam.packageName, drawable, "ic_menu_sortby", modRes.fwd(R.drawable.ic_menu_sortby));
resparam.res.setReplacement(resparam.packageName, drawable, "ic_menu_undo", modRes.fwd(R.drawable.ic_menu_undo));
resparam.res.setReplacement(resparam.packageName, drawable, "ic_menu_view_grid", modRes.fwd(R.drawable.ic_menu_view_grid));
resparam.res.setReplacement(resparam.packageName, drawable, "ic_menu_view_list", modRes.fwd(R.drawable.ic_menu_view_list));
resparam.res.setReplacement(resparam.packageName, drawable, "ic_open", modRes.fwd(R.drawable.ic_open));
resparam.res.setReplacement(resparam.packageName, drawable, "ic_popout", modRes.fwd(R.drawable.ic_popout));
resparam.res.setReplacement(resparam.packageName, drawable, "ic_root_download", modRes.fwd(R.drawable.ic_root_download));
resparam.res.setReplacement(resparam.packageName, drawable, "ic_root_folder", modRes.fwd(R.drawable.ic_root_folder));
resparam.res.setReplacement(resparam.packageName, drawable, "ic_root_recent", modRes.fwd(R.drawable.ic_root_recent));
resparam.res.setReplacement(resparam.packageName, drawable, "ic_root_sdcard", modRes.fwd(R.drawable.ic_root_sdcard));
resparam.res.setReplacement(resparam.packageName, drawable, "ic_root_usb", modRes.fwd(R.drawable.ic_root_usb));
resparam.res.setReplacement(resparam.packageName, drawable, "ic_subdirectory_arrow", modRes.fwd(R.drawable.ic_subdirectory_arrow));
resparam.res.setReplacement(resparam.packageName, color, "chip", modRes.fwd(R.color.documentsui_chip));
resparam.res.setReplacement(resparam.packageName, color, "item_root_pressed", modRes.fwd(R.color.documentsui_item_root_pressed));
resparam.res.setReplacement(resparam.packageName, color, "item_root_focused", modRes.fwd(R.color.documentsui_item_root_focused));
} catch (Throwable t) { XposedBridge.log(t); }
// Theme YouTube
if (resparam.packageName.equals("com.google.android.youtube")) try {
//resparam.res.setReplacement(resparam.packageName, drawable, "abc_ab_bottom_solid_light_holo", modRes.fwd(R.drawable.abc_ab_bottom_solid_light_holo));
//resparam.res.setReplacement(resparam.packageName, drawable, "abc_ab_solid_light_holo", modRes.fwd(R.drawable.abc_ab_solid_light_holo));
//resparam.res.setReplacement(resparam.packageName, drawable, "abc_ab_stacked_solid_light_holo", modRes.fwd(R.drawable.abc_ab_stacked_solid_light_holo));
resparam.res.setReplacement(resparam.packageName, drawable, "abc_list_selector_disabled_holo_light", modRes.fwd(R.drawable.abc_list_selector_disabled_holo_light));
resparam.res.setReplacement(resparam.packageName, drawable, "abc_menu_hardkey_panel_mtrl_mult", modRes.fwd(R.drawable.abc_menu_hardkey_panel_mtrl_mult));
//resparam.res.setReplacement(resparam.packageName, drawable, "abc_menu_dropdown_panel_holo_light", modRes.fwd(R.drawable.abc_menu_dropdown_panel_holo_light));
//resparam.res.setReplacement(resparam.packageName, drawable, "abc_menu_hardkey_panel_holo_light", modRes.fwd(R.drawable.abc_menu_hardkey_panel_holo_light));
//resparam.res.setReplacement(resparam.packageName, drawable, "action_bar_background", modRes.fwd(R.drawable.action_bar_background));
resparam.res.setReplacement(resparam.packageName, drawable, "framed_card_background", modRes.fwd(R.drawable.framed_card_background));
resparam.res.setReplacement(resparam.packageName, drawable, "card_frame", modRes.fwd(R.drawable.card_frame));
resparam.res.setReplacement(resparam.packageName, drawable, "card_frame_bottom", modRes.fwd(R.drawable.card_frame_bottom));
resparam.res.setReplacement(resparam.packageName, drawable, "card_frame_middle", modRes.fwd(R.drawable.card_frame_middle));
resparam.res.setReplacement(resparam.packageName, drawable, "card_frame_top", modRes.fwd(R.drawable.card_frame_top));
resparam.res.setReplacement(resparam.packageName, drawable, "card_frame_selected", modRes.fwd(R.drawable.card_frame_selected));
resparam.res.setReplacement(resparam.packageName, drawable, "card_frame_bottom_selected", modRes.fwd(R.drawable.card_frame_bottom_selected));
resparam.res.setReplacement(resparam.packageName, drawable, "card_frame_middle_selected", modRes.fwd(R.drawable.card_frame_middle_selected));
resparam.res.setReplacement(resparam.packageName, drawable, "card_frame_top_selected", modRes.fwd(R.drawable.card_frame_top_selected));
resparam.res.setReplacement(resparam.packageName, drawable, "arrow_down", modRes.fwd(R.drawable.arrow_down));
resparam.res.setReplacement(resparam.packageName, drawable, "arrow_up", modRes.fwd(R.drawable.arrow_up));
resparam.res.setReplacement(resparam.packageName, drawable, "btn_subscribed", modRes.fwd(R.drawable.btn_subscribed));
resparam.res.setReplacement(resparam.packageName, drawable, "contextual_menu_anchor_normal", modRes.fwd(R.drawable.contextual_menu_anchor_normal));
resparam.res.setReplacement(resparam.packageName, drawable, "contextual_menu_anchor_pressed", modRes.fwd(R.drawable.contextual_menu_anchor_pressed));
resparam.res.setReplacement(resparam.packageName, drawable, "ic_default_channel_placeholder", modRes.fwd(R.drawable.ic_default_channel_placeholder));
resparam.res.setReplacement(resparam.packageName, drawable, "ic_default_channel_placeholder_bg", modRes.fwd(R.drawable.ic_default_channel_placeholder_bg));
resparam.res.setReplacement(resparam.packageName, drawable, "ic_like_focus", modRes.fwd(R.drawable.ic_like_focus));
resparam.res.setReplacement(resparam.packageName, drawable, "ic_dislike_focus", modRes.fwd(R.drawable.ic_dislike_focus));
resparam.res.setReplacement(resparam.packageName, drawable, "ic_comment_active", modRes.fwd(R.drawable.ic_comment_active));
resparam.res.setReplacement(resparam.packageName, drawable, "ic_playlist_saved", modRes.fwd(R.drawable.ic_playlist_saved));
resparam.res.setReplacement(resparam.packageName, drawable, "ic_setbar_loop_on", modRes.fwd(R.drawable.ic_setbar_loop_on));
resparam.res.setReplacement(resparam.packageName, drawable, "ic_setbar_saved", modRes.fwd(R.drawable.ic_setbar_saved));
resparam.res.setReplacement(resparam.packageName, drawable, "ic_setbar_shuffle_on", modRes.fwd(R.drawable.ic_setbar_shuffle_on));
resparam.res.setReplacement(resparam.packageName, drawable, "ic_thanks_check_bg", modRes.fwd(R.drawable.ic_thanks_check_bg));
resparam.res.setReplacement(resparam.packageName, drawable, "ic_vmoji_blue", modRes.fwd(R.drawable.ic_vmoji_blue));
//resparam.res.setReplacement(resparam.packageName, drawable, "ic_flag", modRes.fwd(R.drawable.ic_flag));
//resparam.res.setReplacement(resparam.packageName, drawable, "ic_menu_add", modRes.fwd(R.drawable.ic_menu_add));
//resparam.res.setReplacement(resparam.packageName, drawable, "ic_menu_search", modRes.fwd(R.drawable.ic_menu_search));
//resparam.res.setReplacement(resparam.packageName, drawable, "ic_menu_upload", modRes.fwd(R.drawable.ic_menu_upload));
//resparam.res.setReplacement(resparam.packageName, drawable, "channel_store_item_border", modRes.fwd(R.drawable.channel_store_item_border));
resparam.res.setReplacement(resparam.packageName, drawable, "tab_divider_dark", modRes.fwd(R.drawable.tab_divider_dark));
resparam.res.setReplacement(resparam.packageName, drawable, "alert_error", modRes.fwd(R.drawable.alert_error));
//resparam.res.setReplacement(resparam.packageName, drawable, "bg_stripes_light", modRes.fwd(R.drawable.bg_stripes_light));
//resparam.res.setReplacement(resparam.packageName, drawable, "bg_stripes_medium", modRes.fwd(R.drawable.bg_stripes_medium));
resparam.res.setReplacement(resparam.packageName, drawable, "missing_avatar", modRes.fwd(R.drawable.missing_avatar));
//resparam.res.setReplacement(resparam.packageName, drawable, "description_fading_edge", modRes.fwd(R.drawable.description_fading_edge));
resparam.res.setReplacement(resparam.packageName, drawable, "remote_watch_dialog_gradient", modRes.fwd(R.drawable.remote_watch_dialog_gradient));
resparam.res.setReplacement(resparam.packageName, drawable, "duration_background", modRes.fwd(R.drawable.duration_background));
resparam.res.setReplacement(resparam.packageName, drawable, "abc_popup_background_mtrl_mult", modRes.fwd(R.drawable.abc_popup_background_mtrl_mult));
resparam.res.setReplacement(resparam.packageName, drawable, "text_badge_outline", modRes.fwd(R.drawable.text_badge_outline));
resparam.res.setReplacement(resparam.packageName, drawable, "abc_textfield_activated_mtrl_alpha", modRes.fwd(R.drawable.abc_textfield_activated_mtrl_alpha));
resparam.res.setReplacement(resparam.packageName, drawable, "abc_textfield_default_mtrl_alpha", modRes.fwd(R.drawable.abc_textfield_default_mtrl_alpha));
resparam.res.setReplacement(resparam.packageName, drawable, "abc_btn_check_to_on_mtrl_000", modRes.fwd(R.drawable.abc_btn_check_to_on_mtrl_000));
resparam.res.setReplacement(resparam.packageName, drawable, "abc_btn_check_to_on_mtrl_015", modRes.fwd(R.drawable.abc_btn_check_to_on_mtrl_015));
resparam.res.setReplacement(resparam.packageName, drawable, "abc_btn_radio_to_on_mtrl_000", modRes.fwd(R.drawable.abc_btn_radio_to_on_mtrl_000));
resparam.res.setReplacement(resparam.packageName, drawable, "abc_btn_radio_to_on_mtrl_015", modRes.fwd(R.drawable.abc_btn_radio_to_on_mtrl_015));
resparam.res.setReplacement(resparam.packageName, drawable, "abc_btn_check_material", modRes.fwd(R.drawable.abc_btn_check_material));
resparam.res.setReplacement(resparam.packageName, drawable, "abc_btn_radio_material", modRes.fwd(R.drawable.abc_btn_radio_material));
resparam.res.setReplacement(resparam.packageName, color, "video_background", modRes.fwd(R.color.youtube_primary_background));
resparam.res.setReplacement(resparam.packageName, color, "primary_background", modRes.fwd(R.color.youtube_primary_background));
resparam.res.setReplacement(resparam.packageName, color, "bright_foreground_material_light", modRes.fwd(R.color.youtube_primary_text_default_material_light));
resparam.res.setReplacement(resparam.packageName, color, "bright_foreground_disabled_material_light", modRes.fwd(R.color.youtube_primary_text_disabled_material_light));
resparam.res.setReplacement(resparam.packageName, color, "dim_foreground_material_light", modRes.fwd(R.color.youtube_primary_text_default_material_light));
resparam.res.setReplacement(resparam.packageName, color, "dim_foreground_disabled_material_light", modRes.fwd(R.color.youtube_primary_text_disabled_material_light));
resparam.res.setReplacement(resparam.packageName, color, "primary_font", modRes.fwd(R.color.youtube_primary_text_default_material_light));
resparam.res.setReplacement(resparam.packageName, color, "dialog_font", modRes.fwd(R.color.youtube_primary_text_default_material_light));
resparam.res.setReplacement(resparam.packageName, color, "white", modRes.fwd(R.color.youtube_white));
resparam.res.setReplacement(resparam.packageName, color, "light_grey", modRes.fwd(R.color.youtube_light_grey));
resparam.res.setReplacement(resparam.packageName, color, "grey", modRes.fwd(R.color.youtube_grey));
resparam.res.setReplacement(resparam.packageName, color, "dark_grey", modRes.fwd(R.color.youtube_dark_grey));
//resparam.res.setReplacement(resparam.packageName, color, "lighter_transparent", modRes.fwd(R.color.youtube_lighter_transparent));
resparam.res.setReplacement(resparam.packageName, color, "light_transparent", modRes.fwd(R.color.youtube_light_transparent));
resparam.res.setReplacement(resparam.packageName, color, "contents_text", modRes.fwd(R.color.youtube_contents_text));
resparam.res.setReplacement(resparam.packageName, color, "encode_view", modRes.fwd(R.color.youtube_encode_view));
resparam.res.setReplacement(resparam.packageName, color, "help_button_view", modRes.fwd(R.color.youtube_help_button_view));
resparam.res.setReplacement(resparam.packageName, color, "help_view", modRes.fwd(R.color.youtube_help_view));
resparam.res.setReplacement(resparam.packageName, color, "result_image_border", modRes.fwd(R.color.youtube_result_image_border));
resparam.res.setReplacement(resparam.packageName, color, "result_minor_text", modRes.fwd(R.color.youtube_result_minor_text));
resparam.res.setReplacement(resparam.packageName, color, "result_text", modRes.fwd(R.color.youtube_result_text));
resparam.res.setReplacement(resparam.packageName, color, "result_view", modRes.fwd(R.color.youtube_result_view));
resparam.res.setReplacement(resparam.packageName, color, "sbc_header_text", modRes.fwd(R.color.youtube_sbc_header_text));
resparam.res.setReplacement(resparam.packageName, color, "sbc_header_view", modRes.fwd(R.color.youtube_sbc_header_view));
resparam.res.setReplacement(resparam.packageName, color, "sbc_list_item", modRes.fwd(R.color.youtube_sbc_list_item));
resparam.res.setReplacement(resparam.packageName, color, "sbc_layout_view", modRes.fwd(R.color.youtube_sbc_layout_view));
resparam.res.setReplacement(resparam.packageName, color, "sbc_page_number_text", modRes.fwd(R.color.youtube_sbc_page_number_text));
resparam.res.setReplacement(resparam.packageName, color, "sbc_snippet_text", modRes.fwd(R.color.youtube_sbc_snippet_text));
resparam.res.setReplacement(resparam.packageName, color, "share_text", modRes.fwd(R.color.youtube_share_text));
resparam.res.setReplacement(resparam.packageName, color, "status_view", modRes.fwd(R.color.youtube_status_view));
resparam.res.setReplacement(resparam.packageName, color, "status_text", modRes.fwd(R.color.youtube_status_text));
resparam.res.setReplacement(resparam.packageName, color, "video_item_duration_font", modRes.fwd(R.color.youtube_video_item_duration_font));
resparam.res.setReplacement(resparam.packageName, color, "video_item_title_font", modRes.fwd(R.color.youtube_video_item_title_font));
resparam.res.setReplacement(resparam.packageName, color, "video_item_uploader_font", modRes.fwd(R.color.youtube_video_item_uploader_font));
resparam.res.setReplacement(resparam.packageName, color, "video_item_light_font", modRes.fwd(R.color.youtube_video_item_light_font));
resparam.res.setReplacement(resparam.packageName, color, "video_item_dark_font", modRes.fwd(R.color.youtube_video_item_dark_font));
resparam.res.setReplacement(resparam.packageName, color, "set_bar_video_item_light_font", modRes.fwd(R.color.youtube_set_bar_video_item_light_font));
resparam.res.setReplacement(resparam.packageName, color, "set_bar_video_item_dark_font", modRes.fwd(R.color.youtube_set_bar_video_item_dark_font));
//resparam.res.setReplacement(resparam.packageName, color, "watch_secondary_color", modRes.fwd(R.color.youtube_watch_secondary_color));
//resparam.res.setReplacement(resparam.packageName, color, "watch_thin_separator_color", modRes.fwd(R.color.youtube_watch_thin_separator_color));
//resparam.res.setReplacement(resparam.packageName, color, "watch_comment_time_color", modRes.fwd(R.color.youtube_watch_comment_time_color));
//resparam.res.setReplacement(resparam.packageName, color, "watch_subscribe_button_text_color", modRes.fwd(R.color.youtube_watch_subscribe_button_text_color));
//resparam.res.setReplacement(resparam.packageName, color, "watch_subscribed_button_text_color", modRes.fwd(R.color.youtube_watch_subscribed_button_text_color));
//resparam.res.setReplacement(resparam.packageName, color, "thumbnail_background_solid_color", modRes.fwd(R.color.youtube_thumbnail_background_solid_color));
resparam.res.setReplacement(resparam.packageName, color, "card_separator", modRes.fwd(R.color.youtube_card_separator_color));
resparam.res.setReplacement(resparam.packageName, color, "ics_grey", modRes.fwd(R.color.youtube_ics_grey));
//resparam.res.setReplacement(resparam.packageName, color, "ics_dark_grey", modRes.fwd(R.color.youtube_ics_dark_grey));
//resparam.res.setReplacement(resparam.packageName, color, "ics_blue", modRes.fwd(R.color.youtube_ics_blue));
resparam.res.setReplacement(resparam.packageName, color, "ics_blue_glow", modRes.fwd(R.color.youtube_ics_blue_glow));
resparam.res.setReplacement(resparam.packageName, color, "primary_text_default_material_light", modRes.fwd(R.color.youtube_primary_text_default_material_light));
resparam.res.setReplacement(resparam.packageName, color, "secondary_text_default_material_light", modRes.fwd(R.color.youtube_secondary_text_default_material_light));
resparam.res.setReplacement(resparam.packageName, color, "primary_text_disabled_material_light", modRes.fwd(R.color.youtube_primary_text_disabled_material_light));
resparam.res.setReplacement(resparam.packageName, color, "secondary_text_disabled_material_light", modRes.fwd(R.color.youtube_secondary_text_disabled_material_light));
//resparam.res.setReplacement(resparam.packageName, color, "q_light_background", modRes.fwd(R.color.youtube_primary_background));
resparam.res.setReplacement(resparam.packageName, color, "background_material_light", modRes.fwd(R.color.youtube_primary_background));
resparam.res.setReplacement(resparam.packageName, color, "background_floating_material_light", modRes.fwd(R.color.youtube_primary_background));
resparam.res.setReplacement(resparam.packageName, color, "bright_foreground_material_dark", modRes.fwd(R.color.youtube_primary_background));
resparam.res.setReplacement(resparam.packageName, color, "q_subscribe_button_paid_subscribe_font_color", modRes.fwd(R.color.sense_green));
resparam.res.setReplacement(resparam.packageName, color, "guide_background", modRes.fwd(R.color.youtube_primary_background));
resparam.res.setReplacement(resparam.packageName, color, "guide_bg_selected", modRes.fwd(R.color.youtube_light_grey));
//resparam.res.setReplacement(resparam.packageName, color, "quantum_guide_background", modRes.fwd(R.color.youtube_primary_background));
//resparam.res.setReplacement(resparam.packageName, color, "guide_divider", modRes.fwd(R.color.youtube_primary_background));
//resparam.res.setReplacement(resparam.packageName, color, "guide_label_divider", modRes.fwd(R.color.youtube_primary_background));
resparam.res.setReplacement(resparam.packageName, color, "playlist_header_color_primary", modRes.fwd(R.color.youtube_playlist_header_color_primary));
resparam.res.setReplacement(resparam.packageName, color, "highlighted_text_material_light", modRes.fwd(R.color.highlighted_text_sense_light));
resparam.res.setReplacement(resparam.packageName, color, "material_deep_teal_200", modRes.fwd(R.color.sense_green));
resparam.res.setReplacement(resparam.packageName, color, "material_deep_teal_500", modRes.fwd(R.color.sense_green));
resparam.res.setReplacement(resparam.packageName, color, "accent_material_light", modRes.fwd(R.color.sense_green));
resparam.res.setReplacement(resparam.packageName, color, "link_text_material_light", modRes.fwd(R.color.sense_green));
resparam.res.setReplacement(resparam.packageName, color, "playlist_channel_clickable_text_color", modRes.fwd(R.color.sense_green));
//resparam.res.setReplacement(resparam.packageName, color, "quantum_search_action_bar_color", modRes.fwd(R.color.youtube_playlist_header_color_primary));
resparam.res.setReplacement(resparam.packageName, color, "theme_search_color_primary", modRes.fwd(R.color.youtube_playlist_header_color_primary));
resparam.res.setReplacement(resparam.packageName, color, "theme_native_actionbar_text_color_primary", modRes.fwd(R.color.youtube_primary_text));
resparam.res.setReplacement(resparam.packageName, color, "theme_native_actionbar_text_color_secondary", modRes.fwd(R.color.youtube_primary_text));
resparam.res.setReplacement(resparam.packageName, color, "theme_search_actionbar_text_color_primary", modRes.fwd(R.color.youtube_primary_text));
resparam.res.setReplacement(resparam.packageName, color, "theme_search_actionbar_text_color_secondary", modRes.fwd(R.color.youtube_primary_text));
resparam.res.setReplacement(resparam.packageName, color, "text_color_secondary_default_light", modRes.fwd(R.color.youtube_primary_text));
//resparam.res.setReplacement(resparam.packageName, "dimen", "guide_separator_height", modRes.fwd(R.dimen.guide_separator_height));
resparam.res.setReplacement(resparam.packageName, "dimen", "card_separator_height", modRes.fwd(R.dimen.card_separator_height));
/*
resparam.res.hookLayout(resparam.packageName, layout, "annotation_overlay", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
TextView featured_video_title = (TextView)liparam.view.findViewById(liparam.res.getIdentifier("featured_video_title", "id", resparam.packageName));
if (featured_video_title != null) featured_video_title.setTextColor(modRes.getColor(R.color.youtube_set_bar_video_item_light_font));
}
});
*/
resparam.res.hookLayout(resparam.packageName, layout, "guide_fragment", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
LinearLayout guide_fragment = (LinearLayout)liparam.view;
if (guide_fragment != null) guide_fragment.setBackgroundColor(modRes.getColor(R.color.youtube_primary_background));
}
});
resparam.res.hookLayout(resparam.packageName, layout, "watch_while_activity_content", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
FrameLayout pane_fragment_container = (FrameLayout)liparam.view.findViewById(liparam.res.getIdentifier("pane_fragment_container", "id", resparam.packageName));
((LinearLayout)pane_fragment_container.getParent()).setBackgroundColor(modRes.getColor(R.color.youtube_primary_background));
}
});
resparam.res.hookLayout(resparam.packageName, layout, "c4_tabbed_header_item", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
TextView channel_title = (TextView)liparam.view.findViewById(liparam.res.getIdentifier("channel_title", "id", resparam.packageName));
if (channel_title != null) {
channel_title.setTextColor(modRes.getColor(R.color.youtube_primary_text_default_material_light));
try {
((LinearLayout)channel_title.getParent().getParent()).setBackgroundColor(modRes.getColor(R.color.youtube_primary_background));
} catch (Throwable t) {}
}
TextView channel_subtitle = (TextView)liparam.view.findViewById(liparam.res.getIdentifier("channel_subtitle", "id", resparam.packageName));
if (channel_subtitle != null)
channel_subtitle.setTextColor(modRes.getColor(R.color.youtube_secondary_text_default_material_light));
ImageView channel_avatar = (ImageView)liparam.view.findViewById(liparam.res.getIdentifier("channel_avatar", "id", resparam.packageName));
channel_avatar.setBackgroundColor(modRes.getColor(R.color.youtube_primary_background));
LinearLayout channel_header_content = (LinearLayout)liparam.view.findViewById(liparam.res.getIdentifier("channel_header_content", "id", resparam.packageName));
channel_header_content.setBackgroundColor(modRes.getColor(R.color.youtube_primary_background));
ImageView separator = (ImageView)liparam.view.findViewById(liparam.res.getIdentifier("separator", "id", resparam.packageName));
replaceImageSeparator(separator);
LinearLayout header = (LinearLayout)liparam.view;
if (header.getChildCount() > 2) {
View separator2 = header.getChildAt(1);
replaceSeparator(separator2);
}
}
});
resparam.res.hookLayout(resparam.packageName, layout, "set_bar", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
TextView set_title = (TextView)liparam.view.findViewById(liparam.res.getIdentifier("set_title", "id", resparam.packageName));
if (set_title != null)
set_title.setTextColor(modRes.getColor(R.color.youtube_set_bar_video_item_dark_font));
}
});
resparam.res.hookLayout(resparam.packageName, layout, "set_bar_video_item", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
View separator = liparam.view.findViewById(liparam.res.getIdentifier("separator", "id", resparam.packageName));
replaceSeparator(separator);
}
});
resparam.res.hookLayout(resparam.packageName, layout, "compact_video_item", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
TextView duration = (TextView)liparam.view.findViewById(liparam.res.getIdentifier("duration", "id", resparam.packageName));
if (duration != null)
duration.setTextColor(modRes.getColor(R.color.youtube_video_item_duration_font));
}
});
resparam.res.hookLayout(resparam.packageName, layout, "q_compact_video_item", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
TextView duration = (TextView)liparam.view.findViewById(liparam.res.getIdentifier("duration", "id", resparam.packageName));
if (duration != null)
duration.setTextColor(modRes.getColor(R.color.youtube_video_item_duration_font));
TextView title = (TextView)liparam.view.findViewById(liparam.res.getIdentifier("title", "id", resparam.packageName));
if (title != null)
title.setTextColor(modRes.getColor(R.color.youtube_primary_text_default_material_light));
}
});
resparam.res.hookLayout(resparam.packageName, layout, "compact_movie_item", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
TextView duration = (TextView)liparam.view.findViewById(liparam.res.getIdentifier("duration", "id", resparam.packageName));
if (duration != null)
duration.setTextColor(modRes.getColor(R.color.youtube_video_item_duration_font));
TextView title = (TextView)liparam.view.findViewById(liparam.res.getIdentifier("title", "id", resparam.packageName));
if (title != null)
title.setTextColor(modRes.getColor(R.color.youtube_primary_text_default_material_light));
}
});
resparam.res.hookLayout(resparam.packageName, layout, "q_compact_movie_item", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
TextView duration = (TextView)liparam.view.findViewById(liparam.res.getIdentifier("duration", "id", resparam.packageName));
if (duration != null)
duration.setTextColor(modRes.getColor(R.color.youtube_video_item_duration_font));
TextView title = (TextView)liparam.view.findViewById(liparam.res.getIdentifier("title", "id", resparam.packageName));
if (title != null)
title.setTextColor(modRes.getColor(R.color.youtube_primary_text_default_material_light));
}
});
resparam.res.hookLayout(resparam.packageName, layout, "shelf_header", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
TextView title = (TextView)liparam.view.findViewById(liparam.res.getIdentifier("title", "id", resparam.packageName));
if (title != null)
title.setTextColor(modRes.getColor(R.color.youtube_primary_text_default_material_light));
}
});
resparam.res.hookLayout(resparam.packageName, layout, "q_shelf_header", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
TextView title = (TextView)liparam.view.findViewById(liparam.res.getIdentifier("title", "id", resparam.packageName));
if (title != null)
title.setTextColor(modRes.getColor(R.color.youtube_primary_text_default_material_light));
}
});
resparam.res.hookLayout(resparam.packageName, layout, "offline_video_item", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
TextView duration = (TextView)liparam.view.findViewById(liparam.res.getIdentifier("duration", "id", resparam.packageName));
if (duration != null)
duration.setTextColor(modRes.getColor(R.color.youtube_video_item_duration_font));
}
});
resparam.res.hookLayout(resparam.packageName, layout, "upload_item", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
TextView duration = (TextView)liparam.view.findViewById(liparam.res.getIdentifier("duration", "id", resparam.packageName));
if (duration != null)
duration.setTextColor(modRes.getColor(R.color.youtube_video_item_duration_font));
TextView title = (TextView)liparam.view.findViewById(liparam.res.getIdentifier("title", "id", resparam.packageName));
if (title != null)
title.setTextColor(modRes.getColor(R.color.youtube_primary_text_default_material_light));
}
});
resparam.res.hookLayout(resparam.packageName, layout, "distiller_comment_reply", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
TextView author = (TextView)liparam.view.findViewById(liparam.res.getIdentifier("author", "id", resparam.packageName));
if (author != null)
author.setTextColor(modRes.getColor(R.color.youtube_primary_text_default_material_light));
TextView comment = (TextView)liparam.view.findViewById(liparam.res.getIdentifier("comment", "id", resparam.packageName));
if (comment != null)
comment.setTextColor(modRes.getColor(R.color.youtube_secondary_text_default_material_light));
TextView comment_metadata = (TextView)liparam.view.findViewById(liparam.res.getIdentifier("comment_metadata", "id", resparam.packageName));
if (comment_metadata != null)
comment_metadata.setTextColor(modRes.getColor(R.color.youtube_primary_text_disabled_material_light));
}
});
resparam.res.hookLayout(resparam.packageName, layout, "q_distiller_comment_reply", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
TextView author = (TextView)liparam.view.findViewById(liparam.res.getIdentifier("author", "id", resparam.packageName));
if (author != null)
author.setTextColor(modRes.getColor(R.color.youtube_primary_text_default_material_light));
TextView comment = (TextView)liparam.view.findViewById(liparam.res.getIdentifier("comment", "id", resparam.packageName));
if (comment != null)
comment.setTextColor(modRes.getColor(R.color.youtube_secondary_text_default_material_light));
TextView comment_metadata = (TextView)liparam.view.findViewById(liparam.res.getIdentifier("comment_metadata", "id", resparam.packageName));
if (comment_metadata != null)
comment_metadata.setTextColor(modRes.getColor(R.color.youtube_primary_text_disabled_material_light));
}
});
resparam.res.hookLayout(resparam.packageName, layout, "distiller_load_more_button", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
ImageView separator = (ImageView)liparam.view.findViewById(liparam.res.getIdentifier("comment_separator", "id", resparam.packageName));
replaceImageSeparator(separator);
}
});
resparam.res.hookLayout(resparam.packageName, layout, "q_distiller_load_more_button", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
ImageView separator = (ImageView)liparam.view.findViewById(liparam.res.getIdentifier("comment_separator", "id", resparam.packageName));
replaceImageSeparator(separator);
}
});
resparam.res.hookLayout(resparam.packageName, layout, "watch_card_list_item_separator", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
replaceSeparator(liparam.view);
}
});
/*
resparam.res.hookLayout(resparam.packageName, layout, "q_watch_card_list_item_separator", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
replaceSeparator(liparam.view);
}
});
*/
resparam.res.hookLayout(resparam.packageName, layout, "like_dislike_panel", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
View separator = liparam.view.findViewById(liparam.res.getIdentifier("separator", "id", resparam.packageName));
replaceSeparator(separator);
}
});
resparam.res.hookLayout(resparam.packageName, layout, "q_like_dislike_panel", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
View separator = liparam.view.findViewById(liparam.res.getIdentifier("separator", "id", resparam.packageName));
replaceSeparator(separator);
}
});
resparam.res.hookLayout(resparam.packageName, layout, "video_feed_entry", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
View separator = liparam.view.findViewById(liparam.res.getIdentifier("separator", "id", resparam.packageName));
replaceSeparator(separator);
}
});
/*
resparam.res.hookLayout(resparam.packageName, layout, "q_video_feed_entry", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
View separator = liparam.view.findViewById(liparam.res.getIdentifier("separator", "id", resparam.packageName));
replaceSeparator(separator);
}
});
*/
resparam.res.hookLayout(resparam.packageName, layout, "detailed_video_item", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
ImageView separator = (ImageView)liparam.view.findViewById(liparam.res.getIdentifier("separator", "id", resparam.packageName));
replaceImageSeparator(separator);
}
});
/*
resparam.res.hookLayout(resparam.packageName, layout, "guide_channel_header", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
LinearLayout header = (LinearLayout)liparam.view;
if (header.getChildCount() > 2) {
View separator = header.getChildAt(1);
replaceSeparator(separator);
}
TextView channel_title = (TextView)liparam.view.findViewById(liparam.res.getIdentifier("channel_title", "id", resparam.packageName));
if (channel_title != null) {
channel_title.setTextColor(modRes.getColor(R.color.youtube_primary_text_default_material_light));
try {
((LinearLayout)channel_title.getParent().getParent().getParent()).setBackgroundColor(modRes.getColor(R.color.youtube_primary_background));
} catch (Throwable t) {}
}
TextView channel_subscribers = (TextView)liparam.view.findViewById(liparam.res.getIdentifier("channel_subscribers", "id", resparam.packageName));
if (channel_subscribers != null)
channel_subscribers.setTextColor(modRes.getColor(R.color.youtube_secondary_text_default_material_light));
}
});
*/
resparam.res.hookLayout(resparam.packageName, layout, "q_channel_header", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
TextView channel_title = (TextView)liparam.view.findViewById(liparam.res.getIdentifier("channel_title", "id", resparam.packageName));
if (channel_title != null) {
channel_title.setTextColor(modRes.getColor(R.color.youtube_primary_text_default_material_light));
try {
((LinearLayout)channel_title.getParent()).setBackgroundColor(modRes.getColor(R.color.youtube_primary_background));
} catch (Throwable t) {}
}
ImageView channel_avatar = (ImageView)liparam.view.findViewById(liparam.res.getIdentifier("channel_avatar", "id", resparam.packageName));
channel_avatar.setBackgroundColor(modRes.getColor(R.color.youtube_primary_background));
View separator = liparam.view.findViewById(liparam.res.getIdentifier("separator", "id", resparam.packageName));
replaceSeparator(separator);
}
});
resparam.res.hookLayout(resparam.packageName, layout, "channel_about_metadata_item", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
LinearLayout header = (LinearLayout)liparam.view;
if (header.getChildCount() > 0) {
View separator = header.getChildAt(0);
replaceSeparator(separator);
}
View description_separator = liparam.view.findViewById(liparam.res.getIdentifier("description_separator", "id", resparam.packageName));
replaceSeparator(description_separator);
View stats_separator = liparam.view.findViewById(liparam.res.getIdentifier("stats_separator", "id", resparam.packageName));
replaceSeparator(stats_separator);
TextView views = (TextView)liparam.view.findViewById(liparam.res.getIdentifier("views", "id", resparam.packageName));
if (views != null)
views.setTextColor(modRes.getColor(R.color.youtube_secondary_text_default_material_light));
TextView subscribers = (TextView)liparam.view.findViewById(liparam.res.getIdentifier("subscribers", "id", resparam.packageName));
if (subscribers != null)
subscribers.setTextColor(modRes.getColor(R.color.youtube_secondary_text_default_material_light));
}
});
resparam.res.hookLayout(resparam.packageName, layout, "q_video_owner_item_landscape", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
TextView channel_title = (TextView)liparam.view.findViewById(liparam.res.getIdentifier("channel_title", "id", resparam.packageName));
if (channel_title != null)
channel_title.setTextColor(modRes.getColor(R.color.youtube_primary_text_default_material_light));
TextView channel_subscribers = (TextView)liparam.view.findViewById(liparam.res.getIdentifier("channel_subscribers", "id", resparam.packageName));
if (channel_subscribers != null)
channel_subscribers.setTextColor(modRes.getColor(R.color.youtube_secondary_text_default_material_light));
}
});
resparam.res.hookLayout(resparam.packageName, layout, "q_video_owner_item_portrait", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
TextView channel_title = (TextView)liparam.view.findViewById(liparam.res.getIdentifier("channel_title", "id", resparam.packageName));
if (channel_title != null)
channel_title.setTextColor(modRes.getColor(R.color.youtube_primary_text_default_material_light));
TextView channel_subscribers = (TextView)liparam.view.findViewById(liparam.res.getIdentifier("channel_subscribers", "id", resparam.packageName));
if (channel_subscribers != null)
channel_subscribers.setTextColor(modRes.getColor(R.color.youtube_secondary_text_default_material_light));
}
});
resparam.res.hookLayout(resparam.packageName, layout, "video_owner_item", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
TextView channel_title = (TextView)liparam.view.findViewById(liparam.res.getIdentifier("channel_title", "id", resparam.packageName));
if (channel_title != null)
channel_title.setTextColor(modRes.getColor(R.color.youtube_primary_text_default_material_light));
TextView channel_subscribers = (TextView)liparam.view.findViewById(liparam.res.getIdentifier("channel_subscribers", "id", resparam.packageName));
if (channel_subscribers != null)
channel_subscribers.setTextColor(modRes.getColor(R.color.youtube_secondary_text_default_material_light));
}
});
resparam.res.hookLayout(resparam.packageName, layout, "playlist_info_dialog_fragment", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
TextView channel = (TextView)liparam.view.findViewById(liparam.res.getIdentifier("channel", "id", resparam.packageName));
channel.setTextColor(modRes.getColor(R.color.sense_green));
View content = liparam.view.findViewById(liparam.res.getIdentifier("content", "id", resparam.packageName));
replaceSeparator(content);
View title = liparam.view.findViewById(liparam.res.getIdentifier("title", "id", resparam.packageName));
replaceSeparator((LinearLayout)title.getParent());
}
});
resparam.res.hookLayout(resparam.packageName, layout, "card_item_chrome", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
ImageView separator = (ImageView)liparam.view.findViewById(liparam.res.getIdentifier("separator", "id", resparam.packageName));
replaceImageSeparator(separator);
}
});
resparam.res.hookLayout(resparam.packageName, layout, "distiller_header", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
ImageView separator = (ImageView)liparam.view.findViewById(liparam.res.getIdentifier("separator", "id", resparam.packageName));
replaceImageSeparator(separator);
EditText add_comment_button = (EditText)liparam.view.findViewById(liparam.res.getIdentifier("add_comment_button", "id", resparam.packageName));
if (add_comment_button != null) {
add_comment_button.setTextColor(modRes.getColor(R.color.youtube_secondary_text_default_material_light));
add_comment_button.setHintTextColor(modRes.getColor(R.color.youtube_secondary_text_default_material_light));
add_comment_button.setBackgroundResource(liparam.res.getIdentifier("abc_edit_text_material", "drawable", resparam.packageName));
}
}
});
resparam.res.hookLayout(resparam.packageName, layout, "q_distiller_header", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
EditText add_comment_button = (EditText)liparam.view.findViewById(liparam.res.getIdentifier("add_comment_button", "id", resparam.packageName));
if (add_comment_button != null) {
add_comment_button.setTextColor(modRes.getColor(R.color.youtube_secondary_text_default_material_light));
add_comment_button.setHintTextColor(modRes.getColor(R.color.youtube_secondary_text_default_material_light));
add_comment_button.setBackgroundResource(liparam.res.getIdentifier("abc_edit_text_material", "drawable", resparam.packageName));
}
}
});
resparam.res.hookLayout(resparam.packageName, layout, "playlist_header", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
View separator = liparam.view.findViewById(liparam.res.getIdentifier("playlist_header_separator", "id", resparam.packageName));
replaceSeparator(separator);
LinearLayout actionsBar = (LinearLayout)liparam.view.findViewById(liparam.res.getIdentifier("actions_bar", "id", resparam.packageName));
replaceSeparator(actionsBar);
}
});
resparam.res.hookLayout(resparam.packageName, layout, "q_playlist_header", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
View background = liparam.view.findViewById(liparam.res.getIdentifier("background", "id", resparam.packageName));
if (background != null)
background.setBackgroundColor(modRes.getColor(R.color.youtube_playlist_header_color_secondary));
}
});
resparam.res.hookLayout(resparam.packageName, layout, "contextual_menu_layout", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
ListView popuplistview = (ListView)liparam.view.findViewById(liparam.res.getIdentifier("items", "id", resparam.packageName));
replaceSeparator(popuplistview);
}
});
resparam.res.hookLayout(resparam.packageName, layout, "contextual_menu_item_layout", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
TextView text = (TextView)liparam.view.findViewById(liparam.res.getIdentifier("text", "id", resparam.packageName));
if (text != null)
text.setTextColor(modRes.getColor(R.color.youtube_primary_text_default_material_light));
LinearLayout contexual_menu_item = (LinearLayout)liparam.view.findViewById(liparam.res.getIdentifier("contexual_menu_item", "id", resparam.packageName));
if (contexual_menu_item != null)
contexual_menu_item.setBackgroundColor(modRes.getColor(R.color.youtube_thumbnail_background_solid_color));
}
});
resparam.res.hookLayout(resparam.packageName, layout, "text_link_item", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
TextView linkitem = (TextView)liparam.view;
linkitem.setTextColor(modRes.getColor(R.color.sense_green));
}
});
resparam.res.hookLayout(resparam.packageName, layout, "about_tab_link_item", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
TextView title = (TextView)liparam.view.findViewById(liparam.res.getIdentifier("title", "id", resparam.packageName));
title.setTextColor(modRes.getColor(R.color.sense_green));
}
});
resparam.res.hookLayout(resparam.packageName, layout, "distiller_load_more_button", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
TextView text = (TextView)liparam.view.findViewById(liparam.res.getIdentifier("text", "id", resparam.packageName));
if (text != null)
text.setTextColor(modRes.getColor(R.color.sense_green));
}
});
resparam.res.hookLayout(resparam.packageName, layout, "q_distiller_load_more_button", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
TextView text = (TextView)liparam.view.findViewById(liparam.res.getIdentifier("text", "id", resparam.packageName));
if (text != null)
text.setTextColor(modRes.getColor(R.color.sense_green));
}
});
resparam.res.hookLayout(resparam.packageName, layout, "distiller_top_level_comment", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
TextView author = (TextView)liparam.view.findViewById(liparam.res.getIdentifier("author", "id", resparam.packageName));
if (author != null)
author.setTextColor(modRes.getColor(R.color.youtube_primary_text_default_material_light));
TextView comment = (TextView)liparam.view.findViewById(liparam.res.getIdentifier("comment", "id", resparam.packageName));
if (comment != null)
comment.setTextColor(modRes.getColor(R.color.youtube_secondary_text_default_material_light));
TextView comment_metadata = (TextView)liparam.view.findViewById(liparam.res.getIdentifier("comment_metadata", "id", resparam.packageName));
if (comment_metadata != null)
comment_metadata.setTextColor(modRes.getColor(R.color.youtube_primary_text_disabled_material_light));
TextView show_replies = (TextView)liparam.view.findViewById(liparam.res.getIdentifier("show_replies", "id", resparam.packageName));
show_replies.setTextColor(modRes.getColor(R.color.sense_green));
ImageView separator = (ImageView)liparam.view.findViewById(liparam.res.getIdentifier("comment_separator", "id", resparam.packageName));
replaceImageSeparator(separator);
}
});
resparam.res.hookLayout(resparam.packageName, layout, "q_distiller_top_level_comment", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
TextView author = (TextView)liparam.view.findViewById(liparam.res.getIdentifier("author", "id", resparam.packageName));
if (author != null)
author.setTextColor(modRes.getColor(R.color.youtube_primary_text_default_material_light));
TextView comment = (TextView)liparam.view.findViewById(liparam.res.getIdentifier("comment", "id", resparam.packageName));
if (comment != null)
comment.setTextColor(modRes.getColor(R.color.youtube_secondary_text_default_material_light));
TextView comment_metadata = (TextView)liparam.view.findViewById(liparam.res.getIdentifier("comment_metadata", "id", resparam.packageName));
if (comment_metadata != null)
comment_metadata.setTextColor(modRes.getColor(R.color.youtube_primary_text_disabled_material_light));
TextView show_replies = (TextView)liparam.view.findViewById(liparam.res.getIdentifier("show_replies", "id", resparam.packageName));
show_replies.setTextColor(modRes.getColor(R.color.sense_green));
ImageView separator = (ImageView)liparam.view.findViewById(liparam.res.getIdentifier("comment_separator", "id", resparam.packageName));
replaceImageSeparator(separator);
}
});
resparam.res.hookLayout(resparam.packageName, layout, "query_refinements_link", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
TextView channel = (TextView)liparam.view;
channel.setTextColor(modRes.getColor(R.color.sense_green));
}
});
resparam.res.hookLayout(resparam.packageName, layout, "watch_info_card_portrait", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
TextView title = (TextView)liparam.view.findViewById(liparam.res.getIdentifier("title", "id", resparam.packageName));
if (title != null)
title.setTextColor(modRes.getColor(R.color.youtube_primary_text_default_material_light));
TextView description = (TextView)liparam.view.findViewById(liparam.res.getIdentifier("description", "id", resparam.packageName));
if (description != null)
description.setTextColor(modRes.getColor(R.color.youtube_secondary_text_default_material_light));
View separator = liparam.view.findViewById(liparam.res.getIdentifier("separator", "id", resparam.packageName));
replaceSeparator(separator);
}
});
/*
resparam.res.hookLayout(resparam.packageName, layout, "q_watch_info_card_portrait", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
TextView title = (TextView)liparam.view.findViewById(liparam.res.getIdentifier("title", "id", resparam.packageName));
if (title != null)
title.setTextColor(modRes.getColor(R.color.youtube_primary_text_default_material_light));
TextView description = (TextView)liparam.view.findViewById(liparam.res.getIdentifier("description", "id", resparam.packageName));
if (description != null)
description.setTextColor(modRes.getColor(R.color.youtube_secondary_text_default_material_light));
View separator = liparam.view.findViewById(liparam.res.getIdentifier("separator", "id", resparam.packageName));
replaceSeparator(separator);
}
});
*/
resparam.res.hookLayout(resparam.packageName, layout, "watch_info_panel", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
ScrollView watch_info_panel = (ScrollView)liparam.view;
if (watch_info_panel != null)
watch_info_panel.setBackgroundColor(modRes.getColor(R.color.youtube_primary_background));
TextView title = (TextView)liparam.view.findViewById(liparam.res.getIdentifier("title", "id", resparam.packageName));
if (title != null)
title.setTextColor(modRes.getColor(R.color.youtube_primary_text_default_material_light));
}
});
/*
resparam.res.hookLayout(resparam.packageName, layout, "q_watch_info_panel", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
TextView title = (TextView)liparam.view.findViewById(liparam.res.getIdentifier("title", "id", resparam.packageName));
if (title != null)
title.setTextColor(modRes.getColor(R.color.youtube_primary_text_default_material_light));
TextView description = (TextView)liparam.view.findViewById(liparam.res.getIdentifier("description", "id", resparam.packageName));
if (description != null)
description.setTextColor(modRes.getColor(R.color.youtube_secondary_text_default_material_light));
}
});
*/
resparam.res.hookLayout(resparam.packageName, layout, "browse_outer_feed_entry", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
TextView title = (TextView)liparam.view.findViewById(liparam.res.getIdentifier("feed_text", "id", resparam.packageName));
if (title != null)
title.setTextColor(modRes.getColor(R.color.youtube_primary_text_default_material_light));
}
});
/*
resparam.res.hookLayout(resparam.packageName, layout, "q_browse_outer_feed_entry", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
TextView title = (TextView)liparam.view.findViewById(liparam.res.getIdentifier("feed_text", "id", resparam.packageName));
if (title != null)
title.setTextColor(modRes.getColor(R.color.youtube_primary_text_default_material_light));
}
});
*/
resparam.res.hookLayout(resparam.packageName, layout, "item_section_header", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
TextView title = (TextView)liparam.view;
if (title != null)
title.setTextColor(modRes.getColor(R.color.youtube_primary_text_default_material_light));
}
});
resparam.res.hookLayout(resparam.packageName, layout, "ypc_offers_list_item", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
TextView title = (TextView)liparam.view.findViewById(liparam.res.getIdentifier("feed_text", "id", resparam.packageName));
if (title != null)
title.setTextColor(modRes.getColor(R.color.youtube_primary_text_default_material_light));
}
});
resparam.res.hookLayout(resparam.packageName, layout, "watch_card_related_entity_fixed_width", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
TextView title = (TextView)liparam.view.findViewById(liparam.res.getIdentifier("title", "id", resparam.packageName));
if (title != null)
title.setTextColor(modRes.getColor(R.color.youtube_primary_text_default_material_light));
}
});
resparam.res.hookLayout(resparam.packageName, layout, "grid_channel_item", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
TextView channel_name = (TextView)liparam.view.findViewById(liparam.res.getIdentifier("channel_name", "id", resparam.packageName));
if (channel_name != null)
channel_name.setTextColor(modRes.getColor(R.color.youtube_primary_text_default_material_light));
}
});
resparam.res.hookLayout(resparam.packageName, layout, "q_compact_channel_item", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
TextView channel_name = (TextView)liparam.view.findViewById(liparam.res.getIdentifier("channel_name", "id", resparam.packageName));
if (channel_name != null)
channel_name.setTextColor(modRes.getColor(R.color.youtube_primary_text_default_material_light));
}
});
resparam.res.hookLayout(resparam.packageName, layout, "compact_channel_item", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
TextView channel_name = (TextView)liparam.view.findViewById(liparam.res.getIdentifier("channel_name", "id", resparam.packageName));
if (channel_name != null)
channel_name.setTextColor(modRes.getColor(R.color.youtube_primary_text_default_material_light));
}
});
resparam.res.hookLayout(resparam.packageName, layout, "guide_section", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
View separator = liparam.view.findViewById(liparam.res.getIdentifier("divider", "id", resparam.packageName));
replaceSeparator(separator);
}
});
resparam.res.hookLayout(resparam.packageName, layout, "paged_list_view", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
FrameLayout paged_list_view = (FrameLayout)liparam.view;
paged_list_view.setBackgroundColor(modRes.getColor(R.color.youtube_primary_background));
ListView paged_list = (ListView)liparam.view.findViewById(liparam.res.getIdentifier("paged_list", "id", resparam.packageName));
if (paged_list != null)
paged_list.setBackgroundColor(modRes.getColor(R.color.youtube_primary_background));
}
});
resparam.res.hookLayout(resparam.packageName, layout, "playlist_chooser_item", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
View separator = liparam.view.findViewById(liparam.res.getIdentifier("separator", "id", resparam.packageName));
replaceSeparator(separator);
}
});
resparam.res.hookLayout(resparam.packageName, layout, "search_suggestion_entry", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
LinearLayout results = (LinearLayout)liparam.view;
if (results != null)
results.setBackgroundColor(modRes.getColor(R.color.youtube_playlist_header_color_primary));
}
});
resparam.res.hookLayout(resparam.packageName, layout, "create_playlist_dialog", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
LinearLayout results = (LinearLayout)liparam.view;
if (results != null)
results.setBackgroundColor(modRes.getColor(R.color.youtube_primary_background));
EditText name = (EditText)liparam.view.findViewById(liparam.res.getIdentifier("name", "id", resparam.packageName));
if (name != null) {
name.setTextColor(modRes.getColor(R.color.youtube_secondary_text_default_material_light));
name.setHintTextColor(modRes.getColor(R.color.youtube_secondary_text_default_material_light));
name.setBackgroundResource(liparam.res.getIdentifier("abc_edit_text_material", "drawable", resparam.packageName));
}
CheckBox is_private = (CheckBox)liparam.view.findViewById(liparam.res.getIdentifier("is_private", "id", resparam.packageName));
if (is_private != null) {
is_private.setTextColor(modRes.getColor(R.color.youtube_secondary_text_default_material_light));
is_private.setButtonDrawable(modRes.getDrawable(R.drawable.abc_btn_check_material));
}
}
});
resparam.res.hookLayout(resparam.packageName, layout, "support_simple_spinner_dropdown_item", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
TextView text1 = (TextView)liparam.view;
if (text1 != null)
text1.setTextColor(modRes.getColor(R.color.youtube_primary_text_default_material_light));
}
});
resparam.res.hookLayout(resparam.packageName, layout, "search_results_filter_dialog", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
ScrollView search_results_filter_dialog = (ScrollView)liparam.view;
if (search_results_filter_dialog != null)
search_results_filter_dialog.setBackgroundColor(modRes.getColor(R.color.youtube_primary_background));
OnItemSelectedListener onItemSel = new OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
((TextView)parent.getChildAt(0)).setTextColor(modRes.getColor(R.color.youtube_primary_text_default_material_light));
}
@Override
public void onNothingSelected(AdapterView<?> parent) {
((TextView)parent.getChildAt(0)).setTextColor(modRes.getColor(R.color.youtube_primary_text_default_material_light));
}
};
Spinner search_filter_content_type = (Spinner)liparam.view.findViewById(liparam.res.getIdentifier("search_filter_content_type", "id", resparam.packageName));
if (search_filter_content_type != null)
search_filter_content_type.setOnItemSelectedListener(onItemSel);
Spinner search_filter_upload_date = (Spinner)liparam.view.findViewById(liparam.res.getIdentifier("search_filter_upload_date", "id", resparam.packageName));
if (search_filter_upload_date != null)
search_filter_upload_date.setOnItemSelectedListener(onItemSel);
Spinner search_filter_duration = (Spinner)liparam.view.findViewById(liparam.res.getIdentifier("search_filter_duration", "id", resparam.packageName));
if (search_filter_duration != null)
search_filter_duration.setOnItemSelectedListener(onItemSel);
CheckBox search_filter_hd = (CheckBox)liparam.view.findViewById(liparam.res.getIdentifier("search_filter_hd", "id", resparam.packageName));
if (search_filter_hd != null)
search_filter_hd.setButtonDrawable(modRes.getDrawable(R.drawable.abc_btn_check_material));
CheckBox search_filter_closed_captions = (CheckBox)liparam.view.findViewById(liparam.res.getIdentifier("search_filter_closed_captions", "id", resparam.packageName));
if (search_filter_closed_captions != null)
search_filter_closed_captions.setButtonDrawable(modRes.getDrawable(R.drawable.abc_btn_check_material));
CheckBox search_filter_creative_commons = (CheckBox)liparam.view.findViewById(liparam.res.getIdentifier("search_filter_creative_commons", "id", resparam.packageName));
if (search_filter_creative_commons != null)
search_filter_creative_commons.setButtonDrawable(modRes.getDrawable(R.drawable.abc_btn_check_material));
CheckBox search_filter_3d = (CheckBox)liparam.view.findViewById(liparam.res.getIdentifier("search_filter_3d", "id", resparam.packageName));
if (search_filter_3d != null)
search_filter_3d.setButtonDrawable(modRes.getDrawable(R.drawable.abc_btn_check_material));
CheckBox search_filter_live = (CheckBox)liparam.view.findViewById(liparam.res.getIdentifier("search_filter_live", "id", resparam.packageName));
if (search_filter_live != null)
search_filter_live.setButtonDrawable(modRes.getDrawable(R.drawable.abc_btn_check_material));
}
});
resparam.res.hookLayout(resparam.packageName, layout, "edit_activity", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
FrameLayout edit_activity_layout = (FrameLayout)liparam.view;
if (edit_activity_layout != null)
edit_activity_layout.setBackgroundColor(modRes.getColor(R.color.youtube_primary_background));
}
});
resparam.res.hookLayout(resparam.packageName, layout, "upload_form_details", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
int secondary_color = modRes.getColor(R.color.youtube_secondary_text_default_material_light);
int resId = liparam.res.getIdentifier("abc_edit_text_material", "drawable", resparam.packageName);
EditText title_edit = (EditText)liparam.view.findViewById(liparam.res.getIdentifier("title_edit", "id", resparam.packageName));
if (title_edit != null) {
title_edit.setTextColor(secondary_color);
title_edit.setHintTextColor(secondary_color);
title_edit.setBackgroundResource(resId);
}
EditText description_edit = (EditText)liparam.view.findViewById(liparam.res.getIdentifier("description_edit", "id", resparam.packageName));
if (description_edit != null) {
description_edit.setTextColor(secondary_color);
description_edit.setHintTextColor(secondary_color);
description_edit.setBackgroundResource(resId);
}
EditText keywords_edit = (EditText)liparam.view.findViewById(liparam.res.getIdentifier("keywords_edit", "id", resparam.packageName));
if (keywords_edit != null) {
keywords_edit.setTextColor(secondary_color);
keywords_edit.setHintTextColor(secondary_color);
keywords_edit.setBackgroundResource(resId);
}
}
});
} catch (Throwable t) { XposedBridge.log(t); }
if (resparam.packageName.equals("com.htc.usage")) try {
resparam.res.setReplacement(resparam.packageName, color, "usage_chart_label", modRes.fwd(R.color.usage_usage_chart_label));
resparam.res.setReplacement(resparam.packageName, color, "usage_chart_background", modRes.fwd(R.color.usage_usage_chart_background));
resparam.res.setReplacement(resparam.packageName, color, "bg_usage_chart_secondary_fill", modRes.fwd(R.color.usage_bg_usage_chart_secondary_fill));
resparam.res.setReplacement(resparam.packageName, color, "pie_chart_outline_stroke", modRes.fwd(R.color.usage_pie_chart_outline_stroke));
resparam.res.setReplacement(resparam.packageName, color, "usage_chart_secondary_fill", modRes.fwd(R.color.usage_usage_chart_secondary_fill));
resparam.res.setReplacement(resparam.packageName, color, "detail_usage_chart_secondary_fill", modRes.fwd(R.color.usage_detail_usage_chart_secondary_fill));
resparam.res.setReplacement(resparam.packageName, drawable, "data_usage_grid_border", modRes.fwd(R.drawable.data_usage_grid_border));
resparam.res.hookLayout(resparam.packageName, layout, "main_content_layout", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable {
FrameLayout mycontent = (FrameLayout)liparam.view.findViewById(liparam.res.getIdentifier("mycontent", "id", resparam.packageName));
if (mycontent != null) mycontent.setBackgroundColor(modRes.getColor(R.color.ap_background_color));
}
});
} catch (Throwable t) { XposedBridge.log(t); }
if (resparam.packageName.equals("com.htc.htcpowermanager")) try {
resparam.res.setReplacement(resparam.packageName, color, "title_text_font_color", modRes.fwd(R.color.powermanager_title_text_font_color));
resparam.res.setReplacement(resparam.packageName, color, "date_time_text_font_color", modRes.fwd(R.color.powermanager_date_time_text_font_color));
} catch (Throwable t) { XposedBridge.log(t); }
if (resparam.packageName.equals("com.htc.Weather")) try {
resparam.res.setReplacement(resparam.packageName, color, "light_primaryfont_color", modRes.fwd(R.color.light_primaryfont_color));
resparam.res.setReplacement(resparam.packageName, color, "light_primaryfont_disable_color", modRes.fwd(R.color.light_primaryfont_disable_color));
resparam.res.setReplacement(resparam.packageName, color, "light_expand_list_color", modRes.fwd(R.color.light_expand_list_color));
resparam.res.setReplacement(resparam.packageName, color, "list_item_bg_center_color", modRes.fwd(R.color.list_item_bg_center_color));
resparam.res.setReplacement(resparam.packageName, color, "list_item_bg_top_color", modRes.fwd(R.color.list_item_bg_top_color));
resparam.res.setReplacement(resparam.packageName, color, "list_item_bg_bottom_color", modRes.fwd(R.color.list_item_bg_bottom_color));
resparam.res.setReplacement(resparam.packageName, color, "text_selection_opacity_color", modRes.fwd(R.color.text_selection_opacity_color));
resparam.res.setReplacement(resparam.packageName, color, "text_selection_color", modRes.fwd(R.color.text_selection_color));
resparam.res.setReplacement(resparam.packageName, color, "listview_app_background", modRes.fwd(R.color.listview_app_background));
resparam.res.setReplacement(resparam.packageName, color, "ap_background_color", modRes.fwd(R.color.ap_background_color));
resparam.res.setReplacement(resparam.packageName, color, "tabfont_color", modRes.fwd(R.color.tabfont_color));
resparam.res.setReplacement(resparam.packageName, color, "focused_color", modRes.fwd(R.color.focused_color));
resparam.res.setReplacement(resparam.packageName, color, "white", modRes.fwd(R.color.list_item_bg_center_color));
resparam.res.setReplacement(resparam.packageName, color, "tab_info_background", modRes.fwd(R.color.weather_tab_info_background));
resparam.res.setReplacement(resparam.packageName, color, "now_tab_info_background", modRes.fwd(R.color.weather_now_tab_info_background));
resparam.res.setReplacement(resparam.packageName, color, "list_item_bg_top_color", modRes.fwd(R.color.list_item_bg_top_color));
resparam.res.setReplacement(resparam.packageName, drawable, "common_app_bkg", modRes.fwd(R.color.ap_background_color));
resparam.res.setReplacement(resparam.packageName, drawable, "common_app_bkg_down_land_src", modRes.fwd(R.drawable.common_app_bkg_down_land_src));
resparam.res.setReplacement(resparam.packageName, drawable, "common_app_bkg_down_src", modRes.fwd(R.drawable.common_app_bkg_down_src));
resparam.res.setReplacement(resparam.packageName, drawable, "common_dropdown_background", modRes.fwd(R.drawable.common_dropdown_background));
resparam.res.setReplacement(resparam.packageName, drawable, "common_div", modRes.fwd(R.drawable.common_div));
resparam.res.setReplacement(resparam.packageName, drawable, "common_div_footer", modRes.fwd(R.drawable.common_div_footer));
resparam.res.setReplacement(resparam.packageName, drawable, "common_list_divider", modRes.fwd(R.drawable.common_list_divider));
resparam.res.setReplacement(resparam.packageName, drawable, "common_list_div_top", modRes.fwd(R.drawable.common_list_div_top));
resparam.res.setReplacement(resparam.packageName, drawable, "common_tab_div", modRes.fwd(R.drawable.common_tab_div));
resparam.res.setReplacement(resparam.packageName, drawable, "common_b_div", modRes.fwd(R.drawable.common_b_div));
resparam.res.setReplacement(resparam.packageName, drawable, "inset_list_divider", modRes.fwd(R.drawable.common_list_divider));
resparam.res.setReplacement(resparam.packageName, drawable, "section_divider_top", modRes.fwd(R.drawable.section_divider_top));
resparam.res.setReplacement(resparam.packageName, drawable, "section_b_divider_top", modRes.fwd(R.drawable.section_b_divider_top));
resparam.res.setReplacement(resparam.packageName, drawable, "section_b_divider", modRes.fwd(R.drawable.section_b_divider_top));
resparam.res.setReplacement(resparam.packageName, drawable, "htcthumb", modRes.fwd(R.drawable.htcthumb_b));
resparam.res.setReplacement(resparam.packageName, drawable, "htcthumb_b", modRes.fwd(R.drawable.htcthumb_b));
resparam.res.setReplacement(resparam.packageName, drawable, "common_dialogbox_center_bright", modRes.fwd(R.drawable.common_dialogbox_center_bright));
resparam.res.setReplacement(resparam.packageName, drawable, "common_dialogbox_bottom_bright", modRes.fwd(R.drawable.common_dialogbox_bottom_bright));
resparam.res.setReplacement(resparam.packageName, drawable, "common_dialogbox_bottom_medium", modRes.fwd(R.drawable.common_dialogbox_bottom_medium));
resparam.res.setReplacement(resparam.packageName, drawable, "common_dialogbox_full_bright", modRes.fwd(R.drawable.common_dialogbox_full_bright));
resparam.res.setReplacement(resparam.packageName, drawable, "weather_icon_accuweather", modRes.fwd(R.drawable.weather_icon_accuweather));
resparam.res.setReplacement(resparam.packageName, drawable, "common_rearrange_frame", modRes.fwd(R.drawable.common_rearrange_frame));
} catch (Throwable t) { XposedBridge.log(t); }
if (resparam.packageName.equals("com.android.phone")) try {
resparam.res.setReplacement(resparam.packageName, color, "answer_button_color", modRes.fwd(R.color.dialer_green));
//resparam.res.setReplacement(resparam.packageName, color, "end_button_color", modRes.fwd(R.color.dialer_red));
} catch (Throwable t) { XposedBridge.log(t); }
if (resparam.packageName.equals("com.htc.htccalendarwidgets")) try {
resparam.res.setReplacement(resparam.packageName, color, "month_other_font_color", modRes.fwd(R.color.calendarwidgets_month_other_font_color));
resparam.res.setReplacement(resparam.packageName, color, "event_color", modRes.fwd(R.color.calendarwidgets_event_color));
resparam.res.setReplacement(resparam.packageName, color, "month_font_color", modRes.fwd(R.color.calendarwidgets_month_font_color));
resparam.res.setReplacement(resparam.packageName, color, "event_background_color", modRes.fwd(R.color.calendarwidgets_event_background_color));
resparam.res.setReplacement(resparam.packageName, color, "all_day_event_color", modRes.fwd(R.color.calendarwidgets_all_day_event_color));
resparam.res.setReplacement(resparam.packageName, drawable, "common_panel_light", modRes.fwd(R.drawable.common_panel_light));
resparam.res.setReplacement(resparam.packageName, drawable, "common_panel_light_list", modRes.fwd(R.drawable.common_panel_light_list));
} catch (Throwable t) { XposedBridge.log(t); }
if (resparam.packageName.equals("com.htc.widget.weatherclock")) try {
//resparam.res.setReplacement(resparam.packageName, drawable, "common_panel_light", modRes.fwd(R.drawable.common_panel_light));
} catch (Throwable t) { XposedBridge.log(t); }
if (resparam.packageName.equals("com.htc.MusicWidget")) try {
resparam.res.setReplacement(resparam.packageName, drawable, "common_panel_light", modRes.fwd(R.drawable.common_panel_light));
} catch (Throwable t) { XposedBridge.log(t); }
if (resparam.packageName.equals("com.htc.sense.mms")) try {
resparam.res.setReplacement(resparam.packageName, color, "dialog_background", modRes.fwd(R.color.background_dark));
resparam.res.setReplacement(resparam.packageName, color, "color_detail_list_bg", modRes.fwd(R.color.background_dark));
resparam.res.setReplacement(resparam.packageName, color, "compose_message_background", modRes.fwd(R.color.background_dark));
resparam.res.setReplacement(resparam.packageName, drawable, "white_background", modRes.fwd(R.color.background_dark));
resparam.res.setReplacement(resparam.packageName, drawable, "common_app_bkg", modRes.fwd(R.drawable.common_app_bkg_down_src));
resparam.res.setReplacement(resparam.packageName, drawable, "common_section_divider_top", modRes.fwd(R.drawable.section_divider_top));
} catch (Throwable t) { XposedBridge.log(t); }
if (resparam.packageName.equals("ch.amana.android.cputuner")) try {
resparam.res.setReplacement(resparam.packageName, drawable, "appwidget_bg_focused", modRes.fwd(R.drawable.appwidget_bg_focused));
resparam.res.setReplacement(resparam.packageName, drawable, "appwidget_bg_pressed", modRes.fwd(R.drawable.appwidget_bg_pressed));
resparam.res.setReplacement(resparam.packageName, drawable, "appwidget_dark_bg_focused", modRes.fwd(R.drawable.appwidget_dark_bg_focused));
resparam.res.setReplacement(resparam.packageName, drawable, "appwidget_inner_focused_c", modRes.fwd(R.drawable.appwidget_inner_focused_c));
resparam.res.setReplacement(resparam.packageName, drawable, "appwidget_inner_focused_l", modRes.fwd(R.drawable.appwidget_inner_focused_l));
resparam.res.setReplacement(resparam.packageName, drawable, "appwidget_inner_focused_r", modRes.fwd(R.drawable.appwidget_inner_focused_r));
resparam.res.setReplacement(resparam.packageName, drawable, "appwidget_inner_pressed_c", modRes.fwd(R.drawable.appwidget_inner_pressed_c));
resparam.res.setReplacement(resparam.packageName, drawable, "appwidget_inner_pressed_l", modRes.fwd(R.drawable.appwidget_inner_pressed_l));
resparam.res.setReplacement(resparam.packageName, drawable, "appwidget_inner_pressed_r", modRes.fwd(R.drawable.appwidget_inner_pressed_r));
resparam.res.setReplacement(resparam.packageName, color, "cputuner_green", modRes.fwd(R.color.sense_green));
} catch (Throwable t) { XposedBridge.log(t); }
if (resparam.packageName.equals("com.bigeyes0x0.trickstermod")) try {
resparam.res.setReplacement(resparam.packageName, drawable, "ic_minus", modRes.fwd(R.drawable.ic_minus));
resparam.res.setReplacement(resparam.packageName, drawable, "ic_minusplus", modRes.fwd(R.drawable.ic_minusplus));
resparam.res.setReplacement(resparam.packageName, drawable, "ic_plus", modRes.fwd(R.drawable.ic_plus));
} catch (Throwable t) { XposedBridge.log(t); }
if (resparam.packageName.equals("com.htc.sense.ime")) try {
resparam.res.setReplacement(resparam.packageName, color, "ime_accent_key_text_color", modRes.fwd(R.color.bright_foreground_dark));
resparam.res.setReplacement(resparam.packageName, drawable, "sense_input_visual_feedback_base", modRes.fwd(R.drawable.sense_input_visual_feedback_base));
resparam.res.setReplacement(resparam.packageName, drawable, "ime_visualfeedback_bg", modRes.fwd(R.drawable.sense_input_visual_feedback_base));
resparam.res.setReplacement(resparam.packageName, drawable, "common_div", modRes.fwd(R.drawable.ime_common_div));
resparam.res.setReplacement(resparam.packageName, drawable, "htc_common_div", modRes.fwd(R.drawable.ime_common_div));
/*
resparam.res.setReplacement(resparam.packageName, color, "light_primaryfont_color", modRes.fwd(R.color.light_primaryfont_color));
resparam.res.setReplacement(resparam.packageName, color, "light_primaryfont_disable_color", modRes.fwd(R.color.light_primaryfont_disable_color));
resparam.res.setReplacement(resparam.packageName, color, "light_expand_list_color", modRes.fwd(R.color.light_expand_list_color));
resparam.res.setReplacement(resparam.packageName, color, "dark_secondaryfont_color", modRes.fwd(R.color.dark_secondaryfont_color));
resparam.res.setReplacement(resparam.packageName, color, "list_item_bg_center_color", modRes.fwd(R.color.list_item_bg_center_color));
resparam.res.setReplacement(resparam.packageName, color, "list_item_bg_top_color", modRes.fwd(R.color.list_item_bg_top_color));
resparam.res.setReplacement(resparam.packageName, color, "list_item_bg_bottom_color", modRes.fwd(R.color.list_item_bg_bottom_color));
resparam.res.setReplacement(resparam.packageName, color, "text_selection_opacity_color", modRes.fwd(R.color.text_selection_opacity_color));
resparam.res.setReplacement(resparam.packageName, color, "text_selection_color", modRes.fwd(R.color.text_selection_color));
resparam.res.setReplacement(resparam.packageName, color, "listview_app_background", modRes.fwd(R.color.listview_app_background));
resparam.res.setReplacement(resparam.packageName, color, "ap_background_color", modRes.fwd(R.color.ap_background_color));
resparam.res.setReplacement(resparam.packageName, color, "CategoryOne_ap_background_color", modRes.fwd(R.color.ap_background_color));
resparam.res.setReplacement(resparam.packageName, color, "CategoryTwo_ap_background_color", modRes.fwd(R.color.ap_background_color));
resparam.res.setReplacement(resparam.packageName, color, "CategoryThree_ap_background_color", modRes.fwd(R.color.ap_background_color));
resparam.res.setReplacement(resparam.packageName, color, "CategoryFour_ap_background_color", modRes.fwd(R.color.ap_background_color));
resparam.res.setReplacement(resparam.packageName, color, "tabfont_color", modRes.fwd(R.color.tabfont_color));
resparam.res.setReplacement(resparam.packageName, color, "CategoryOne_tabfont_color", modRes.fwd(R.color.tabfont_color));
resparam.res.setReplacement(resparam.packageName, color, "CategoryTwo_tabfont_color", modRes.fwd(R.color.tabfont_color));
resparam.res.setReplacement(resparam.packageName, color, "CategoryThree_tabfont_color", modRes.fwd(R.color.tabfont_color));
resparam.res.setReplacement(resparam.packageName, color, "CategoryFour_tabfont_color", modRes.fwd(R.color.tabfont_color));
resparam.res.setReplacement(resparam.packageName, color, "focused_color", modRes.fwd(R.color.focused_color));
resparam.res.setReplacement(resparam.packageName, color, "white", modRes.fwd(R.color.list_item_bg_center_color));
resparam.res.setReplacement(resparam.packageName, drawable, "common_app_bkg_down_src", modRes.fwd(R.drawable.common_app_bkg_down_src));
resparam.res.setReplacement(resparam.packageName, drawable, "common_app_bkg_down_land_src", modRes.fwd(R.drawable.common_app_bkg_down_land_src));
resparam.res.setReplacement(resparam.packageName, drawable, "common_b_div", modRes.fwd(R.drawable.common_b_div));
resparam.res.setReplacement(resparam.packageName, drawable, "common_button_rest", modRes.fwd(R.drawable.common_button_rest));
resparam.res.setReplacement(resparam.packageName, drawable, "common_dialogbox_bottom_bright", modRes.fwd(R.drawable.common_dialogbox_bottom_bright));
resparam.res.setReplacement(resparam.packageName, drawable, "common_dialogbox_bottom_dark", modRes.fwd(R.drawable.common_dialogbox_bottom_dark));
resparam.res.setReplacement(resparam.packageName, drawable, "common_dialogbox_bottom_medium", modRes.fwd(R.drawable.common_dialogbox_bottom_medium));
resparam.res.setReplacement(resparam.packageName, drawable, "common_dialogbox_center_bright", modRes.fwd(R.drawable.common_dialogbox_center_bright));
resparam.res.setReplacement(resparam.packageName, drawable, "common_dialogbox_center_dark", modRes.fwd(R.drawable.common_dialogbox_center_dark));
resparam.res.setReplacement(resparam.packageName, drawable, "common_dialogbox_full_bright", modRes.fwd(R.drawable.common_dialogbox_full_bright));
resparam.res.setReplacement(resparam.packageName, drawable, "common_dialogbox_full_dark", modRes.fwd(R.drawable.common_dialogbox_full_dark));
resparam.res.setReplacement(resparam.packageName, drawable, "common_div", modRes.fwd(R.drawable.common_div));
resparam.res.setReplacement(resparam.packageName, drawable, "common_div_footer", modRes.fwd(R.drawable.common_div_footer));
resparam.res.setReplacement(resparam.packageName, drawable, "common_dropdown_background", modRes.fwd(R.drawable.common_dropdown_background));
resparam.res.setReplacement(resparam.packageName, drawable, "common_inputfield_full_rest", modRes.fwd(R.drawable.common_inputfield_full_rest));
resparam.res.setReplacement(resparam.packageName, drawable, "common_inputfield_rest", modRes.fwd(R.drawable.common_inputfield_rest));
resparam.res.setReplacement(resparam.packageName, drawable, "common_list_div_top", modRes.fwd(R.drawable.common_list_div_top));
resparam.res.setReplacement(resparam.packageName, drawable, "common_list_divider", modRes.fwd(R.drawable.common_list_divider));
resparam.res.setReplacement(resparam.packageName, drawable, "common_photo_frame", modRes.fwd(R.drawable.common_photo_frame));
resparam.res.setReplacement(resparam.packageName, drawable, "common_radio_rest_dark", modRes.fwd(R.drawable.common_radio_rest_dark));
resparam.res.setReplacement(resparam.packageName, drawable, "common_radio_rest_light", modRes.fwd(R.drawable.common_radio_rest_light));
resparam.res.setReplacement(resparam.packageName, drawable, "common_rearrange_frame", modRes.fwd(R.drawable.common_rearrange_frame));
resparam.res.setReplacement(resparam.packageName, drawable, "common_tab_div", modRes.fwd(R.drawable.common_tab_div));
resparam.res.setReplacement(resparam.packageName, drawable, "common_timer_tumblers", modRes.fwd(R.drawable.common_timer_tumblers));
resparam.res.setReplacement(resparam.packageName, drawable, "common_toggle_outer_dark", modRes.fwd(R.drawable.common_toggle_outer_dark));
resparam.res.setReplacement(resparam.packageName, drawable, "common_toggle_rest_dark", modRes.fwd(R.drawable.common_toggle_rest_dark));
*/
} catch (Throwable t) { XposedBridge.log(t); }
}
private void replaceSeparator(View separator) {
if (separator != null) {
separator.setBackground(null);
separator.setBackgroundColor(0x161616);
}
}
private void replaceImageSeparator(ImageView separator) {
if (separator != null) {
separator.setImageDrawable(null);
separator.setBackground(null);
separator.setBackgroundColor(0x161616);
}
}
@Override
public void handleLoadPackage(final LoadPackageParam lpparam) throws Throwable {
if (lpparam.packageName.equals("com.htc.launcher")) {
findAndHookMethod("com.htc.launcher.sidepanel.CatalogListGroupItem", lpparam.classLoader, "onFinishInflate", new XC_MethodHook() {
@Override
public void afterHookedMethod(final MethodHookParam param) throws Throwable {
XposedHelpers.setObjectField(param.thisObject, "mOverlayBackgroundDrawable", new ColorDrawable(0x232323));
XposedHelpers.setObjectField(param.thisObject, "mWhiteBackgroundDrawable", new ColorDrawable(0x161616));
}
});
}
if (lpparam.packageName.equals("com.htc.album")) {
findAndHookMethod("com.htc.lib1.cc.view.viewpager.HtcViewPager", lpparam.classLoader, "initViewPager", new XC_MethodHook() {
@Override
protected void afterHookedMethod(final MethodHookParam param) throws Throwable {
ViewGroup viewPager = (ViewGroup)param.thisObject;
viewPager.setBackgroundColor(0xff161616);
}
});
findAndHookMethod("com.htc.imagematch.activity.ImageSelectActivity", lpparam.classLoader, "initView", new XC_MethodHook() {
@Override
protected void afterHookedMethod(final MethodHookParam param) throws Throwable {
GridView mGridPhoto = (GridView)XposedHelpers.getObjectField(param.thisObject, "mGridPhoto");
mGridPhoto.setBackgroundColor(0xff161616);
((RelativeLayout)mGridPhoto.getParent()).setBackgroundColor(0xff161616);
}
});
findAndHookMethod("com.htc.imagematch.activity.ImageStoreActivity", lpparam.classLoader, "initView", new XC_MethodHook() {
@Override
protected void afterHookedMethod(final MethodHookParam param) throws Throwable {
GridView mGridPhoto = (GridView)XposedHelpers.getObjectField(param.thisObject, "mGridPhoto");
mGridPhoto.setBackgroundColor(0xff161616);
((RelativeLayout)mGridPhoto.getParent()).setBackgroundColor(0xff161616);
}
});
}
if (lpparam.packageName.equals("com.htc.android.worldclock")) {
findAndHookMethod("com.htc.fusion.fx.FxSceneLoader", lpparam.classLoader, "createFromAsset", AssetManager.class, String.class, new XC_MethodHook() {
@Override
public void beforeHookedMethod(final MethodHookParam param) throws Throwable {
String assetName = (String)param.args[1];
XModuleResources modRes = XModuleResources.createInstance(MODULE_PATH, null);
if (assetName.equals("Port/global.m10")) {
param.args[0] = modRes.getAssets();
param.args[1] = "global.m10";
}
//else if (assetName.equals("Port/worldclock_global_item.m10")) {
// param.args[0] = modRes.getAssets();
// param.args[1] = "worldclock_global_item.m10";
//}
}
});
XposedBridge.hookAllConstructors(findClass("com.htc.lib1.cc.widget.HtcReorderListView", lpparam.classLoader), new XC_MethodHook() {
@Override
protected void afterHookedMethod(final MethodHookParam param) throws Throwable {
Paint mBoundPaint = (Paint)XposedHelpers.getObjectField(param.thisObject, "al");
mBoundPaint.setColorFilter(new LightingColorFilter(0xff000000, 0xff161616));
XposedHelpers.setObjectField(param.thisObject, "al", mBoundPaint);
}
});
}
// Theme Downloads
if (lpparam.packageName.equals("com.android.documentsui")) try {
findAndHookMethod("com.android.documentsui.DocumentsActivity", lpparam.classLoader, "onCreate", Bundle.class, new XC_MethodHook() {
@Override
protected void beforeHookedMethod(final MethodHookParam param) throws Throwable {
Activity act = (Activity)param.thisObject;
act.setTheme(android.R.style.Theme_Holo_Light_DarkActionBar);
}
});
findAndHookMethod("com.android.documentsui.DirectoryFragment.DocumentsAdapter", lpparam.classLoader, "getDocumentView", int.class, View.class, ViewGroup.class, new XC_MethodHook() {
@Override
protected void afterHookedMethod(final MethodHookParam param) throws Throwable {
View view = (View)param.getResult();
if (view != null) {
ImageView icon_thumb = (ImageView)view.findViewById(view.getResources().getIdentifier("icon_thumb", "id", lpparam.packageName));
FrameLayout fl1 = ((FrameLayout)icon_thumb.getParent());
if (fl1 != null) {
ViewParent fl2 = fl1.getParent();
if (fl2 != null && fl2 instanceof FrameLayout) {
((FrameLayout)fl2).setBackground(null);
((FrameLayout)fl2).setBackgroundColor(Color.TRANSPARENT);
}
}
}
}
});
findAndHookMethod("com.android.documentsui.SettingsActivity", lpparam.classLoader, "onCreate", Bundle.class, new XC_MethodHook() {
@Override
protected void beforeHookedMethod(final MethodHookParam param) throws Throwable {
Activity act = (Activity)param.thisObject;
act.setTheme(android.R.style.Theme_Holo_DialogWhenLarge);
}
});
} catch (Throwable t) { XposedBridge.log(t); }
// Theme YouTube
if (lpparam.packageName.equals("com.google.android.youtube")) try {
/*
findAndHookMethod("com.google.android.apps.youtube.app.YouTubeApplication", lpparam.classLoader, "e", new XC_MethodHook() {
@Override
protected void beforeHookedMethod(final MethodHookParam param) throws Throwable {
Application act = (Application)param.thisObject;
act.setTheme(act.getApplicationContext().getResources().getIdentifier("Theme.AppCompat", "style", act.getPackageName()));
}
});
*/
findAndHookMethod("com.google.android.apps.youtube.app.WatchWhileActivity", lpparam.classLoader, "onCreate", Bundle.class, new XC_MethodHook() {
@Override
protected void afterHookedMethod(final MethodHookParam param) throws Throwable {
Activity act = (Activity)param.thisObject;
act.getWindow().setBackgroundDrawable(new ColorDrawable(0xff161616));
}
});
findAndHookMethod("com.google.android.apps.youtube.app.honeycomb.SettingsActivity", lpparam.classLoader, "onCreate", Bundle.class, new XC_MethodHook() {
@Override
protected void beforeHookedMethod(final MethodHookParam param) throws Throwable {
Activity act = (Activity)param.thisObject;
act.setTheme(act.getApplicationContext().getResources().getIdentifier("Theme.DeviceDefault", "style", act.getPackageName()));
}
});
XposedBridge.hookAllConstructors(findClass("com.google.android.libraries.youtube.common.ui.YouTubeTextView", lpparam.classLoader), new XC_MethodHook() {
@Override
protected void afterHookedMethod(final MethodHookParam param) throws Throwable {
TextView txt = (TextView)param.thisObject;
if (txt.getCurrentTextColor() == 0xff666666) txt.setTextColor(0x8acccccc);
else if (txt.getCurrentTextColor() == 0xff333333 || txt.getCurrentTextColor() == 0xff222222) txt.setTextColor(0xdecccccc);
else if (txt.getCurrentTextColor() == 0xff1b7fcc) txt.setTextColor(0xff33b5e5);
}
});
findAndHookMethod("com.google.android.apps.youtube.app.fragments.VideoInfoFragment", lpparam.classLoader, "a", LayoutInflater.class, ViewGroup.class, Bundle.class, new XC_MethodHook() {
@Override
protected void afterHookedMethod(final MethodHookParam param) throws Throwable {
FrameLayout af = (FrameLayout)XposedHelpers.getObjectField(param.thisObject, "af");
if (af != null) af.setBackgroundColor(0xff161616);
ListView ag = (ListView)XposedHelpers.getObjectField(param.thisObject, "ag");
if (ag != null) {
ag.setBackgroundColor(0xff161616);
ag.setCacheColorHint(0xff161616);
}
}
});
/*
XposedHelpers.setStaticIntField(findClass("com.google.android.apps.youtube.app.ui.TabbedView", lpparam.classLoader), "n", 0xffdfdfdf);
XposedHelpers.setStaticIntField(findClass("com.google.android.apps.youtube.app.ui.TabbedView", lpparam.classLoader), "o", 0xff161616);
findAndHookMethod("com.google.android.apps.youtube.app.ui.TabbedView", lpparam.classLoader, "a", Context.class, new XC_MethodHook() {
@Override
protected void afterHookedMethod(final MethodHookParam param) throws Throwable {
LinearLayout d = (LinearLayout)XposedHelpers.getObjectField(param.thisObject, "d");
if (d != null) d.setBackgroundColor(0xff161616);
}
});
*/
} catch (Throwable t) { XposedBridge.log(t); }
if (lpparam.packageName.equals("com.htc.htcpowermanager")) try {
findAndHookMethod("com.htc.htcpowermanager.battery.BatteryHistoryView", lpparam.classLoader, "onDraw", Canvas.class, new XC_MethodHook() {
@Override
protected void afterHookedMethod(final MethodHookParam param) throws Throwable {
Canvas canvas = (Canvas)param.args[0];
LinearLayout bhv = (LinearLayout) param.thisObject;
if (canvas != null && bhv != null) {
Paint paint1 = new Paint();
paint1.setStyle(Paint.Style.FILL);
paint1.setARGB(255, 22, 22, 22);
canvas.drawRect(bhv.getLeft(), bhv.getTop(), bhv.getRight(), bhv.getBottom(), paint1);
}
}
});
XposedBridge.hookAllConstructors(findClass("com.htc.htcpowermanager.battery.BatteryHistoryChart.BatteryHistoryChartThread", lpparam.classLoader), new XC_MethodHook() {
@Override
protected void afterHookedMethod(final MethodHookParam param) throws Throwable {
Paint mBackgroundPaint = (Paint)XposedHelpers.getObjectField(param.thisObject, "mBackgroundPaint");
if (mBackgroundPaint != null) {
mBackgroundPaint.setARGB(0, 22, 22, 22);
XposedHelpers.setObjectField(param.thisObject, "mBackgroundPaint", mBackgroundPaint);
}
Paint mGridPaint = (Paint)XposedHelpers.getObjectField(param.thisObject, "mGridPaint");
if (mGridPaint != null) {
PorterDuffColorFilter porterduffcolorfilter = new PorterDuffColorFilter(0xff323232, android.graphics.PorterDuff.Mode.DST_OVER);
mGridPaint.setARGB(255, 70, 70, 70);
mGridPaint.setColorFilter(porterduffcolorfilter);
XposedHelpers.setObjectField(param.thisObject, "mGridPaint", mGridPaint);
}
Paint mBatteryCurvePaint = (Paint)XposedHelpers.getObjectField(param.thisObject, "mBatteryCurvePaint");
if (mBatteryCurvePaint != null) {
mBatteryCurvePaint.setAlpha(230);
XposedHelpers.setObjectField(param.thisObject, "mBatteryCurvePaint", mBatteryCurvePaint);
}
Paint mChargingPaint = (Paint)XposedHelpers.getObjectField(param.thisObject, "mChargingPaint");
if (mChargingPaint != null) {
mChargingPaint.setAlpha(230);
XposedHelpers.setObjectField(param.thisObject, "mChargingPaint", mChargingPaint);
}
Paint mScreenOnPaint = (Paint)XposedHelpers.getObjectField(param.thisObject, "mScreenOnPaint");
if (mScreenOnPaint != null) {
mScreenOnPaint.setAlpha(230);
XposedHelpers.setObjectField(param.thisObject, "mScreenOnPaint", mScreenOnPaint);
}
Paint mGpsOnPaint = (Paint)XposedHelpers.getObjectField(param.thisObject, "mGpsOnPaint");
if (mGpsOnPaint != null) {
mGpsOnPaint.setAlpha(230);
XposedHelpers.setObjectField(param.thisObject, "mGpsOnPaint", mGpsOnPaint);
}
Paint mWifiRunningPaint = (Paint)XposedHelpers.getObjectField(param.thisObject, "mWifiRunningPaint");
if (mWifiRunningPaint != null) {
mWifiRunningPaint.setAlpha(230);
XposedHelpers.setObjectField(param.thisObject, "mWifiRunningPaint", mWifiRunningPaint);
}
Paint mWakeLockPaint = (Paint)XposedHelpers.getObjectField(param.thisObject, "mWakeLockPaint");
if (mWakeLockPaint != null) {
mWakeLockPaint.setAlpha(230);
XposedHelpers.setObjectField(param.thisObject, "mWakeLockPaint", mWakeLockPaint);
}
}
});
} catch (Throwable t) { XposedBridge.log(t); }
if (lpparam.packageName.equals("com.htc.Weather")) try {
try {
findAndHookMethod("com.htc.Weather.widget.TodayCondition", lpparam.classLoader, "updateData", Bundle.class, boolean.class, Sensor.class, new XC_MethodHook() {
@Override
protected void afterHookedMethod(final MethodHookParam param) throws Throwable {
ImageView mDayCurrentIcon = (ImageView)XposedHelpers.getObjectField(param.thisObject, "mDayCurrentIcon");
updateData(mDayCurrentIcon, lpparam);
}
});
} catch (Throwable t) {
findAndHookMethod("com.htc.Weather.widget.TodayCondition", lpparam.classLoader, "a", Bundle.class, boolean.class, Sensor.class, new XC_MethodHook() {
@Override
protected void afterHookedMethod(final MethodHookParam param) throws Throwable {
ImageView mDayCurrentIcon = (ImageView)XposedHelpers.getObjectField(param.thisObject, "g");
updateData(mDayCurrentIcon, lpparam);
}
});
}
try {
findAndHookMethod("com.htc.Weather.WeatherEntry.CityListAdapter", lpparam.classLoader, "getView", int.class, View.class, ViewGroup.class, new XC_MethodHook() {
@Override
protected void afterHookedMethod(final MethodHookParam param) throws Throwable {
RelativeLayout mLayout = (RelativeLayout)param.getResult();
if (mLayout != null) mLayout.setBackgroundColor(0xff161616);
FrameLayout htclistitem = (FrameLayout)mLayout.findViewById(mLayout.getResources().getIdentifier("two_line_text_item", "id", lpparam.packageName));
if (htclistitem != null) htclistitem.setBackgroundColor(0xff161616);
}
});
} catch (Throwable t) {
findAndHookMethod("com.htc.Weather.cj", lpparam.classLoader, "getView", int.class, View.class, ViewGroup.class, new XC_MethodHook() {
@Override
protected void afterHookedMethod(final MethodHookParam param) throws Throwable {
RelativeLayout mLayout = (RelativeLayout)param.getResult();
if (mLayout != null) mLayout.setBackgroundColor(0xff161616);
FrameLayout htclistitem = (FrameLayout)mLayout.findViewById(mLayout.getResources().getIdentifier("two_line_text_item", "id", lpparam.packageName));
if (htclistitem != null) htclistitem.setBackgroundColor(0xff161616);
}
});
}
try {
XposedBridge.hookAllConstructors(findClass("com.htc.lib1.cc.widget.HtcReorderListView", lpparam.classLoader), new XC_MethodHook() {
@Override
protected void afterHookedMethod(final MethodHookParam param) throws Throwable {
Paint mBoundPaint = (Paint)XposedHelpers.getObjectField(param.thisObject, "mBoundPaint");
mBoundPaint.setColorFilter(new LightingColorFilter(0xff000000, 0xff161616));
XposedHelpers.setObjectField(param.thisObject, "mBoundPaint", mBoundPaint);
}
});
} catch (Throwable t) {
XposedBridge.hookAllConstructors(findClass("com.htc.lib1.cc.widget.HtcReorderListView", lpparam.classLoader), new XC_MethodHook() {
@Override
protected void afterHookedMethod(final MethodHookParam param) throws Throwable {
Paint mBoundPaint = (Paint)XposedHelpers.getObjectField(param.thisObject, "al");
mBoundPaint.setColorFilter(new LightingColorFilter(0xff000000, 0xff161616));
XposedHelpers.setObjectField(param.thisObject, "al", mBoundPaint);
}
});
}
} catch (Throwable t) { XposedBridge.log(t); }
if (lpparam.packageName.equals("com.htc.contacts")) try {
findAndHookMethod("com.htc.htcdialer.Dialer", lpparam.classLoader, "updateMoreButton", new XC_MethodHook() {
@Override
protected void afterHookedMethod(final MethodHookParam param) throws Throwable {
Resources res = ((Context)XposedHelpers.callMethod(param.thisObject, "getBaseContext")).getResources();
TextView accumulator_left_btn = (TextView)XposedHelpers.callMethod(param.thisObject, "findViewById", res.getIdentifier("accumulator_left_btn", "id", lpparam.packageName));
if (accumulator_left_btn != null) {
int color = (Integer)XposedHelpers.callStaticMethod(findClass("com.htc.htcdialer.util.DialerUtils", lpparam.classLoader), "getThemeColor");
accumulator_left_btn.setTextColor(color);
}
}
});
/*
findAndHookMethod("com.htc.contacts.fragment.base.HtcViewContactBaseFragment.ViewAdapter", lpparam.classLoader, "bindLeftIconView", View.class, "com.htc.contacts.fragment.base.HtcViewContactBaseFragment.ViewEntry", new XC_MethodHook() {
@Override
protected void afterHookedMethod(final MethodHookParam param) throws Throwable {
XposedHelpers.callMethod(XposedHelpers.callMethod(param.args[0], "getLeftImage"), "setColorOn", false);
}
});
*/
} catch (Throwable t) { XposedBridge.log(t); }
if (lpparam.packageName.equals("com.android.phone")) try {
findAndHookMethod("com.android.phone.widget.ThemePreferenceActivity", lpparam.classLoader, "onCreate", Bundle.class, new XC_MethodHook() {
@Override
protected void afterHookedMethod(final MethodHookParam param) throws Throwable {
HtcListView mdata = (HtcListView)XposedHelpers.callMethod(param.thisObject, "getHtcListView");
if (mdata != null) {
mdata.setBackgroundResource(0);
mdata.setBackgroundColor(0xff161616);
}
}
});
findAndHookMethod("com.android.phone.HtcCannedMessageActivity", lpparam.classLoader, "onCreate", Bundle.class, new XC_MethodHook() {
@Override
protected void afterHookedMethod(final MethodHookParam param) throws Throwable {
Activity act = (Activity)param.thisObject;
if (act != null) {
LinearLayout scroll = (LinearLayout)act.findViewById(act.getResources().getIdentifier("scroll", "id", "com.android.phone"));
if (scroll != null) ((ScrollView)scroll.getParent()).setBackgroundColor(0xff161616);
}
}
});
} catch (Throwable t) { XposedBridge.log(t); }
}
public void updateData(ImageView mDayCurrentIcon, LoadPackageParam lpparam) {
if (mDayCurrentIcon != null) {
int w = mDayCurrentIcon.getResources().getDimensionPixelSize(mDayCurrentIcon.getResources().getIdentifier("condition_icon_width", "dimen", lpparam.packageName));
int h = mDayCurrentIcon.getResources().getDimensionPixelSize(mDayCurrentIcon.getResources().getIdentifier("condition_icon_height", "dimen", lpparam.packageName));
Drawable db = mDayCurrentIcon.getBackground();
if (db != null) {
Bitmap bmp = Bitmap.createBitmap(w, h, Bitmap.Config.ARGB_8888);
Canvas canvas = new Canvas(bmp);
db.setBounds(0, 0, w, h);
db.draw(canvas);
mDayCurrentIcon.setImageBitmap(SetBrightness(bmp, 120));
}
}
}
public Bitmap SetBrightness(Bitmap src, int value) {
int width = src.getWidth();
int height = src.getHeight();
Bitmap bmOut = Bitmap.createBitmap(width, height, src.getConfig());
int A, R, G, B;
int pixel;
for (int x = 0; x < width; ++x)
for (int y = 0; y < height; ++y) {
pixel = src.getPixel(x, y);
A = Color.alpha(pixel);
R = Color.red(pixel);
G = Color.green(pixel);
B = Color.blue(pixel);
R += value;
G += value;
B += value;
if (R > 255) R = 255; else if (R < 0) R = 0;
if (G > 255) G = 255; else if (G < 0) G = 0;
if (B > 255) B = 255; else if (B < 0) B = 0;
bmOut.setPixel(x, y, Color.argb(A, R, G, B));
}
return bmOut;
}
}