Skip to content

Commit

Permalink
[BasicImmersiveMode] Use Android.App over Android.Support.V4.App
Browse files Browse the repository at this point in the history
Updates to work with new CommonSampleLibrary changes
  • Loading branch information
pjcollins committed Jun 9, 2015
1 parent 246e0f7 commit aec95ed
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 21 deletions.
7 changes: 0 additions & 7 deletions BasicImmersiveMode/BasicImmersiveMode.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,6 @@
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="Mono.Android" />
<Reference Include="Xamarin.Android.Support.v13">
<HintPath>packages\Xamarin.Android.Support.v13.20.0.0.4\lib\MonoAndroid32\Xamarin.Android.Support.v13.dll</HintPath>
</Reference>
<Reference Include="Xamarin.Android.Support.v4">
<HintPath>packages\Xamarin.Android.Support.v4.20.0.0.4\lib\MonoAndroid32\Xamarin.Android.Support.v4.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="MainActivity.cs" />
Expand All @@ -61,7 +55,6 @@
<ItemGroup>
<None Include="Assets\AboutAssets.txt" />
<None Include="Properties\AndroidManifest.xml" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\layout\Main.axml" />
Expand Down
5 changes: 2 additions & 3 deletions BasicImmersiveMode/BasicImmersiveModeFragment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,18 @@
using Android.Runtime;
using Android.Views;
using Android.Widget;
using Android.Support.V4.App;
using CommonSampleLibrary;

namespace BasicImmersiveMode
{
public class BasicImmersiveModeFragment : Android.Support.V4.App.Fragment
public class BasicImmersiveModeFragment : Fragment
{
public static readonly string TAG = "BasicImmersiveModeFragment";

public override void OnCreate (Bundle savedInstanceState)
{
base.OnCreate (savedInstanceState);
HasOptionsMenu = true;
SetHasOptionsMenu (true);
}

public override void OnActivityCreated (Bundle savedInstanceState)
Expand Down
8 changes: 4 additions & 4 deletions BasicImmersiveMode/MainActivity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ namespace BasicImmersiveMode
* A simple launcher activity containing a summary sample description
* and a few action bar buttons.
*/
[Activity (Label = "@string/app_name", MainLauncher = true,
[Activity (Label = "@string/app_name", MainLauncher = true, Theme="@style/AppTheme",
UiOptions = UiOptions.SplitActionBarWhenNarrow)]
public class MainActivity : SampleActivityBase
{
Expand All @@ -45,8 +45,8 @@ protected override void OnCreate (Bundle bundle)
base.OnCreate (bundle);
SetContentView (Resource.Layout.Main);

if (SupportFragmentManager.FindFragmentByTag (FRAGTAG) == null ) {
Android.Support.V4.App.FragmentTransaction transaction = SupportFragmentManager.BeginTransaction ();
if (FragmentManager.FindFragmentByTag (FRAGTAG) == null ) {
FragmentTransaction transaction = FragmentManager.BeginTransaction ();
var fragment = new BasicImmersiveModeFragment ();
transaction.Add (fragment,FRAGTAG);
transaction.Commit ();
Expand All @@ -72,7 +72,7 @@ public override void InitializeLogging ()
logWrapper.NextNode = msgFilter;

// On screen logging via a fragment with a TextView.
var logFragment = (LogFragment)SupportFragmentManager.FindFragmentById (Resource.Id.log_fragment);
var logFragment = (LogFragment)FragmentManager.FindFragmentById (Resource.Id.log_fragment);
msgFilter.NextNode = logFragment.LogView;

Log.Info (TAG, "Ready");
Expand Down
3 changes: 1 addition & 2 deletions BasicImmersiveMode/Properties/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="BasicImmersiveMode.BasicImmersiveMode">
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="19" />
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="com.xamarin.BasicImmersiveMode">
<application android:label="BasicImmersiveMode" android:icon="@drawable/icon">
</application>
</manifest>
5 changes: 0 additions & 5 deletions BasicImmersiveMode/packages.config

This file was deleted.

0 comments on commit aec95ed

Please sign in to comment.