juliome10 / doubleviewpager Goto Github PK
View Code? Open in Web Editor NEWHorizontal + Vertical ViewPager
License: Apache License 2.0
Horizontal + Vertical ViewPager
License: Apache License 2.0
Hi, I do not see a license choice for this repository.
I note that https://github.com/juliome10/DoubleViewPager/ must be contains at least Apache license for good enough to open source project, or you can search another in this link http://choosealicense.com/.
While that is a good choice for some projects, Thank you.
[EDIT] sorry for my mistake, I didn't clearly read the LICENSE file because its usually on end of README file.
I have a problem when I import the library (I use gradle) : your manifest allow backup and mine doesn't.
Of course I can change my value to true, but for now I would rather not to.
(and oddly, tools:replace and tool:node don't work)
This is the stack :
Error:Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : Attribute application@allowBackup value=(false) from AndroidManifest.xml:9:9-36
is also present at [com.github.juliome10:DoubleViewPager:1.0.1] AndroidManifest.xml:12:9-35 value=(true).
Suggestion: add 'tools:replace="android:allowBackup"' to <application> element at AndroidManifest.xml:7:5-47:19 to override.
Now child's images swipe BOTTOM to TOP ,but i want to swipe like TOP to BOTTOM.
In this lib images swipe bottom to top but i want that child images also swipe BOTTOM to TOP & TOP to BOTTOM.
Thanks.
Hello!
Thank you for very helpful library. You saved a lot of time for me.
I am wondering, how can I get currentItem of VerticalViewpager.
Something like: (DoubleViewPager) pager.getCurrentVerticalItem();
Best regards
Hi,
thank you very much for your good work. It saved me a lot of time. Now I'd like to do a slight modification: I'd like to forbid horizontal scrolling for certain positions. For example if you are currently showing a view of the first column a horizontal swipe to the second column should only be possible if you have opened the first view of the first column, but if you're actually showing some other view of the first column and try to do a vertical swipe I'd like to avoid scrolling and show the EdgeEffectCompat things. Do you have a tip for me, where it could be the best place to add some kind of callback giving the current column and row and return a bool for indicationg whether a swipe is allowed? Btw. do you know whether this EdgeEffectCompat can also be used at bottom and top when reaching the end of a column?
Thanks and best regards,
Johannes
Hi,
In your example, there could be a way VerticalPagerAdapter
could extend FragmentPagerAdapter
.
For now, I have to override your instantiateItem() like this :
pager.setAdapter(new DoubleViewPagerAdapter(getApplicationContext(), verticalAdapters){
@Override
public Object instantiateItem(final ViewGroup container, int position) {
VerticalViewPager childVP = (VerticalViewPager) super.instantiateItem(container, position);
childVP.setId(R.id.dummyId);
return childVP;
}
});
This way I dont have an error at instantiation, but the horizontal swiping is not working yet.
Maybe you can change your code and set childVP an id ?
ViewPagers need an id to work with fragments.
Thanks.
Is there any way add pageIndicator to verticalViewPager?
Hello Julio is an interesting library. There is way to go to a certain position within the verticalPagers. For example I have a button that when pressed brings me to the last position of that verticalPager. It would like setCurrentItem method (int position) of ViewPager android. regards...
As the user horizontally swipes from, lets say, the xth vertical page in a vertical viewpager, assuming the next vertical viewpager over isn't currently in memory, the view that will load in that viewpager is not the xth vertical page but the starting page. Following this, is there a way to prevent horizontal scrolls from non-starting pages in the doubleviewpager?
Forgive me if this is a simple question, I am just starting out and am self-taught.
Hi,
VerticalViewPager seems to have DEBUG set to true as default, so the view is spamming the logs.
Thanks.
Aidan
Hey, thank for your library.
Please answer if you have spare time.
Why there are horizontal parents with children in them? Wouldn't it be better to have only one Viewpager that has 4 possible neighbours (left, right, top, bottom)?
Hi,
I'm using an adpater that does not create View items and am seeing a crash trying to cast the item to a View. This is caused by the following debug log code in VerticalViewPager
if (DEBUG) { Log.i(TAG, "populate() - destroyItem() with pos: " + pos + " view: " + ((View) ii.object)); }
We should not assume that the items in the adapter are Views
Thanks
Hello,
How could I start the MainActivity pointed to the center of a grid 3x3?
And, how should I get the information about the "row" that I'm focussing?
Thanks,
LZ
Hi, thank you so much for this library. I was wondering if there was a way to implement a vertical first then have horizontal children in this.
Any help would be great!
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.