屏幕拉伸在android中

时间:2015-05-12 12:52:54

标签: java android eclipse libgdx

所以我正在使用LibGDX和Eclipse制作一个Android应用程序。我做了一个Core- / Desktop和Android-Project。

当我在桌面项目中运行游戏时,没有任何东西伸展到地面,但是当我尝试在我的Galaxy S4上运行它时,屏幕会全部伸展到屏幕的底部。

这是我的小应用程序的第一堂课。 (在核心)

package com.mygdx.ghost.desktop;

import com.badlogic.gdx.backends.lwjgl.LwjglApplication;
import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration;
import com.mygdx.ghost.Ghost;

public class DesktopLauncher {
    public static void main (String[] arg) {
        LwjglApplicationConfiguration config = new     LwjglApplicationConfiguration();
        config.width = Ghost.WIDTH;
        config.height = Ghost.HEIGHT;
        config.title = Ghost.TITLE;

        new LwjglApplication(new Ghost(), config);
    }
}

我使用480x800因为我被承诺将是游戏尺寸而不是屏幕尺寸。

我在桌面项目中使用了这样的维度:

$(".machines-data").dataTable({

    aLengthMenu: [ [5, 10, 25, 50, 100, 150, "-1"], [5, 10, 25, 50, 100, 150, "All"] ],
    iDisplayLength: 5,
    searching: true,
    "aaSorting": [],
    columnDefs: [ { orderable: true } ],
    "sPaginationType": "full_numbers",
    "bDestroy": true,

    "bProcessing": true,                
    "serverSide": true,
    "sAjaxSource": "aLengthMenu: [ [5, 10, 25, 50, 100, 150, "-1"], [5, 10, 25, 50, 100, 150, "All"] ],
    iDisplayLength: 5,
    searching: true,
    "aaSorting": [],
    columnDefs: [ { orderable: true } ],
    "sPaginationType": "full_numbers",
    "bDestroy": true,

    "bProcessing": true,                
    "serverSide": true,
    "sAjaxSource": "/machines/server.php",

});

我在andriod项目中使用它们一样吗?

0 个答案:

没有答案
相关问题