Giter Site home page Giter Site logo

Comments (5)

gmcodebuster avatar gmcodebuster commented on May 21, 2024 3

@evrencoskun ,

Thanks for adding scroll to position in recent release. I will integrate it in code and inform you about result.

from tableview.

gmcodebuster avatar gmcodebuster commented on May 21, 2024 1

@evrencoskun,
Scroll to position works perfectly.

from tableview.

gmcodebuster avatar gmcodebuster commented on May 21, 2024

I have added above 2 methods in AbstractTableAdapter class of library and calling both method in Fragment onCreateView() after setting Adapter. In my case scrollColumnHeader(position) scrolls header to specific position, but scrollCell(position) does not scroll cell columns to specific position.

Can you tell me what I am doing wrong?

from tableview.

evrencoskun avatar evrencoskun commented on May 21, 2024

Hi @gmcodebuster,

The reason is TableView stores scroll position for Cell columns.

In CellRecyclerViewAdapter, TableView sets each cell column scroll position when before each cell row is getting visible. See below code

@Override
    public void onViewAttachedToWindow(RecyclerView.ViewHolder holder) {
        super.onViewAttachedToWindow(holder);

        // The below code helps to display a new attached recyclerView on exact scrolled position.
        CellRowViewHolder viewHolder = (CellRowViewHolder) holder;
        ((ColumnLayoutManager) viewHolder.m_jRecyclerView.getLayoutManager())
                .scrollToPositionWithOffset(m_iHorizontalListener.getScrollPosition(),
                        m_iHorizontalListener.getScrollPositionOffset());

So, below functions don't work before TableView cell is not visible on screen.

        scrollCell(position);
        scrollColumnHeader(position);

You can say "What is the solution on my case ?"

You need to find a way to call above codes after when all cell is visible. or You need to hack TableView source to change default values of HorizontalRecyclerViewListener class.

or wait the newest version!

See you

from tableview.

evrencoskun avatar evrencoskun commented on May 21, 2024

Hi @gmcodebuster @sidharthshah,

0.8.5.4 version has been just released. With this version there are 2 helper method in TableView.

These are ;

tableView.scrollToColumnPosition(int column)
tableView.scrollToRowPosition(int row)

These methods will help your request.

Please test your issue with the newest version and let me know the result.

from tableview.

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.