BubbleTabs.Xamarin
1.0.0
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package BubbleTabs.Xamarin --version 1.0.0
NuGet\Install-Package BubbleTabs.Xamarin -Version 1.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="BubbleTabs.Xamarin" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add BubbleTabs.Xamarin --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: BubbleTabs.Xamarin, 1.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install BubbleTabs.Xamarin as a Cake Addin #addin nuget:?package=BubbleTabs.Xamarin&version=1.0.0 // Install BubbleTabs.Xamarin as a Cake Tool #tool nuget:?package=BubbleTabs.Xamarin&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Keep in mind that the AppCompatActivity style is mandatory for example:
XML: Style.xml
<resources>
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>
</resources>
Main.axml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical">
<com.github.florent37.bubbletab.BubbleTab
android:id="@+id/bubbleTab"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clipToPadding="false"
android:background="@android:color/white"
android:elevation="10dp"
app:bubbleTab_circleColor="@color/colorAccent"
app:bubbleTab_circleRatio="1.25"
app:bubbleTab_image2="@drawable/ic_home_white_24dp"
app:bubbleTab_image1="@drawable/ic_filter_white_24dp"
app:bubbleTab_image4="@drawable/ic_map"
/>
<android.support.v4.view.ViewPager
android:id="@+id/viewPager"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</LinearLayout>
C#:
public class MainActivity : AppCompatActivity
{
protected override void OnCreate(Bundle savedInstanceState)
{
base.OnCreate(savedInstanceState);
// Set our view from the "main" layout resource
SetContentView(Resource.Layout.Main);
BubbleTab bubbleTab= FindViewById<BubbleTab>(Resource.Id.bubbleTab);
ViewPager viewPager= FindViewById<ViewPager>(Resource.Id.viewPager);
viewPager.Adapter = new FakeAdapter(SupportFragmentManager);
bubbleTab.SetupWithViewPager(viewPager);
}
public class FakeAdapter : FragmentStatePagerAdapter
{
public FakeAdapter(Android.Support.V4.App.FragmentManager fm) : base(fm)
{
Fm = fm;
}
public override int Count
{
get { return 5; }
}
public Android.Support.V4.App.FragmentManager Fm { get; }
public override Android.Support.V4.App.Fragment GetItem(int position)
{
switch (position)
{
default:
return FakeFragment.NewInstance();
}
}
}
public class FakeFragment : Android.Support.V4.App.Fragment
{
public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
{
return inflater.Inflate(Resource.Layout.bubbletab_page, container, false);
}
public static Android.Support.V4.App.Fragment NewInstance()
{
return new FakeFragment();
}
}
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net is compatible. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.