All Projects → levitnudi → Legacytableview

levitnudi / Legacytableview

simple light weight android library for displaying tabulated data

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Legacytableview

Pytablewriter
pytablewriter is a Python library to write a table in various formats: CSV / Elasticsearch / HTML / JavaScript / JSON / LaTeX / LDJSON / LTSV / Markdown / MediaWiki / NumPy / Excel / Pandas / Python / reStructuredText / SQLite / TOML / TSV.
Stars: ✭ 422 (+982.05%)
Mutual labels:  excel, table
React Spreadsheet Grid
An Excel-like grid component for React with custom cell editors, performant scroll & resizable columns
Stars: ✭ 996 (+2453.85%)
Mutual labels:  excel, table
Nghandsontable
Official AngularJS directive for Handsontable
Stars: ✭ 438 (+1023.08%)
Mutual labels:  excel, table
Reactgrid
Add spreadsheet-like behavior to your React app
Stars: ✭ 289 (+641.03%)
Mutual labels:  excel, table
Rows
A common, beautiful interface to tabular data, no matter the format
Stars: ✭ 739 (+1794.87%)
Mutual labels:  excel, table
React Tabulator
React Tabulator is based on tabulator - a JS table library with many advanced features.
Stars: ✭ 295 (+656.41%)
Mutual labels:  table, tableview
Locktableview
Android自定义表格,支持锁双向表头,自适应列宽,自适应行高,快速集成。Android custom table, support two-way lock header, adaptive column width, adaptive line width, rapid integration.
Stars: ✭ 520 (+1233.33%)
Mutual labels:  excel, table
vue-willtable
An editable table component for Vue.js 2.0
Stars: ✭ 119 (+205.13%)
Mutual labels:  excel, table
Sheetjs
📗 SheetJS Community Edition -- Spreadsheet Data Toolkit
Stars: ✭ 28,479 (+72923.08%)
Mutual labels:  excel, table
Ce
Jspreadsheet is a lightweight vanilla javascript plugin to create amazing web-based interactive tables and spreadsheets compatible with other spreadsheet software.
Stars: ✭ 5,832 (+14853.85%)
Mutual labels:  excel, table
android-tableview-kotlin
Android's missing TableView component.
Stars: ✭ 40 (+2.56%)
Mutual labels:  table, tableview
Datagrid
Gem to create tables grids with sortable columns and filters
Stars: ✭ 921 (+2261.54%)
Mutual labels:  table, tableview
CXLinkageSheetDemo
一个同时支持横向和纵向滚动的表格框架 CXLinkageSheetView,适用于一些数据展示页面
Stars: ✭ 78 (+100%)
Mutual labels:  excel, tableview
Android Extensions
An Android library with modules to quickly bootstrap an Android application.
Stars: ✭ 356 (+812.82%)
Mutual labels:  table, tableview
ag-grid
The best JavaScript Data Table for building Enterprise Applications. Supports React / Angular / Vue / Plain JavaScript.
Stars: ✭ 8,743 (+22317.95%)
Mutual labels:  excel, table
React Handsontable
React Data Grid with Spreadsheet Look & Feel. Official React wrapper for Handsontable.
Stars: ✭ 511 (+1210.26%)
Mutual labels:  excel, table
sense-export
Just a simple button to export data in your Qlik Sense applications.
Stars: ✭ 28 (-28.21%)
Mutual labels:  excel, table
fastapi-csv
🏗️ Create APIs from CSV files within seconds, using fastapi
Stars: ✭ 46 (+17.95%)
Mutual labels:  excel, table
Animatedtablayout
Yet another android tab layout
Stars: ✭ 572 (+1366.67%)
Mutual labels:  customview, tablayout
Vue Handsontable Official
Vue Data Grid with Spreadsheet Look & Feel. Official Vue wrapper for Handsontable.
Stars: ✭ 751 (+1825.64%)
Mutual labels:  excel, table

LegacyTableView

simple light weight android library for displaying tabulated data

This is a simple android library that will help you include tables in your projects using a few lines of code. Follow very simple examples in the sample LegcyTableView project. Write data dynamically, translate into different languages, update themes, colors, fonts etc...

Application Demo

Examples

This project covers the following examples

  1. Simple display of data
  2. Custom controls for the LegacyTableView
  3. Adding data from database (SQLite)
  4. Using different LegacyTableViewThemes

Get started...

Add jitpack.io to your root gradle file

            allprojects {
   	repositories {
   		...
   		maven { url 'https://jitpack.io' }
   	}
   } 
     

Add this to your dependencies method in build.gradle file

      dependencies {
                   implementation 'com.github.levitnudi:LegacyTableView:1.4'
   		
   }


                } 
     

Add the following lines...

  1. In your xml layout add:
       <com.levitnudi.legacytableview.LegacyTableView
       android:id="@+id/legacy_table_view"
       android:layout_width="match_parent"
       android:layout_height="match_parent"/>
     

  1. In your activity add:
        //set table title labels
      LegacyTableView.insertLegacyTitle("Id", "Name", "Age", "Email");
      //set table contents as string arrays
      LegacyTableView.insertLegacyContent("2999010", "John Deer", "50", "[email protected]",
              "332312", "Kennedy F", "33", "[email protected]"
              ,"42343243", "Java Lover", "28", "[email protected]"
              ,"4288383", "Mike Tee", "22", "[email protected]");

      LegacyTableView legacyTableView = (LegacyTableView)findViewById(R.id.legacy_table_view);
      legacyTableView.setTitle(LegacyTableView.readLegacyTitle());
      legacyTableView.setContent(LegacyTableView.readLegacyContent());
      
      //depending on the phone screen size default table scale is 100
      //you can change it using this method
      //legacyTableView.setInitialScale(100);//default initialScale is zero (0)
      
      //if you want a smaller table, change the padding setting
      legacyTableView.setTablePadding(7);
      
      //to enable users to zoom in and out:
      legacyTableView.setZoomEnabled(true);
      legacyTableView.setShowZoomControls(true);

      //remember to build your table as the last step
      legacyTableView.build();
    

  1. Using Themes:
        //set table title labels
      LegacyTableView.insertLegacyTitle("Id", "Name", "Age", "Email");
      //set table contents as string arrays
      LegacyTableView.insertLegacyContent("2999010", "John Deer", "50", "[email protected]",
              "332312", "Kennedy F", "33", "[email protected]"
              ,"42343243", "Java Lover", "28", "[email protected]"
              ,"4288383", "Mike Tee", "22", "[email protected]");

      LegacyTableView legacyTableView = (LegacyTableView)findViewById(R.id.legacy_table_view);
      legacyTableView.setTitle(LegacyTableView.readLegacyTitle());
      legacyTableView.setContent(LegacyTableView.readLegacyContent());
      
      //Add your preferred theme like this:
      legacyTableView.setTheme(GOLDALINE);
      
      /*
      Explore available themes
      OCEAN
      LAVICI
      GOLDALINE
      ECOKENYA
      DESKTOP
      MAASAI
      LEVICI
      ORIO
      SKELETON
      MESH*/
      
      //depending on the phone screen size default table scale is 100
      //you can change it using this method
      //legacyTableView.setInitialScale(100);//default initialScale is zero (0)
      
      //if you want a smaller table, change the padding setting
      legacyTableView.setTablePadding(7);
      
      //to enable users to zoom in and out:
      legacyTableView.setZoomEnabled(true);
      legacyTableView.setShowZoomControls(true);

      //remember to build your table as the last step
      legacyTableView.build();
    

  1. Display from database:
     public void getFromDatabase(){//execute this method to fetch from database

     Cursor cursor =  db.rawQuery("SELECT * FROM legacy_table", null);

     if(cursor.getCount()>0){
            //use database column names or custom names for the columns
            /* insert your column titles using legacy insertLegacyTitle() function*/
            LegacyTableView.insertLegacyTitle(cursor.getColumnName(1), cursor.getColumnName(2),
                    cursor.getColumnName(3), cursor.getColumnName(4));
     }
     while(cursor.moveToNext()) {
         //simple table content insert method for table contents
         LegacyTableView.insertLegacyContent(cursor.getString(1),
                 cursor.getString(2), cursor.getString(3), cursor.getString(4));
     }
     //remember to close your database to avoid memory leaks
     cursor.close();
 }
 
 //then do this to display it on the table
  LegacyTableView legacyTableView = (LegacyTableView)findViewById(R.id.legacy_table_view);
     //once you have inserted contents and titles, you can retrieve them
     //using readLegacyTitle() and readLegacyContent() methods
     legacyTableView.setTitle(LegacyTableView.readLegacyTitle());
     legacyTableView.setContent(LegacyTableView.readLegacyContent());

     //remember to build your table as the last step
     legacyTableView.build();
   

  1. Using custom controls:
        final LegacyTableView tableView = (LegacyTableView)findViewById(R.id.legacy_table_view);
     /*
     [OPTIONAL] default column seperator characters are (د) character
     default row seperator is (\n) character
     you may need to change if your set of data contains these characters
     if you don't change the seperators, any character similar in your data set
     will be excluded in your table. It is therefore adviseable to use least
     commonly used characters
     tableView.setColumnSeperator("'");
     tableView.setRowSeperator("\n");
     tableView.setLegacyColumnSeperator("'");*/

     //set table title labels
     LegacyTableView.insertLegacyTitle("Id", "Name", "Age", "Email");
     //set table contents as string arrays
     LegacyTableView.insertLegacyContent("2999010", "John Deer", "50", "[email protected]",
             "332312", "Kennedy F", "33", "[email protected]"
             ,"42343243", "Java Lover", "28", "[email protected]"
             ,"4288383", "Mike Tee", "22", "[email protected]");
     //make sure to indicate custom as other features may not work with default table theme
     tableView.setTheme(CUSTOM);
     //get titles and contents
     tableView.setContent(LegacyTableView.readLegacyContent());
     tableView.setTitle(LegacyTableView.readLegacyTitle());
     tableView.setBottomShadowVisible(true);

     tableView.setHighlight(ODD);//highlight rows oddly or evenly
     //tableView.setHighlight(EVEN);
     tableView.setBottomShadowVisible(true);
     tableView.setFooterTextAlignment(CENTER);

     tableView.setFooterText(getString(R.string.footer_text));
     tableView.setTableFooterTextSize(5);
     tableView.setTableFooterTextColor("#009688");

     tableView.setTitleTextAlignment(CENTER);
     tableView.setContentTextAlignment(CENTER);
     tableView.setTablePadding(20);//increasing spacing will increase the table size
     //tableView.setBottomShadowColorTint("#ffffff");

     //tableView.setBackgroundEvenColor("#FFCCBC");
     //tableView.setBackgroundEvenColor("#303F9F");
     tableView.setBackgroundOddColor("#FFCCBC");
     //you can also declare your color values as global strings to make your work easy :)
     tableView.setHeaderBackgroundLinearGradientBOTTOM("#FF5722");//header background bottom color
     tableView.setHeaderBackgroundLinearGradientTOP("#009688");//header background top color
     tableView.setBorderSolidColor("#009688");
     tableView.setTitleFont(BOLD);
     tableView.setZoomEnabled(true);
     tableView.setShowZoomControls(true);
     //by default the initial scale is 0, you
     // may change this depending on initiale scale preferences
     //tableView.setInitialScale(100);//default initialScale is zero (0)
     tableView.setContentTextColor("#009688");
     tableView.build();
   

        Copyright 2018 Levit Nudi

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.
     

Author : Levit Nudi LinkedIn

LinkedIn

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].