Skip to content

Commit

Permalink
[CustomTransitions] Clean up and add compatibility for CommonSampleLi…
Browse files Browse the repository at this point in the history
…brary changes.
  • Loading branch information
pjcollins committed Jun 9, 2015
1 parent 4767501 commit 254d4e9
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
using System.Linq;
using System.Text;

using Android.App;
using Android.Content;
using Android.OS;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using Android.Support.V4.App;
using Android.Transitions;
using CommonSampleLibrary;

Expand All @@ -28,10 +28,6 @@ public class CustomTransitionFragment : Fragment, View.IOnClickListener
//This is the custom Transition used in the sample.
private Transition transition;

public CustomTransitionFragment()
{
}

public override View OnCreateView (LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
{
return inflater.Inflate (Resource.Layout.fragment_custom_transition, container, false);
Expand Down
7 changes: 0 additions & 7 deletions CustomTransitions/CustomTransitions/CustomTransitions.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,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 @@ -60,7 +54,6 @@
<None Include="Resources\AboutResources.txt" />
<None Include="Assets\AboutAssets.txt" />
<None Include="Properties\AndroidManifest.xml" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\layout\Main.axml" />
Expand Down
20 changes: 9 additions & 11 deletions CustomTransitions/CustomTransitions/MainActivity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,27 @@
using Android.Runtime;
using Android.Views;
using Android.Widget;
using Android.Support.V4.App;

using CommonSampleLibrary;

namespace CustomTransitions
{
[Activity (Label = "CustomTransition", MainLauncher = true, Icon = "@drawable/icon", Theme = "@android:style/Theme.Holo.Light")]
[Activity (Label = "@string/app_name", MainLauncher = true, Icon = "@drawable/icon", Theme = "@style/AppTheme")]
public class MainActivity : SampleActivityBase
{
private bool log_shown;

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

// Set our view from the "main" layout resource
SetContentView (Resource.Layout.Main);

var transaction = this.SupportFragmentManager.BeginTransaction ();
CustomTransitionFragment fragment = new CustomTransitionFragment ();
transaction.Replace (Resource.Id.sample_content_fragment, fragment);
transaction.Commit ();

if (bundle == null) {
FragmentTransaction transaction = FragmentManager.BeginTransaction ();
var fragment = new CustomTransitionFragment ();
transaction.Replace (Resource.Id.sample_content_fragment, fragment);
transaction.Commit ();
}
}

public override bool OnCreateOptionsMenu (IMenu menu)
Expand Down Expand Up @@ -61,7 +59,7 @@ public override bool OnOptionsItemSelected (IMenuItem item)
} else {
output.DisplayedChild = 0;
}
SupportInvalidateOptionsMenu ();
InvalidateOptionsMenu ();
return true;
}
}
Expand All @@ -80,7 +78,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
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="CustomTransitions.CustomTransitions">
<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.CustomTransitions">
<application android:label="CustomTransitions">
</application>
</manifest>
5 changes: 0 additions & 5 deletions CustomTransitions/CustomTransitions/packages.config

This file was deleted.

0 comments on commit 254d4e9

Please sign in to comment.