Comments (4)
Hi, I used ViewPager as a header in one of my projects, and it worked just fine. Maybe you could provide me with more details?
from scrollable.
I using the LinearLayout replace the textview in the header, then I add a viewpager into the LinearLayout, and the whole layout is within a fragment, however it is not working. can you show me your codes?
<ru.noties.scrollable.ScrollableLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/scrollable_layout"
app:scrollable_maxScroll="@dimen/header_height"
app:scrollable_considerIdleMillis="125"
app:scrollable_friction="0.075"
app:scrollable_closeUpAnimationMillis="250"
app:scrollable_defaultCloseUp="true"
app:scrollable_scrollerFlywheel="false"
app:scrollable_closeUpAnimatorInterpolator="@android:anim/accelerate_decelerate_interpolator">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/header_height"
android:background="@color/header_background"
android:id="@+id/header"
android:gravity="center">
<android.support.v4.view.ViewPager
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/banner_pager" />
</LinearLayout>
<ru.noties.scrollable.sample.TabsLayout
android:layout_width="match_parent"
android:layout_height="@dimen/tabs_height"
android:background="@color/tabs_background"
android:id="@+id/tabs" />
</LinearLayout>
<android.support.v4.view.ViewPager
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="@dimen/tabs_height"
android:id="@+id/view_pager" />
</ru.noties.scrollable.ScrollableLayout>
from scrollable.
The code looks just fine (although I would eliminate ViewPager's LinearLayout in header). Maybe you could be more specific about the listview move to the header
I don't quite get it.
from scrollable.
I've added a ScrollableFragment to the sample application to show how ScrollableLayout could be used inside a Fragment with a ViewPager as a header
from scrollable.
Related Issues (20)
- View Pager not taking the complete height even on using "match parent" HOT 1
- Not able to get all library views HOT 1
- HeaderView Issue HOT 5
- when Scrolling the page,the headerview can scroll also HOT 1
- What should I do if there are ups and drop refresh ui in viewpager? HOT 1
- dependencies problem HOT 1
- nested two page bug HOT 1
- How to use FragmentStatePager Adapter HOT 1
- ScrollHeader is not smoothly HOT 2
- dude HOT 2
- Change viewpager item size dynamically with listview scroll HOT 5
- Header reappears on top when returning to fragment that has been scrolled down. HOT 8
- Long press slide up RecycleView item before headview scoll up HOT 2
- Scrollable tab scrolls under title bar HOT 1
- add RecyclerView on the head, slide very slowly, there is inertia slow sliding HOT 1
- bottom part of the fragment in the viewpager is clipped or cut of how to fix this HOT 6
- when topView height is changed , tabLayout below will be covered HOT 5
- not use SwipeBackLayoutTouTiao HOT 4
- Cannot collapsed header view programmatically HOT 2
- scrollable scrollview in fragment not scrolled
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scrollable.