Coder Social home page Coder Social logo

headergridview's Introduction

HeaderGridView

Introduction

This is an updated version of GridView which allows for Headers. The Headers themselves are not part of the adapter / data source. This means that the headers only are not being recycled.

Setup

To use HeaderGridView in your projects, simply add this project to your workspace then add it as a library project to your current project.

Usage

HeaderGridView can be added as a custom view to any layout.

instead of <GridView /> use…

    <com.origamilabs.library.views.HeaderGridView />

then simply add header views via

    // same methods as ListView
    addHeaderView(View v, Object data, boolean isSelectable);
    addHeaderView(View v);

Tests

None.

TODO:

  • implement Footer support. should be simple
  • develop tests

headergridview's People

Contributors

maurycyw avatar

Stargazers

 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  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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

headergridview's Issues

addFooterView()

I'd appreciate if it you'd add addFooterView, since this is much more useful for me than a HeaderView.

Remove headerView issue

i've added HeaderGridView to my project successfully but the problem is i cannot remove headerview or update it. because the below if statement (info.view == v) is always false :

private boolean removeFixedViewInfo(View v, ArrayList<FixedViewInfo> where) {
    int len = where.size();
    int count = 0;
    for (int i = 0; i < len; ++i) {
        FixedViewInfo info = where.get(i);
        if (info.view == v) {
            this.setPadding(this.getPaddingLeft(), getPaddingTop()-v.getMeasuredHeight(), this.getPaddingRight(), this.getPaddingBottom());
            where.remove(i);
            count++;
            break;
        }
    }

    return count > 0;
}

can you help me with this and explain me why this happens? v is a global View which i've used to add header view before.

Header Scroll Issues

When scrolling down by way of DPad selection, the header moves up, but the space the header previously occupied continues to cut off the grid. The effect is that the header area becomes white, and grid items scroll under the white area.

screen1

screen2

It's can't use it

At HeaderGridView.java line 96.
"v.measure(MeasureSpec.makeMeasureSpec(mDisplayWidth, MeasureSpec.AT_MOST), MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED));" In setupView(View view).
It's always throw nullPointException.
why????

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.