// 3 years later! // port from http://www.learnopengles.com/android-lesson-six-an-introduction-to-texture-filtering/ // Y:\opensource\github\Learn-OpenGLES-Tutorials\android\AndroidOpenGLESLessons\src\com\learnopengles\android\lesson6 protected override void onCreate(global::android.os.Bundle savedInstanceState) { base.onCreate(savedInstanceState); //this.ToFullscreen(); var fl = new FrameLayout(this); var ll = new LinearLayout(this); ll.setHorizontalGravity(Gravity.CENTER_HORIZONTAL); ll.setVerticalGravity(Gravity.BOTTOM); var button_set_min_filter = new Button(this).AttachTo(ll).WithText("Set min. filter"); var button_set_mag_filter = new Button(this).AttachTo(ll).WithText("Set mag. filter"); var v = new RenderingContextView(this).AttachTo(fl); var s = new ApplicationSurface(v, button_set_min_filter, button_set_mag_filter, this); ll.AttachTo(fl); #region density var displayMetrics = new DisplayMetrics(); this.getWindowManager().getDefaultDisplay().getMetrics(displayMetrics); v.mDensity = displayMetrics.density; #endregion setContentView(fl); this.ShowToast("http://my.jsc-solutions.net"); }
public Resources(AssetManager assets, DisplayMetrics metrics, Configuration config) { }
private void setLocale(string localeName) { Configuration conf = getResources().getConfiguration(); conf.locale = new Locale(localeName); //setCurrentLanguage(conf.locale.getLanguage()); DisplayMetrics metrics = new DisplayMetrics(); getWindowManager().getDefaultDisplay().getMetrics(metrics); // the next line just changes the application's locale. It changes this // globally and not just in the newly created resource Resources res = new Resources(getAssets(), metrics, conf); // since we don't need the resource, just allow it to be garbage collected. res = null; Log.d(TAG, "setLocale: locale set to " + localeName); }
public void getMetrics(DisplayMetrics outMetrics) { }