Giter VIP home page Giter VIP logo

Comments (12)

heinrichreimer avatar heinrichreimer commented on July 19, 2024 1

I'm currently not maintaining this lib actively. Seems that university needs more time than one might think 😉

from material-intro.

heinrichreimer avatar heinrichreimer commented on July 19, 2024

As ViewPager has no built in RTL support the only way would be to create our own ViewPager that basically reverses the slide ordering in RTL locales.

from material-intro.

mahmooddagga avatar mahmooddagga commented on July 19, 2024

https://github.com/diego-gomez-olvera/RtlViewPager

from material-intro.

heinrichreimer avatar heinrichreimer commented on July 19, 2024

I've tested quite a bunch of RTL view pager implementations including the one @mahmooddagga suggested and all of them had conflicts with the fadeable view pager we use internally.

I've seen something like a RecyclerView view pager recently and I may try that if I find time.

\subscribe @Crusher7

from material-intro.

moshedidi avatar moshedidi commented on July 19, 2024

It seems like the issue isn't resolved yet right?
If so there is an easy solution to use rotationY="180" in the viewpager and in the fragments, that would do the trick.
If it's already solved please let me know how to use it.

from material-intro.

heinrichreimer avatar heinrichreimer commented on July 19, 2024

@didi77 that may be a bit hacky but if it works why shouldn't we use it.
Could you maybe create an override of ViewPager that does exactly this?
Then I would test it and embed it in the library.

from material-intro.

heinrichreimer avatar heinrichreimer commented on July 19, 2024

Also is there any minimum SDK version for rotationY? If so what options are there to backport it to Jelly Bean? No need to support the rotation on SDK versions below Jelly Bean, as these don't support RTL anyway.

from material-intro.

moshedidi avatar moshedidi commented on July 19, 2024

minimum SDK for rotationY is 16 so we're good on that end, regarding the override class:
you can do it by XML:

<android.support.v4.view.ViewPager
            android:id="@+id/viewpager"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:rotationY="180"/>

or a simple class:

public class viewPagerRTL extends ViewPager {
    public viewPagerRTL(Context context) {
        super(context);
        getRootView().setRotationY(180);
    }
    public viewPagerRTL(Context context, AttributeSet attrs) {
        super(context, attrs);
        getRootView().setRotationY(180);
    }
}

from material-intro.

meierjan avatar meierjan commented on July 19, 2024

Wow, I am facing this issue also. I will have a look into this as well. Please link the PR if you create one.

from material-intro.

heinrichreimer avatar heinrichreimer commented on July 19, 2024

@didi77 Looks very promising, would you mind creating a PR?
Personally I would rather like to have a dedicated class that does the rotation (and the rotation of each page) because that way we don't need to split that feature into more than one file.

from material-intro.

shaharcarbyne avatar shaharcarbyne commented on July 19, 2024

Hey @heinrichreimer,
Any updates on that one?

from material-intro.

heinrichreimer avatar heinrichreimer commented on July 19, 2024

Could be another argument for ViewPager2

from material-intro.

Related Issues (20)

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.