我找到了下面调用Win API的资源。问题是,它只设置了主监视器。我认为我必须更改dmDeviceName,但我不确定如何通过它。dm.dmDeviceName //what is the input to this?dm.dmPelsWidth = width; int iRet = User_32.ChangeDisplaySettings(ref dm,
", "screen density " + dm.densityDpi);Log.d("MyTag", "screen density " + dm.densityDpi);
输出"screen density 160“。在挂接调试器时,我注意到在AppWidget的情况下,资源对象的mDefaultDisplay成员是空的。类似地,如果我在运行时使用从AppWidget中的context.