jamesmontemagno / pagerslidingtabstrip-for-xamarin.android Goto Github PK
View Code? Open in Web Editor NEWPort of Pager Sliding Tab Strip for Xamarin.Android Material Design
License: Other
Port of Pager Sliding Tab Strip for Xamarin.Android Material Design
License: Other
Hi I want the seledted tab to be in center with tri - angular indicator for the selected tab. Which attribute I have to set to make it work.
I think, with the spread of XamForms, it would be a great idea to make such controls available as an overwritten version of TabbedPage (in this case).
Hello i have following problem my resource designer doesn't find these dimensions from the PagerSlidingTabStrip Plugin. Im building the project on SDK 23.
global::com.refractored.Resource.Dimension.dialog_fixed_height_major = global::Test.Droid.Resource.Dimension.dialog_fixed_height_major;
global::com.refractored.Resource.Dimension.dialog_fixed_height_minor = global::Test.Droid.Resource.Dimension.dialog_fixed_height_minor;
global::com.refractored.Resource.Dimension.dialog_fixed_width_major = global::Test.Droid.Resource.Dimension.dialog_fixed_width_major;
global::com.refractored.Resource.Dimension.dialog_fixed_width_minor = global::Test.P4V.Droid.Resource.Dimension.dialog_fixed_width_minor;
Compile is set to API 23 and Export.dll is added to Reference.
The sample project from you shows me the exact same error.
i tried to find a solution changed the SDK's but nothing helped.
Best Regards
This is a great component, thanks for porting it. The code that draws the tab divider is commented out. (PagerSlidingTabStrip.cs, line 627) Is there a reason for this?
It seems that a number of attribute names have changed on the later v4 support library.
Hi James,
I'm not getting the text.Test values sent into the root and shown in the app when I run your project - for some reason. I thought it might be a configuration issue on my system but I did a complete reinstall of all associated Xamarin packages and it's seems to still be there. I've attached a screen shot. If you have any thoughts I'd really appreciate it!
Thank you for this nice project by the way!
* This library has now been deprecated by the new Android Support Design Library. Please see the full component for a sample: https://components.xamarin.com/view/xamandroidsupportdesign*
The trailing asterisks break the link.
Shouldn't there be a shadow under the tabs like in the Play Store app?
Hey James,
I was trying to update the underline color on my application and it does not appear to be working.
See this line app:pstsUnderlineColor="#ffffff"
in the axml below.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<com.refractored.PagerSlidingTabStrip
android:id="@+id/tabs"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:pstsPaddingMiddle="false"
app:pstsShouldExpand="true"
app:pstsUnderlineColor="#ffffff" />
<android.support.v4.view.ViewPager
android:id="@+id/viewPager"
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_weight="1" />
</LinearLayout>
The underline color matches <item name="android:textColorPrimary">@color/wet_asphalt</item>
defined in styles.xml.
Additionally I tried
m_PageIndicator = view.FindViewById<PagerSlidingTabStrip>(Resource.Id.tabs);
m_PageIndicator.UnderlineColor = Resource.Color.white;
This also did not work. Any suggestions? Also, per bamboo, happy birthday!
Using the latest AppCompat there are 110 undefined references. A fix is to do:
+ global::com.refractored.Resource.Styleable.Theme = global::App.Name.Resource.Styleable.Theme
- global::com.refractored.Resource.Styleable.Theme = global::App.Name.Resource.Styleable.AppCompatTheme
For all instances, every time the Resources.designer.cs is regenerated.
I'm not sure how to go about fixing it in your component however.
It would have been nice if the sample also updated the status bar color to a darker color than the toolbar.
I just upgraded to to 1.0.9 and the app crashes in ActionbarActivity.OnSaveInstanceState
.
It looks like Android.OS.BaseBundle
is only present on API 21+
04-14 14:19:49.762 W/ (27117): Missing method PutInt in assembly Refractored.PagerSlidingTabStrip.dll, type Android.OS.BaseBundle
04-14 14:19:49.762 W/Mono (27117): The class Android.OS.BaseBundle could not be loaded, used in Refractored.PagerSlidingTabStrip
Unhandled Exception:
System.TypeLoadException: Could not load type 'Android.OS.BaseBundle' from assembly 'Refractored.PagerSlidingTabStrip'.
I have a problem that the sample app is crashing after it have been sent to background on my Jelly Bean device. It works on Lollipop.
Steps to reproduce:
Run the sample app
Switch to some other apps
After a while the sample app is put into background
Switch back to the app and it crashes.
It would be nice if some other than me can reproduce this.
Hello,
In my activity I have a fragment on the left with a list view (FragmentA) and a fragment on the right which contains a PagerSlidingTabStrip (FragmentB). Depending on the layout, I add them differently. They both add to the layout correctly, and FragmentA can be removed correctly, but when I go to remove the FragmentB, the app crashes and I get a java.lang.reflect.InvocationTargetException. Is there something I need to add in the Fragment to handle being destroyed? Do you have a sample app that shows the SlidingTabs being contained in a fragment themselves?
Thanks in advance
Hi James,
Looks like something is borked in the latest Xamarin Android Support libraries (22.1.1) which your version 1.0.9.1 depends on. I've had to roll back.
You might want to hold off on using 22.1.1 for now:
The packages hasn't seen an update in over a year, when there is a later version on git. It'd be great if you could update it, thanks.
With an AppCompatActivity is possible to make a tablayout without use a custom lib or object as PagerSlindingTabStrip ? Xamarin have a buildin solution ?
Iโm getting the following error in our Application,
Missing method Android.Views.ViewTreeObserver::RemoveOnGlobalLayoutListener(ViewTreeObserver/IOnGlobalLayoutListener) in assembly Mono.Android.dll, referenced in assembly /storage/emulated/0/Android/data/blisss.salesnavigator.android/files/.override/Refractored.PagerSlidingTabStrip.dll.
We have a minimal android version of API Level 15 and a target of API level 21 and are using the latest versions of Xamarin Android and the Xamarin support.v4,v13 and v7.appcompat libraries.
The strange thing is that I had it working but after some other changes this error suddenly appeared and I can't seem to get it back in a working condition.
I've tested the code on multiple devices with different api levels and the same error happens on both pre-lollipop and lollipop devices.
The PagerSlidingTabStrip crashes on a Samsung S7 Edge in the onDraw method.
System.ObjectDisposedExceptionCannot access a disposed object. Object name: 'Android.Graphics.Paint'. Raw Java.Interop.JniPeerMembers.AssertSelf(IJavaPeerable self)<67d9ce838ca8443ba3ee57c49530f12a>:0 Java.Interop.JniPeerMembers.JniInstanceMethods.InvokeVirtualVoidMethod(string encodedMember, IJavaPeerable self, JniArgumentValue* parameters)<67d9ce838ca8443ba3ee57c49530f12a>:0 Android.Graphics.Paint.set_Color(Color value)<7b54b5e3469b4fb0b2cef44ad5a5b85c>:0 com.refractored.PagerSlidingTabStrip.OnDraw(Canvas canvas)<b1427543c5704ae8bfee8048b832bfc1>:0 Android.Views.View.n_OnDraw_Landroid_graphics_Canvas_(IntPtr jnienv, IntPtr native__this, IntPtr native_canvas)<7b54b5e3469b4fb0b2cef44ad5a5b85c>:0 at (wrapper dynamic-method) System.Object:a757f904-7660-4d22-b077-c7e1696ab4d9 (intptr,intptr,intptr)
Hi James,
Excellent work this.
Is it possible to access and change a single tabs icon/color?
Use case:
I have a form made up of multiple tabs and I'd like to indicate to the user when all fields are completed on a tab possibly through a green/red icon.
I do have some idea's but thought I'd check with you before forking.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.