zuowutan / sharegamesdk Goto Github PK
View Code? Open in Web Editor NEW一套开源Android游戏SDK(An Open AndroidGame Channel SDK)
一套开源Android游戏SDK(An Open AndroidGame Channel SDK)
做的不错,继续加油
为了便于接入方动态设置横竖屏,在AndroidManifest.xml文件中设置:
代码动态获取横竖屏状态:
public String getScreenOrientation(){
try {
ApplicationInfo appInfo = mContext.getPackageManager().getApplicationInfo(getPackageName(), PackageManager.GET_META_DATA);
String screenOrientation = appInfo.metaData.getString("xxx_screen_orientation");
return screenOrientation;
} catch (PackageManager.NameNotFoundException e) {
e.printStackTrace();
}
return "landscape";
}
并且设置横竖屏状态最好使用:
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT);//竖屏跟随传感器切换方向
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE);//横屏跟随传感器切换方向
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.