recruit-mp / android-headerfootergridview Goto Github PK
View Code? Open in Web Editor NEWHeaderFooterGridView supports adding header rows and footer rows to GridView for Android.
License: Apache License 2.0
HeaderFooterGridView supports adding header rows and footer rows to GridView for Android.
License: Apache License 2.0
i want to create sticky headers with two sections lets say SECTION A ---> header ---> contents in grid ---> footer similarly SECTIONB ---> contents in grid ---->footer once i scroll sectionA then sectionA header should stick on top and similarly when i start scrolling sectionB contents then its header should stick on top
STACK_TRACE=java.lang.ClassCastException: android.widget.FrameLayout$LayoutParams cannot be cast to android.widget.AbsListView$LayoutParams
at android.widget.ListView.clearRecycledState(ListView.java:551)
at android.widget.ListView.resetList(ListView.java:538)
at android.widget.ListView.layoutChildren(ListView.java:1516)
at android.widget.AbsListView.onLayout(AbsListView.java:2230)
at android.view.View.layout(View.java:16001)
at android.view.ViewGroup.layout(ViewGroup.java:5181)
at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1195)
at android.view.View.layout(View.java:16001)
at android.view.ViewGroup.layout(ViewGroup.java:5181)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:639)
at android.widget.FrameLayout.onLayout(FrameLayout.java:574)
at android.view.View.layout(View.java:16001)
at android.view.ViewGroup.layout(ViewGroup.java:5181)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1959)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1813)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1722)
at android.view.View.layout(View.java:16001)
at android.view.ViewGroup.layout(ViewGroup.java:5181)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:639)
at android.widget.FrameLayout.onLayout(FrameLayout.java:574)
at android.view.View.layout(View.java:16001)
at android.view.ViewGroup.layout(ViewGroup.java:5181)
at android.support.v7.internal.widget.ActionBarOverlayLayout.onLayout(ActionBarOverlayLayout.java:493)
at android.view.View.layout(View.java:16001)
at android.view.ViewGroup.layout(ViewGroup.java:5181)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:639)
at android.widget.FrameLayout.onLayout(FrameLayout.java:574)
at android.view.View.layout(View.java:16001)
at android.view.ViewGroup.layout(ViewGroup.java:5181)
at android.support.v7.internal.widget.ActionBarOverlayLayout.onLayout(ActionBarOverlayLayout.java:493)
at android.view.View.layout(View.java:16001)
at android.view.ViewGroup.layout(ViewGroup.java:5181)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:639)
at android.widget.FrameLayout.onLayout(FrameLayout.java:574)
at android.view.View.layout(View.java:16001)
at android.view.ViewGroup.layout(ViewGroup.java:5181)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1959)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1813)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1722)
at android.view.View.layout(View.java:16001)
at android.view.ViewGroup.layout(ViewGroup.java:5181)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:639)
at android.widget.FrameLayout.onLayout(FrameLayout.java:574)
at android.view.View.layout(View.java:16001)
at android.view.ViewGroup.layout(ViewGroup.java:5181)
at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2492)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2189)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1301)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6673)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:800)
at android.view.Choreographer.doCallbacks(Choreographer.java:603)
at android.view.Choreographer.doFrame(Choreographer.java:572)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:786)
at android.os.Handler.handleCallback(Handler.java:815)
at android.os.Handler.dispatchMessage(Handler.java:104)
at android.os.Looper.loop(Looper.java:194)
at android.app.ActivityThread.main(ActivityThread.java:5637)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:959)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:754)
Here is my code
View footer = ((LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE)).inflate(
R.layout.blankfooter_layout, null);
grouupGridView.addFooterView(footer);
i m unable to add "2 GRIDVIEWS using your lib i have added dependencies in gradle and fully qualifier name in xml too " but still unable to add two gridviews with header and footer inside linearlayout in "VERTICAL ORIENTATION" i m getting error that second gridview already has views
I'll write detail later.
java.lang.ClassCastException: android.widget.AbsListView$LayoutParams cannot be cast to android.view.ViewGroup$MarginLayoutParams
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5817)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:430)
at jp.co.recruit_mp.android.widget.HeaderFooterGridView$FullWidthFixedViewLayout.onMeasure(HeaderFooterGridView.java:301)
at android.view.View.measure(View.java:18573)
at android.widget.GridView.onMeasure(GridView.java:1078)
at jp.co.recruit_mp.android.widget.HeaderFooterGridView.onMeasure(HeaderFooterGridView.java:98)
at android.view.View.measure(View.java:18573)
at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:728)
at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:464)
at android.view.View.measure(View.java:18573)
Current situation because the package name is generic name, I want to rename the package name.
If you import multiple libraries of the same package name from Maven, it is because the application can not build.
I think the 'jp.co.recruit_mp.android.headerfootergridview' as a new package name.
it is possible to add other grid view (in this case unscrollabe grid view) to header and / or footer?
thanks :)
In your Example, Header has full width and GridView has margin.
If add margin to HeaderFooterGridView, it's added to header/footer too. I want to keep header full width just like your example. Please teach how to do it?
Thanks to awesome project.
http://share.joescott.me/9d55045.jpg
(Ignore the 'top 10' smaller header, that's not using this lib)
But as you can see the bar along the top, will not use the full width of the gridview, not to mention the text i set on it, is not visible?
First of all, thanks for this lib and code.
I don't know why, but when I include this line in the gradle build config:
compile 'jp.co.recruit_mp:android-HeaderFooterGridView:0.2'
... the app gets a new permission requirement for:
read phone status and identity
Do you have any idea why this happens? I have checked the code and manifests of the library and I don't see any permission required. However I can reliably repeat this, every time I include the line in the gradle the app get's the new permission requirement, when I remove the line the permission goes away... I use now the java file directly in my project and it's fine that way (no new permission required), I just have no idea why this happens.
Tested on Android 4.4.4. and 5.x, same behavior.
i want to create sticky headers with two sections lets say SECTION A ---> header ---> contents in grid ---> footer similarly SECTIONB ---> contents in grid ---->footer once i scroll sectionA then sectionA header should stick on top and similarly when i start scrolling sectionB contents then its header should stick on top
Hi dear
Thanks for this class...
I used the HeaderFooterGridView and i have clickable header but when i click header of grid view nothing happend.
Please help.
Sorry for my bad English
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.