0
目前我正在为Xposed框架编写模块,但现在我遇到了一个问题。我想从我自己的软件包中扩充布局。我想我可以通过使用此代码来完成此操作:Xposed模块中的膨胀布局
Context context = (Context) XposedHelpers.getObjectField(object, "mContext");
LayoutInflater inflater = LayoutInflater.from(context);
View buttons = inflater.inflate(R.layout.volumebuttons, null, false);
但是这不起作用。当涉及到第三行时,抛出了一个异常(遗憾的是,这个不清楚的表达方式,我不知道抛出了什么样的异常 - 我不能用Xposed框架看到它)。你有什么想法,为什么我不能使用这段代码来夸大我的布局?