The X Factor UK
This Is Us

Libgdx resize after resume

I am developing an android game application in Libgdx. I am very new at Libgdx game engine, i have a problem about rendering/resizing after resume the screen. Can't resize after pause

After resizing screen works well . But not always. Sometimes it resizes almost half of screen.
Sometimes i get this error as well

I couldn’t figure out the problem. I did google it , found some solutions but they didn’t help me as well.

 //This is my manifest in the project.
 <activity
        android:name="com.tll.game.android.AndroidLauncher"
        android:label="@string/app_name"
        android:screenOrientation="landscape"
        android:configChanges="keyboard|keyboardHidden|orientation|screenSize">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>

 //Resize function in Game class
  @Override
public void resize(int width, int height) {
    viewport.update(width, height, true);
    camera.update();
}
//i commented the resize function in Screen class, but it didn't work
  @Override
public void resize(int width, int height) {
    //viewPort.update(width, height, true);
    //camera.update();
}


Download libgdx.resize.after.resume.zip
Direct Link


Download


Download libgdx.resize.after.resume.zip
Mediafire


Download


Download libgdx.resize.after.resume.zip
Filedropper


Download

Both comments and pings are currently closed.

Comments are closed.