mirror of https://github.com/axmolengine/axmol.git
Merge pull request #15096 from fnz/volume_control
Set music volume control as default
This commit is contained in:
commit
6cc80f28fc
|
@ -29,6 +29,7 @@ import android.content.Intent;
|
||||||
import android.content.pm.ApplicationInfo;
|
import android.content.pm.ApplicationInfo;
|
||||||
import android.content.pm.PackageManager;
|
import android.content.pm.PackageManager;
|
||||||
import android.graphics.PixelFormat;
|
import android.graphics.PixelFormat;
|
||||||
|
import android.media.AudioManager;
|
||||||
import android.opengl.GLSurfaceView;
|
import android.opengl.GLSurfaceView;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
@ -281,6 +282,8 @@ public abstract class Cocos2dxActivity extends Activity implements Cocos2dxHelpe
|
||||||
|
|
||||||
Window window = this.getWindow();
|
Window window = this.getWindow();
|
||||||
window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN);
|
window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN);
|
||||||
|
|
||||||
|
this.setVolumeControlStream(AudioManager.STREAM_MUSIC);
|
||||||
}
|
}
|
||||||
|
|
||||||
//native method,call GLViewImpl::getGLContextAttrs() to get the OpenGL ES context attributions
|
//native method,call GLViewImpl::getGLContextAttrs() to get the OpenGL ES context attributions
|
||||||
|
|
Loading…
Reference in New Issue