Example #1
0
 /// <summary>
 /// Called by
 /// <see cref="setTheme(int)">setTheme(int)</see>
 /// and
 /// <see cref="getTheme()">getTheme()</see>
 /// to apply a theme
 /// resource to the current Theme object.  Can override to change the
 /// default (simple) behavior.  This method will not be called in multiple
 /// threads simultaneously.
 /// </summary>
 /// <param name="theme">The Theme object being modified.</param>
 /// <param name="resid">The theme style resource being applied to <var>theme</var>.</param>
 /// <param name="first">
 /// Set to true if this is the first time a style is being
 /// applied to <var>theme</var>.
 /// </param>
 protected internal virtual void onApplyThemeResource(android.content.res.Resources
                                                      .Theme theme, int resid, bool first)
 {
     theme.applyStyle(resid, true);
 }
Example #2
0
		public override android.content.res.Resources.Theme getTheme()
		{
			if (mTheme == null)
			{
				mThemeResource = android.content.res.Resources.selectDefaultTheme(mThemeResource, 
					getOuterContext().getApplicationInfo().targetSdkVersion);
				mTheme = mResources.newTheme();
				mTheme.applyStyle(mThemeResource, true);
			}
			return mTheme;
		}