Inheritance: java.lang.Object
示例#1
0
			internal Theme(Resources _enclosing)
			{
				this._enclosing = _enclosing;
				this.mAssets = this._enclosing.mAssets;
				this.mTheme = this.mAssets.createTheme();
			}
        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);
        }