Skip to content

Commit

Permalink
[ViewPagerIndicator] Fix the Android v4.0 build
Browse files Browse the repository at this point in the history
ViewPagerIndicator didn't build under Android v4.0 because Fragment
and FragmentManager were ambiguous (e.g. Android.App.Fragment vs.
Android.Support.V4.App.Fragment). Use a using-alias to disambiguate,
always using the Support types.

TODO: Rework the sample so that it uses the "real" types under Android
v4.0 instead of always using the Support types.
  • Loading branch information
jonpryor committed Apr 24, 2012
1 parent f1b79ee commit b38a729
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 0 deletions.
Expand Up @@ -9,6 +9,8 @@
using Android.Support.V4.View;
using Android.Support.V4.App;

using FragmentManager = Android.Support.V4.App.FragmentManager;

namespace ViewPagerIndicator
{
[Activity (Label = "Tabs/Default", Theme = "@style/Theme.PageIndicatorDefaults")]
Expand Down
Expand Up @@ -9,6 +9,8 @@
using Android.Support.V4.View;
using Android.Support.V4.App;

using FragmentManager = Android.Support.V4.App.FragmentManager;

namespace ViewPagerIndicator
{
[Activity (Label = "Tabs/Styled", Theme = "@style/StyledIndicators")]
Expand Down
2 changes: 2 additions & 0 deletions ViewPagerIndicator/ViewPagerIndicator/TestFragment.cs
Expand Up @@ -11,6 +11,8 @@
using Android.Support.V4.App;
using System.Text;

using Fragment = Android.Support.V4.App.Fragment;

namespace ViewPagerIndicator
{
class TestFragment : Fragment
Expand Down
3 changes: 3 additions & 0 deletions ViewPagerIndicator/ViewPagerIndicator/TestFragmentAdapter.cs
Expand Up @@ -11,6 +11,9 @@
using Android.Widget;
using Android.Support.V4.App;

using Fragment = Android.Support.V4.App.Fragment;
using FragmentManager = Android.Support.V4.App.FragmentManager;

namespace ViewPagerIndicator
{
public class TestFragmentAdapter : FragmentPagerAdapter
Expand Down
Expand Up @@ -11,6 +11,8 @@
using Android.Widget;
using Android.Support.V4.App;

using FragmentManager = Android.Support.V4.App.FragmentManager;

namespace ViewPagerIndicator
{
public class TestTitleFragmentAdapter : TestFragmentAdapter, TitleProvider
Expand Down

0 comments on commit b38a729

Please sign in to comment.