Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- XposedHelpers.findAndHookMethod("com.snapchat.android.fragments.addfriends.ProfileFragment", packageParam.classLoader, "onCreateView", LayoutInflater.class, ViewGroup.class, Bundle.class, new XC_MethodHook() {
- @Override
- protected void afterHookedMethod(MethodHookParam param) throws Throwable {
- TableLayout navigation = (TableLayout) ((LinearLayout) XposedHelpers.getObjectField(param.thisObject, "z")).getChildAt(0);
- ImageView orig = (ImageView) ((TableRow) navigation.getChildAt(0)).getChildAt(0);//hardcoding much
- TextView orig1 = (TextView) ((TableRow) navigation.getChildAt(0)).getChildAt(1);//hardcoding much
- TableRow row = new TableRow(navigation.getContext());
- row.setLayoutParams(navigation.getChildAt(0).getLayoutParams());//hardcoding much
- ImageView iv = new ImageView(navigation.getContext());
- iv.setImageResource(NotificationUtil.DEFAULT_ICON);//here set icon
- iv.setLayoutParams(orig.getLayoutParams());
- TextView textView = new TextView(navigation.getContext());
- textView.setText("Open Snapprefs");//customize text?
- textView.setTextColor(orig1.getCurrentTextColor());
- textView.setTextSize(24);//trail and error font xD
- textView.setLayoutParams(orig1.getLayoutParams());
- row.setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- Intent launchIntent = ctx.getPackageManager().getLaunchIntentForPackage("com.stirante.quizcheat");//change package!
- ctx.startActivity(launchIntent);
- }
- });
- row.addView(iv);
- row.addView(textView);
- navigation.addView(row);
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement