银河S7边缘拖放



我有一个用户从三星Galaxy S6 Edge升级到三星Galaxy S7 Edge。

我的应用程序能够拖放扑克牌图像。

用户表示此功能在 S7 Edge 上不起作用,但在 S6 Edge 上起作用。

拖动工作,这表明 onTouch() 和 onDrag() 正在工作,但是当一个对象被放下时,它会返回到其原始位置而不是所需的位置。

protected void measureDisplay() {
    // get info about screen size to determine style of images to use
    display = getWindowManager().getDefaultDisplay();
    size = new Point();
    display.getSize(size);
    displayMetrics = new DisplayMetrics();
    // get the density of the display
    display.getMetrics(displayMetrics);
    width = size.x;
    height = size.y;
}
private void measureBoard(View v) {
    // get the current view width and height
    float viewWidth = v.getWidth();
    float viewHeight = v.getHeight();
    // extract the image offsets inside the view
    Matrix matrix = ((ImageView) v).getImageMatrix();
    float[] values = new float[9];
    matrix.getValues(values);
    boardLeft = values[2]; // the X offset
    boardRight = viewWidth - boardLeft;
    boardTop = values[5]; // the Y offset
    boardBottom = viewHeight - boardTop;
    cardOffsetW = (boardRight - boardLeft) / 10;
    cardOffsetH = (boardBottom - boardTop) / 10;
}
至少可以通过

找出用户是否安装了三星的游戏调谐器来解决幕后显示缩放的一些问题。它会更改任何"游戏"应用程序的分辨率,并且可能在从未打开的情况下执行此操作。

若要解决此问题,请让用户在游戏优化中为游戏指定分辨率(他们可以基于每个应用执行此操作)。在此处查看更多信息: DragEventListener 在三星 S7 (6.0) 上不起作用

我正在为我的游戏进行更新,如果他们安装了游戏调谐器,它会弹出一条消息。

这个应用程序:https://play.google.com/store/apps/details?id=com.evozi.displayscaling将解决三星设备上的问题。在我们的游戏中,我们遇到了类似的问题,解决方案是更改此设置。我希望三星将在下一次操作系统更新中提供修复程序,因此我们确实需要通知用户此错误并迫使他们更改设置。

最新更新