Android library that implements a table with fixed headers.

Overview

TableFixHeaders

[DISCONTINUED] This project it's not deprecated, it do what it must, but we don't have time to improve it or, even, answer issues.

What is it?

TableFixHeaders is an Android widget to display tables with headers.

Features

  • Adapter class to fill the table in an easy way.

  • Own scroll.

  • Impulse scroll.

  • Recycling of views.

  • Shadows when there is more info to scroll.

Technical information

  • Required minimum API level: 5

  • Supports all the screens sizes and density.

Sample

You can download the app test from here: http://bit.ly/13buAIq

QR

Screenshots

Screenshot 1

Screenshot 2

License

Copyright 2012-2013 InQBarna

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Comments
  • Row header above column header in cell -1, -1

    Row header above column header in cell -1, -1

    Currently when there is no background set for Cell -1, -1, the column header is above the row header, is it possible to have the row header above the column header when they meet in the first cell (-1, -1)?

    Thanks.

    question 
    opened by ashx1 17
  • Auto scroll to the last row

    Auto scroll to the last row

    I have a requirement to automatically scroll the table to the last row on initial display (after all data have been added from cursor to the TableAdapter.) I assume I cannot use the standard listview commands: lv.setSelection(adapter.getCount() - 1); or lv.setStackFromBottom(true);

    Would you be able to suggest how to achieve this requirement when using your TableFixHeaders library ? I noticed that you have an empty method: public void scrollBy(int x, int y) still to be implemented. Would that provide a solution ?

    Thank you in advance for the assistance with this requirement.

    bug 
    opened by MariuszGSL 17
  • How to detect touched row position / row number ?

    How to detect touched row position / row number ?

    I need to detect which table row was touched, in order to re-select that same row after returning to this table from another activity/view. Currently, when the table row is touched, the view changes automatically to another activity. Depending on user interaction, that activity then changes the table row data and the background colour of the previously touched table row cell (within the getLayoutResource). This requires re-setting the tableAdapter to null and re-querying the data, in order to populate and re-draw the table with the newly coloured cell. As the result of this re-draw, the first row in the table is always re-selected. The requirement is to re-select (go to) the same row, which was originally touched. I have noticed that the onInterceptTouchEvent library method obtains the currentY of the touched row. However I don't know how to get that currentY value from within my application and then how to apply that Y value to scrollBy the table down to the previously touched row level, and to have this row visible and in focus.

    Please suggest the code method how to achieve the above requirement. Many thanks.

    question 
    opened by MariuszGSL 14
  • How to remove the family view row?

    How to remove the family view row?

    Hi,

    I'm having trouble trying to remove the row that returns from getView() under

    case 4: view = getFamilyView(row, column, convertView, parent);

    This is in the FamilyTable.java example and is the row right after the fixed header.

    Thank you.

    opened by cchong 10
  • IndexOutOfBoundsException: Invalid index 6, size is 4

    IndexOutOfBoundsException: Invalid index 6, size is 4

    Hey, I dynamic set data in adapter,then have the issue was very frequent and random.

    java.lang.IndexOutOfBoundsException: Invalid index 6, size is 4 at java.util.ArrayList.throwIndexOutOfBoundsException(ArrayList.java:251) at java.util.ArrayList.get(ArrayList.java:304) at com.scan.inventory.table.DisplayTableAdapter.getBody(DisplayTableAdapter.java:90) at com.scan.inventory.table.DisplayTableAdapter.getView(DisplayTableAdapter.java:55) at com.scan.inventory.table.TableFixHeaders.makeView(TableFixHeaders.java:771) at com.scan.inventory.table.TableFixHeaders.addLeftOrRight(TableFixHeaders.java:422) at com.scan.inventory.table.TableFixHeaders.addLeft(TableFixHeaders.java:399) at com.scan.inventory.table.TableFixHeaders.scrollBy(TableFixHeaders.java:321) at com.scan.inventory.table.TableFixHeaders.scrollTo(TableFixHeaders.java:270) at com.scan.inventory.ui.QueryActivity.refreshTableFix(QueryActivity.java:221) at com.scan.inventory.ui.QueryActivity.queryData(QueryActivity.java:211) at com.scan.inventory.ui.QueryActivity.onClick(QueryActivity.java:148) at android.view.View.performClick(View.java:3511) at android.view.View$PerformClick.run(View.java:14105) at android.os.Handler.handleCallback(Handler.java:605) at android.os.Handler.dispatchMessage(Handler.java:92) at android.os.Looper.loop(Looper.java:137) at android.app.ActivityThread.main(ActivityThread.java:4424) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:511) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551) at dalvik.system.NativeStart.main(Native Method)

    invalid 
    opened by xiaobei3120 9
  • Widget performance in large data sets

    Widget performance in large data sets

    This is the most impressive, beautiful and functional implementation of the Android scrollable table grid I have come across !

    I would like to ask a few questions:

    1. What is the expected performance (display speed) of this component, compared to a standard List view or Table view, when displaying large number of database records (1000+) ?
    2. Is it possible to implement click on data row listener (similar to onListItemClick) to select another activity, e.g. to edit the fields of the selected record in another frame ?
    3. Is it possible to implement click on column header listener, in order to sort the table data in ASC or DESC order ?
    4. How to prevent the text wrapping in a cell ?

    Thank you in advance for tips and examples how to solve the questions 2, 3, and 4. I am relatively new to Android programming and any assistance will be most appreciated.

    question 
    opened by MariuszGSL 8
  • Using with SearchView

    Using with SearchView

    Has anyone tried to use FixHeaders with a SearchView?

    I'm trying to use but when the Activity is scrolled down and I search something, it gives me an ArrayOutOfBounds exception, maybe because of the scroll.

    I'm using ActionBarSherlock and made a ListAdapter instead of a matrix.

    bug 
    opened by tsuharesu 6
  • How to change table font size globally

    How to change table font size globally

    I would like to allow users to change the default font size used in the TableFixHeaders through the user-defined application Settings (Preferences).

    What would be the best, most efficient, recommended method to apply this user-defined setting globally to all table cells in your library ? I am looking for a solution similar to the already available global GetWidth and getHeight settings, which can be easily controlled from the application preferences (in combination with density).

    Would you consider adding a similar font size global control switch to your library ? This would dramatically improve the visual display and functionality of your excellent library.

    Regards Mariusz

    opened by MariuszGSL 5
  • java.lang.NullPointerException

    java.lang.NullPointerException

    private void scrollBounds() {
        scrollX = scrollBounds(scrollX, firstColumn, widths, width);
        scrollY = scrollBounds(scrollY, firstRow, heights, height);
    }
    

    maybe widths is Null ?

    java.lang.NullPointerException at TableFixHeaders.scrollBounds(TableFixHeaders.java:712) at TableFixHeaders.scrollBounds(TableFixHeaders.java:702) at TableFixHeaders.scrollBy(TableFixHeaders.java:344) at TableFixHeaders.onTouchEvent(TableFixHeaders.java:269) at android.view.View.dispatchTouchEvent(View.java:3933) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:955) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1015) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1015) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1015) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1015) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1015)

    duplicate 
    opened by captain-miao 5
  • Not running in Tablet

    Not running in Tablet

    Process: com.app.goveva, PID: 1792 java.lang.NullPointerException: Attempt to get length of null array at com.inqbarna.tablefixheaders.TableFixHeaders.sumArray(TableFixHeaders.java:616) at com.inqbarna.tablefixheaders.TableFixHeaders.computeHorizontalScrollOffset(TableFixHeaders.java:356)

    Getting this when running on the tablet or any other android bigger size device (> 5"). But running properly on smaller devices(<= 5")

    opened by YashNagayach 4
  • For getting details of author and publisher of original work to fill in the application form of copyright.

    For getting details of author and publisher of original work to fill in the application form of copyright.

    I used this library in my android app and now details of Original work's author are required to be filled in the application form of copyright. Also I wanna show up on about page of my app, so could you please share your details here: Full Name of the author of original work: Address of the author of original work: Nationality of the author of original work:

    Also Name,address and nationality of the publisher of the original work. Name of the publisher: Address of the publisher: Nationality of the publisher:

    question 
    opened by maxwell0313 4
  • Unable to use the lib

    Unable to use the lib

    The build started failing when resolving com.github.InQBarna:TableFixHeaders:d4282e18d1 and seems https://jitpack.io/com/github/InQBarna/TableFixHeaders/d4282e18d1/TableFixHeaders-d4282e18d1.pom is not found anymore.

    opened by TakuSemba 0
  • Android 9.0 landscape will crash

    Android 9.0 landscape will crash

    Problem: landscape can't inflate layout. Sorry for I can't post the code here. Only the exception I can provide. Only occur for the android 9.0 yet.

    java.lang.ArrayIndexOutOfBoundsException: length=1; index=1
        at com.inqbarna.tablefixheaders.TableFixHeaders.adjustFirstCellsAndScroll(TableFixHeaders.java:719)
        at com.inqbarna.tablefixheaders.TableFixHeaders.adjustFirstCellsAndScroll(TableFixHeaders.java:710)
        at com.inqbarna.tablefixheaders.TableFixHeaders.onLayout(TableFixHeaders.java:649)
        at android.view.View.layout(View.java:20672)
        at android.view.ViewGroup.layout(ViewGroup.java:6194)
        at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1812)
        at android.widget.LinearLayout.layoutHorizontal(LinearLayout.java:1801)
        at android.widget.LinearLayout.onLayout(LinearLayout.java:1567)
        at android.view.View.layout(View.java:20672)
        at android.view.ViewGroup.layout(ViewGroup.java:6194)
        at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
        at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
        at android.view.View.layout(View.java:20672)
        at android.view.ViewGroup.layout(ViewGroup.java:6194)
        at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1812)
        at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1656)
        at android.widget.LinearLayout.onLayout(LinearLayout.java:1565)
        at android.view.View.layout(View.java:20672)
        at android.view.ViewGroup.layout(ViewGroup.java:6194)
        at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1083)
        at android.view.View.layout(View.java:20672)
        at android.view.ViewGroup.layout(ViewGroup.java:6194)
        at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
        at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
        at android.view.View.layout(View.java:20672)
        at android.view.ViewGroup.layout(ViewGroup.java:6194)
        at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1812)
        at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1656)
        at android.widget.LinearLayout.onLayout(LinearLayout.java:1565)
        at android.view.View.layout(View.java:20672)
        at android.view.ViewGroup.layout(ViewGroup.java:6194)
        at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
        at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
        at android.view.View.layout(View.java:20672)
        at android.view.ViewGroup.layout(ViewGroup.java:6194)
        at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1812)
        at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1656)
        at android.widget.LinearLayout.onLayout(LinearLayout.java:1565)
        at android.view.View.layout(View.java:20672)
        at android.view.ViewGroup.layout(ViewGroup.java:6194)
        at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
        at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
        at com.android.internal.policy.DecorView.onLayout(DecorView.java:753)
        at android.view.View.layout(View.java:20672)
        at android.view.ViewGroup.layout(ViewGroup.java:6194)
        at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2799)
        at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2316)
        at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1463)
        at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7190)
        at android.view.Choreographer$CallbackRecord.run(Choreographer.java:949)
        at android.view.Choreographer.doCallbacks(Choreographer.java:761)
        at android.view.Choreographer.doFrame(Choreographer.java:696)
        at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:935)
        at android.os.Handler.handleCallback(Handler.java:873)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loop(Looper.java:193)
        at android.app.ActivityThread.main(ActivityThread.java:6718)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
    
    opened by jarvis1801 0
  • Why does the table get inside the screen?

    Why does the table get inside the screen?

    I used this table for the tablet. But as you can see in the screenshot below, the width of the table is fixed to the screen, which causes the width-sectional scroll to disappear. How to fix this problem? image

    opened by iman2420 5
  • How to set section header is aligned center on table?

    How to set section header is aligned center on table?

    Now, the number of headers depends on the number of columns. Example: I have 4 cols and the number of headers also is 4. I want to make a table where section header is only 1 column and not depend on the number of table's columns. How can I do this?

    opened by thecuder 2
Owner
inqbarna
inqbarna
A new canvas drawing library for Android. Aims to be the Fabric.js for Android. Supports text, images, and hand/stylus drawing input. The library has a website and API docs, check it out

FabricView - A new canvas drawing library for Android. The library was born as part of a project in SD Hacks (www.sdhacks.io) on October 3rd. It is cu

Antwan Gaggi 1k Dec 13, 2022
Android StackBlur is a library that can perform a blurry effect on a Bitmap based on a gradient or radius, and return the result. The library is based on the code of Mario Klingemann.

Android StackBlur Android StackBlur is a library that can perform a blurry effect on a Bitmap based on a gradient or radius, and return the result. Th

Enrique López Mañas 3.6k Dec 29, 2022
Android library providing bread crumbs to the support library fragments.

Hansel And Gretel Android library providing bread crumbs for compatibility fragments. Usage For a working implementation of this project see the sampl

Jake Wharton 163 Nov 25, 2022
Android library used to create an awesome Android UI based on a draggable element similar to the last YouTube graphic component.

Draggable Panel DEPRECATED. This project is not maintained anymore. Draggable Panel is an Android library created to build a draggable user interface

Pedro Vicente Gómez Sánchez 3k Dec 6, 2022
TourGuide is an Android library that aims to provide an easy way to add pointers with animations over a desired Android View

TourGuide TourGuide is an Android library. It lets you add pointer, overlay and tooltip easily, guiding users on how to use your app. Refer to the exa

Tan Jun Rong 2.6k Jan 5, 2023
Bubbles for Android is an Android library to provide chat heads capabilities on your apps. With a fast way to integrate with your development.

Bubbles for Android Bubbles for Android is an Android library to provide chat heads capabilities on your apps. With a fast way to integrate with your

Txus Ballesteros 1.5k Jan 2, 2023
Wizard Pager is a library that provides an example implementation of a Wizard UI on Android, it's based of Roman Nurik's wizard pager (https://github.com/romannurik/android-wizardpager)

Wizard Pager Wizard Pager is a library that provides an example implementation of a Wizard UI on Android, it's based of Roman Nurik's wizard pager (ht

Julián Suárez 520 Nov 11, 2022
Make your native android Toasts Fancy. A library that takes the standard Android toast to the next level with a variety of styling options. Style your toast from code.

FancyToast-Android Prerequisites Add this in your root build.gradle file (not your module build.gradle file): allprojects { repositories { ... ma

Shashank Singhal 1.2k Dec 26, 2022
Make your native android Dialog Fancy. A library that takes the standard Android Dialog to the next level with a variety of styling options. Style your dialog from code.

FancyAlertDialog-Android Prerequisites Add this in your root build.gradle file (not your module build.gradle file): allprojects { repositories { ..

Shashank Singhal 350 Dec 9, 2022
A Tinder-like Android library to create the swipe cards effect. You can swipe left or right to like or dislike the content.

Swipecards Travis master: A Tinder-like cards effect as of August 2014. You can swipe left or right to like or dislike the content. The library create

Dionysis Lorentzos 2.3k Dec 9, 2022
A Material design Android pincode library. Supports Fingerprint.

LolliPin A Lollipop material design styled android pincode library (API 14+) To include in your project, add this to your build.gradle file: //Loll

Omada Health 1.6k Nov 25, 2022
Android Library to implement simple touch/tap/swipe gestures

SimpleFingerGestures An android library to implement simple 1 or 2 finger gestures easily Example Library The library is inside the libSFG folder Samp

Arnav Gupta 315 Dec 21, 2022
Useful library to use custom fonts in your android app

EasyFonts A simple and useful android library to use custom fonts in android apps without adding fonts into asset/resource folder.Also by using this l

Vijay Vankhede 419 Sep 9, 2022
Android library which allows you to swipe down from an activity to close it.

Android Sliding Activity Library Easily create activities that can slide vertically on the screen and fit well into the Material Design age. Features

Jake Klinker 1.3k Nov 25, 2022
This library provides a simple way to add a draggable sliding up panel (popularized by Google Music and Google Maps) to your Android application. Brought to you by Umano.

Note: we are not actively responding to issues right now. If you find a bug, please submit a PR. Android Sliding Up Panel This library provides a simp

Umano: News Read To You 9.4k Dec 31, 2022
An Android library supports badge notification like iOS in Samsung, LG, Sony and HTC launchers.

ShortcutBadger: The ShortcutBadger makes your Android App show the count of unread messages as a badge on your App shortcut! Supported launchers: Sony

Leo Lin 7.2k Dec 30, 2022
Android Library to build a UI Card

Card Library Travis master: Travis dev: Card Library provides an easy way to display a UI Card using the Official Google CardView in your Android app.

Gabriele Mariotti 4.7k Dec 29, 2022
A horizontal view scroller library for Android

View Flow for Android ViewFlow is an Android UI widget providing a horizontally scrollable ViewGroup with items populated from an Adapter. Scroll down

Patrik Åkerfeldt 1.8k Dec 29, 2022
[] Android library that provides a file explorer to let users select files on external storage.

aFileChooser - Android File Chooser aFileChooser is an Android Library Project that simplifies the process of presenting a file chooser on Android 2.1

Paul Burke 1.8k Jan 5, 2023