Giter VIP home page Giter VIP logo

Comments (4)

BraisGabin avatar BraisGabin commented on July 20, 2024

Right now you can not highlight a row. You can try to implement it using Otto or something like this.

from tablefixheaders.

Kshitij1792 avatar Kshitij1792 commented on July 20, 2024

You can modify the code a bit to achieve that.
1.Make an int variable and set its value to any -ve number.
2. Attach onClickListener to every convertView view in the code and when user touches the row save it in the variable you created. Also save the coorinates in two instance variables to restore table later to the same coordinates.
3. Now make another method to refresh adapter and pass the row no. to that adapter.
4. In this method check that variable you created while views are generated.
like this:
if(touchedRow==row)
5. If the condition satisfies use this line to change background color of that line to highlight it.
convertView.setBackgroundColor(Color.BLUE );
6. At last because we refreshed our adapter to bring it to the same coordinates where user touched the table, use this coordinates you saved in step 2.
like this:
tableFixHeaders.scrollTo(x, y);
I guess it'll help.

from tablefixheaders.

NixSam avatar NixSam commented on July 20, 2024

Thanks, you helped me a lot. And how to change background color of some cell if a have row and column...? I wanted to change background color when i update a cell...

from tablefixheaders.

BraisGabin avatar BraisGabin commented on July 20, 2024

Your Adapter should handle that behaviour. You need to implement it manually. In the getView() you can set the background and force a repaint with notifyDataSetChanged()

from tablefixheaders.

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.