本文整理汇总了Java中android.content.pm.ConfigurationInfo.getGlEsVersion方法的典型用法代码示例。如果您正苦于以下问题:Java ConfigurationInfo.getGlEsVersion方法的具体用法?Java ConfigurationInfo.getGlEsVersion怎么用?Java ConfigurationInfo.getGlEsVersion使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.content.pm.ConfigurationInfo
的用法示例。
在下文中一共展示了ConfigurationInfo.getGlEsVersion方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getGLVersion
import android.content.pm.ConfigurationInfo; //导入方法依赖的package包/类
public static IGLVersion getGLVersion(Context context)
{
IGLVersion glVersion = XeGLUnknown.GL_UNKNOWN;
final ActivityManager activityManager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
final ConfigurationInfo configurationInfo = activityManager.getDeviceConfigurationInfo();
String glesVersionString = configurationInfo.getGlEsVersion();
// This is messy...
if (XeGLES2.GLES2_0.versionString.equals(glesVersionString))
{
glVersion = XeGLES2.GLES2_0;
}
else if (XeGLES3.GLES3_0.versionString.equals(glesVersionString))
{
glVersion = XeGLES3.GLES3_0;
}
else if (XeGLES3.GLES3_1.versionString.equals(glesVersionString))
{
glVersion = XeGLES3.GLES3_1;
}
return glVersion;
}
示例2: getGLVersion
import android.content.pm.ConfigurationInfo; //导入方法依赖的package包/类
public static String getGLVersion () {
if (ClientProperties.getApplicationContext() != null) {
final ActivityManager activityManager = (ActivityManager)ClientProperties.getApplicationContext().getSystemService(Context.ACTIVITY_SERVICE);
if (activityManager != null) {
final ConfigurationInfo configurationInfo = activityManager.getDeviceConfigurationInfo();
if (configurationInfo != null) {
return configurationInfo.getGlEsVersion();
}
}
}
return null;
}
示例3: onCreate
import android.content.pm.ConfigurationInfo; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
oglView = (OGLView) findViewById(R.id.oglView);
final ActivityManager activityManager = (ActivityManager) getSystemService(Context.ACTIVITY_SERVICE);
final ConfigurationInfo configurationInfo = activityManager.getDeviceConfigurationInfo();
String versionText = "Device Supported OpenGL ES Version = " + configurationInfo.getGlEsVersion();
Toast.makeText(this, versionText, Toast.LENGTH_LONG).show();
Log.d("MainActivity", versionText);
}
示例4: getOpenGLVersion
import android.content.pm.ConfigurationInfo; //导入方法依赖的package包/类
/**
* 获取 OpenGL 的版本
*/
@SuppressWarnings("unused")
public static String getOpenGLVersion(Context context) {
ActivityManager am = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
ConfigurationInfo info = am.getDeviceConfigurationInfo();
return info.getGlEsVersion();
}
示例5: c
import android.content.pm.ConfigurationInfo; //导入方法依赖的package包/类
private static void c(Context context)
{
ConfigurationInfo configurationinfo = ((ActivityManager)context.getSystemService("activity")).getDeviceConfigurationInfo();
f = configurationinfo.reqTouchScreen;
g = configurationinfo.getGlEsVersion();
}