1
0
mirror of https://github.com/areteruhiro/LIME-beta-hiro.git synced 2025-02-06 05:21:37 +09:00

Merge pull request #8 from auag0/patch-1

リソース名から動的にリソースIDを取得して複数のバージョンに対応
This commit is contained in:
Chippppp 2024-01-20 09:33:20 +09:00 committed by GitHub
commit 2dcbc2eea1

View File

@ -33,7 +33,9 @@ public class Main implements IXposedHookLoadPackage {
XposedHelpers.findAndHookMethod(hookTarget, "onResume", new XC_MethodHook() { XposedHelpers.findAndHookMethod(hookTarget, "onResume", new XC_MethodHook() {
@Override @Override
protected void beforeHookedMethod(MethodHookParam param) throws Throwable { protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
((ViewGroup) ((Activity) param.thisObject).findViewById(2131433343)).getChildAt(6).setVisibility(View.GONE); Activity activity = (Activity) param.thisObject;
int resourceId = activity.getResources().getIdentifier("main_tab_container", "id", activity.getPackageName());
((ViewGroup) activity.findViewById(resourceId)).getChildAt(6).setVisibility(View.GONE);
} }
}); });
} }