BubbleTabs.Xamarin
1.0.2
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.2
NuGet\Install-Package BubbleTabs.Xamarin -Version 1.0.2
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.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add BubbleTabs.Xamarin --version 1.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: BubbleTabs.Xamarin, 1.0.2"
#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.2 // Install BubbleTabs.Xamarin as a Cake Tool #tool nuget:?package=BubbleTabs.Xamarin&version=1.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Basic 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.xml
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
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">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:padding="16dp"
android:src="@drawable/icon1" />
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:padding="16dp"
android:src="@drawable/icon2" />
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:padding="16dp"
android:src="@drawable/icon3" />
</com.github.florent37.bubbletab.BubbleTab>
<android.support.v4.view.ViewPager
android:id="@+id/viewPager"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</LinearLayout>
bubblepage_tab.xml
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.RecyclerView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#e9eaed"
android:orientation="vertical">
</android.support.v7.widget.RecyclerView>
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 | net6.0-android was computed. net7.0-android was computed. net8.0-android was computed. |
MonoAndroid | monoandroid is compatible. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
- Xamarin.Android.Support.v7.AppCompat (>= 28.0.0.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.