本文整理匯總了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();
}