Skip to content

Commit

Permalink
code formated
Browse files Browse the repository at this point in the history
  • Loading branch information
gonzalonm committed Sep 16, 2016
1 parent 495c32f commit 8b526d4
Showing 1 changed file with 35 additions and 35 deletions.
70 changes: 35 additions & 35 deletions ApiDemo/App/ActivityRecreate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,51 +25,51 @@

namespace MonoDroid.ApiDemo
{
[Activity (Label = "@string/activity_recreate", Name = "monodroid.apidemo.ActivityRecreate")]
[IntentFilter (new[] { Intent.ActionMain }, Categories = new string[] { ApiDemo.SAMPLE_CATEGORY })]
public class ActivityRecreate : Activity
{
int current_theme;
[Activity(Label = "@string/activity_recreate", Name = "monodroid.apidemo.ActivityRecreate")]
[IntentFilter(new[] { Intent.ActionMain }, Categories = new string[] { ApiDemo.SAMPLE_CATEGORY })]
public class ActivityRecreate : Activity
{
int current_theme;

protected override void OnCreate (Bundle bundle)
{
base.OnCreate (bundle);
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);

if (bundle != null)
{
current_theme = bundle.GetInt("theme");
if (bundle != null)
{
current_theme = bundle.GetInt("theme");

switch (current_theme)
{
case Resource.Style.ThemeCurrent:
current_theme = Resource.Style.ThemeCurrentDialog;
break;
case Resource.Style.ThemeCurrentDialog:
current_theme = Resource.Style.ThemeCurrentDialogWhenLarge;
break;
switch (current_theme)
{
case Resource.Style.ThemeCurrent:
current_theme = Resource.Style.ThemeCurrentDialog;
break;
case Resource.Style.ThemeCurrentDialog:
current_theme = Resource.Style.ThemeCurrentDialogWhenLarge;
break;
case Resource.Style.ThemeCurrentDialogWhenLarge:
current_theme = Resource.Style.Theme;
break;
default:
current_theme = Resource.Style.ThemeCurrent;
break;
}
current_theme = Resource.Style.ThemeCurrent;
break;
}

SetTheme(current_theme);
}
SetTheme(current_theme);
}

SetContentView (Resource.Layout.activity_recreate);
SetContentView(Resource.Layout.activity_recreate);

// Watch for button clicks
var button = FindViewById<Button> (Resource.Id.recreate);
button.Click += delegate { Recreate (); };
}
// Watch for button clicks
var button = FindViewById<Button>(Resource.Id.recreate);
button.Click += delegate { Recreate(); };
}

protected override void OnSaveInstanceState (Bundle outState)
{
base.OnSaveInstanceState (outState);
protected override void OnSaveInstanceState(Bundle outState)
{
base.OnSaveInstanceState(outState);

outState.PutInt ("theme", current_theme);
}
}
outState.PutInt("theme", current_theme);
}
}
}

0 comments on commit 8b526d4

Please sign in to comment.