Coder Social home page Coder Social logo

jamesmontemagno / pagerslidingtabstrip-for-xamarin.android Goto Github PK

View Code? Open in Web Editor NEW
85.0 17.0 47.0 14.74 MB

Port of Pager Sliding Tab Strip for Xamarin.Android Material Design

License: Other

C# 51.34% HTML 36.97% PowerShell 7.90% Shell 3.79%

pagerslidingtabstrip-for-xamarin.android's Issues

Convert to Xamarin.Forms control

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).

Resource.designer.cs does not contain definition

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

Divider not implemented?

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?

text.Text values not showing in the app,,,

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!

Steve
text issue

pstsUnderlineColor not working

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>

This is the result:
image

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!

Undefined reference in Resources.cs

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.

Crash when saving. Can't find PutInt

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'.

Crash on resume on Jelly Bean device

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.

Remove Fragment from Activity, crashing

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

Update version on NuGet

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.

tab layout

With an AppCompatActivity is possible to make a tablayout without use a custom lib or object as PagerSlindingTabStrip ? Xamarin have a buildin solution ?

Missing method Android.Views.ViewTreeObserver::RemoveOnGlobalLayoutListener

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.

App crashes in OnDraw (ObjectDisposedExceptionCannot)

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)

Is it possible to change a single tabs icon?

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.