public static void handleInitPackageResources(XModuleResources modRes) throws Throwable { statusDrawable = modRes.getDrawable(R.drawable.status_toast); }
layoutParams2.rightMargin = HookMethods.px(115.0f); final ImageView snapPrefsBtn = new ImageView(HookMethods.SnapContext); snapPrefsBtn.setImageDrawable(mResources.getDrawable(R.drawable.story_filter)); snapPrefsBtn.setScaleX(0.75f); snapPrefsBtn.setScaleY(0.75f);
iv.getContext().getResources().getIdentifier("camera_batteryfilter_full", "drawable", "com.snapchat.android")) if (Preferences.getFilterPath() == null) { iv.setImageDrawable(modRes.getDrawable(R.drawable.custom_filter_1)); Logger.log("Replaced batteryfilter from R.drawable", true); } else {
row.setLayoutParams(navigation.getChildAt(0).getLayoutParams()); ImageView iv = new ImageView(navigation.getContext()); iv.setImageDrawable(mResources.getDrawable(R.drawable.profile_snapprefs)); iv.setLayoutParams(orig.getLayoutParams()); TextView textView = new TextView(navigation.getContext());
holder.img.setImageDrawable(mRes.getDrawable(optionImageId[position]));
holder.img.setImageDrawable(mRes.getDrawable(optionImageId[position]));
@Override protected void afterHookedMethod(final MethodHookParam param) throws Throwable { if (!once){ View colorPickerView = (View) getObjectField(param.thisObject, "j"); outerOptionsLayout = new RelativeLayout(HookMethods.SnapContext); final GridView innerOptionsView = new GridView(HookMethods.SnapContext); innerOptionsView.setAdapter(new OptionsAdapter(HookMethods.SnapContext, mResources)); innerOptionsView.setNumColumns(5); innerOptionsView.setHorizontalSpacing(px(2.0f)); innerOptionsView.setVerticalSpacing(px(5.0f)); innerOptionsView.setStretchMode(GridView.STRETCH_COLUMN_WIDTH); innerOptionsView.setPadding(0,px(7.5f), px(1.0f), px(7.5f)); final RelativeLayout.LayoutParams outerOptionsLayoutParams = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT); outerOptionsLayoutParams.leftMargin = px(75.0f); outerOptionsLayoutParams.rightMargin = px(25.0f); outerOptionsLayout.setVisibility(View.VISIBLE); outerOptionsLayout.setBackgroundDrawable(mResources.getDrawable(R.drawable.drawingbackground)); outerOptionsLayout.addView(innerOptionsView, GridLayout.LayoutParams.MATCH_PARENT, GridLayout.LayoutParams.MATCH_PARENT); ((RelativeLayout)colorPickerView.getParent().getParent()).addView(outerOptionsLayout, outerOptionsLayoutParams); once = true; } } });
outerOptionsLayoutParams.rightMargin = px(10.0f); outerOptionsLayout.setVisibility(View.GONE); outerOptionsLayout.setBackgroundDrawable(mResources.getDrawable(R.drawable.optionsbackground)); outerOptionsLayout.addView(innerOptionsView, GridLayout.LayoutParams.MATCH_PARENT, GridLayout.LayoutParams.MATCH_PARENT); final ImageButton textButton = new ImageButton(HookMethods.SnapContext); textButton.setBackgroundColor(0); textButton.setImageDrawable(mResources.getDrawable(R.drawable.triangle)); textButton.setScaleX((float) 0.4); textButton.setScaleY((float) 0.4); final ImageButton speed = new ImageButton(HookMethods.SnapContext); speed.setBackgroundColor(0); speed.setImageDrawable(mResources.getDrawable(R.drawable.speed)); speed.setScaleX((float) 0.4); speed.setScaleY((float) 0.4); final ImageButton weather = new ImageButton(HookMethods.SnapContext); weather.setBackgroundColor(0); weather.setImageDrawable(mResources.getDrawable(R.drawable.weather)); weather.setScaleX((float) 0.4); weather.setScaleY((float) 0.4); final ImageButton location = new ImageButton(HookMethods.SnapContext); location.setBackgroundColor(0); location.setImageDrawable(mResources.getDrawable(R.drawable.location)); location.setScaleX((float) 0.4); location.setScaleY((float) 0.4);