Giter VIP home page Giter VIP logo

landing-strip's Introduction

novoda

This repo contains information that is common to all Novoda's Open Source projects.

landing-strip's People

Contributors

alexstyl avatar amlcurran avatar ataulm avatar eduardb avatar electryc avatar fourlastor avatar genypaul avatar joetimmins avatar juankysoriano avatar niamh-power avatar nitram509 avatar ouchadam avatar stylingandroid avatar zegnus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

landing-strip's Issues

Strong dependency on ViewPager is dangerous

We should depend on an abstraction defined in this library, and then provide an implementation for ViewPager.

This is the same issue that the TabLayout from Material Design library faces - it depends directly on ViewPager.

ViewPager 2 is in EAP - and neither TabLayout nor Landing-Strip supports it.

Either:

  1. wait for VP2 and add direct support for it
  2. expose and depend on an abstraction for ViewPager (e.g. page scroll listener), so that it's easy for new implementations
  3. deprecate landing-strip in favour of TabLayout, which will eventually have support for VP2 also

I think 2/3 are legit.

Add customisable tab padding support

Currently, padding can be added only to the whole landing strip, and not to individual tabs. This padding (more like a margin actually) should work in such a way that the indicator is underlining only the tab text, as in the screenshot below:

screenshot 2017-03-06 10 11 22

NPE When calculating scroll offset

com.novoda.landingstrip.ScrollOffsetCalculator.calculateScrollOffset (SourceFile:22)
--
  | com.novoda.landingstrip.ScrollingPageChangeListener.scroll (SourceFile:51)
  | com.novoda.landingstrip.ScrollingPageChangeListener.onPageScrolled (SourceFile:30)
  | com.novoda.landingstrip.LandingStrip.onPageScrolled (SourceFile:126)
  | android.support.v4.view.ViewPager.dispatchOnPageScrolled (SourceFile:1924)
  | android.support.v4.view.ViewPager.onPageScrolled (SourceFile:1898)
  | android.support.v4.view.ViewPager.pageScrolled (SourceFile:1836)
  | android.support.v4.view.ViewPager.computeScroll (SourceFile:1796)
  | android.view.View.updateDisplayListIfDirty (View.java:14541)
  | android.view.View.getDisplayList (View.java:14576)
  | android.view.View.draw (View.java:15346)

State activated should be used instead of state selected

I was reading this blog post the other day on Android view states and it was talking about how selected is more like a fallback for when focused cannot be used, and the correct state to use to designate the tab representing the current viewpager pager is activated.

Activated has been a state since honeycomb, and has the same affordances as selected so it's just a semantics thing.

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.