• Stars
    star
    1,902
  • Rank 24,386 (Top 0.5 %)
  • Language
    Java
  • License
    MIT License
  • Created over 7 years ago
  • Updated 8 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Library that makes it possible to read, edit and write CSV files

AdaptiveTableLayout Awesome

Header image

Welcome the new CSV Library AdaptiveTableLayout for Android by Cleveroad

Pay your attention to our new library that makes it possible to read, edit and write CSV files. If you use Android-based device, you can easily use our library for implementation of all aforementioned actions. In addition, you will be able to change rows and columns, display the picture via link, and align the required data. It will surely help you cope with your tasks faster and make your output higher. AdaptiveTableLayout library is at your disposal.

Demo image

Take a look at the animation of AdaptiveTableLayout for Android on YouTube in HD quality. For using this library in a valuable way, you can find our CSV Editor app on the Google Play Store or on Appetize.

AwesomeAwesomeAwesome

The main goal of the library is to apply all its functions in the process of working with CSV files. Moreover, it will give you a competitive edge over others.

Awesome

Setup and usage

Installation

by gradle :

dependencies {
    implementation "com.cleveroad:adaptivetablelayout:1.2.1"
}

Features

Library consists of three parts:

  • AdaptiveTableLayout (View)
  • LinkedAdaptiveTableAdapter (Adapter)
  • ViewHolderImpl (ViewHolder)

Usage

AdaptiveTableLayout

  <com.cleveroad.adaptivetablelayout.AdaptiveTableLayout
        android:id="@+id/tableLayout"
        android:layout_width="match_parent"
        android:layout_height="match_parent"      
        app:cellMargin="1dp"
        app:fixedHeaders="true"
        app:solidRowHeaders="true"
        app:dragAndDropEnabled="true"/>
attribute name description
cellMargin margin between cards
fixedHeaders fixed headers mode. If enable, headers always will be displayed in the corners.
solidRowHeaders solid row headers mode. If enable, row header will change its position with dragging row.
dragAndDropEnabled drag and drop mode. If enable, column or row will change its position with dragging after long press on row or column header.
// Return fixed headers mode
boolean isHeaderFixed(); 

// Return solid row headers mode
boolean isSolidRowHeader()

// Return drag and drop mode
boolean isDragAndDropEnabled()

// Return true if layout direction is RightToLeft
boolean isRTL()

// Set fixed headers mode
void setHeaderFixed(boolean headerFixed)

// Set solid row headers mode
void setSolidRowHeader(boolean solidRowHeader)
1.2.0
// Set drag and drop mode
void setDragAndDrow(boolean enabled)

/**
 * Set adapter with IMMUTABLE data.
 * Create wrapper with links between layout rows, columns and data rows, columns.
 * On drag and drop event just change links but not change data in adapter.
 */
void setAdapter(@Nullable AdaptiveTableAdapter adapter)

/**
 * Set adapter with MUTABLE data.
 * You need to implement switch rows and columns methods.    
 * DO NOT USE WITH BIG DATA!!
 */
void setAdapter(@Nullable DataAdaptiveTableLayoutAdapter adapter)

// Notify any registered observers that the data set has changed.
void notifyDataSetChanged()

// Notify any registered observers that the item has changed.
void notifyItemChanged(int rowIndex, int columnIndex)

// Notify any registered observers that the row with rowIndex has changed.
void notifyRowChanged(int rowIndex)

// Notify any registered observers that the column with columnIndex has changed.
void notifyColumnChanged(int columnIndex)

Adapter

You could use adapter interfaces: AdaptiveTableAdapter and DataAdaptiveTableLayoutAdapter. But to simplify the usage, library contains base adapters: BaseDataAdaptiveTableLayoutAdapter and LinkedAdaptiveTableAdapter.

BaseDataAdaptiveTableLayoutAdapter - simple adapter which works with light data. WARNING! on each row/column switch, original data will be changed.

LinkedAdaptiveTableAdapter - adapter which works with heavy data. WARNING! This type of adapter doesn't change original data. It contains matrix with changed items with links on it. To get changed data you need use AdaptiveTableLayout.getLinkedAdapterRowsModifications() and AdaptiveTableLayout.getLinkedAdapterColumnsModifications(). Don't forget to check AdaptiveTableLayout.isSolidRowHeader() flag. If it's false, you need to ignore switching first elemet in each row.

For both adapters you need to know all rows/columns widths, heights and rows/columns count before set adapter to AdaptiveTableLayout.

Fragment/Activity usage

mTableLayout = (AdaptiveTableLayout) view.findViewById(R.id.tableLayout);
...
mTableAdapter = new SampleLinkedTableAdapter(getContext(), mCsvFileDataSource);
mTableAdapter.setOnItemClickListener(...);
mTableAdapter.setOnItemLongClickListener(...);
mTableLayout.setAdapter(mTableAdapter);
...
mTableLayout.setHeaderFixed(true);
mTableLayout.setSolidRowHeader(true);
mTableAdapter.notifyDataSetChanged();

XML usage

 <com.cleveroad.adaptivetablelayout.AdaptiveTableLayout
        android:id="@+id/tableLayout"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_below="@+id/toolbar"
        app:cellMargin="1dp"
        app:fixedHeaders="true"
        app:solidRowHeaders="true"
        app:dragAndDropEnabled="true"/>

Adapter usage

Adapter sample

Changelog

See changelog history.

Support

If you have any questions, issues or propositions, please create a new issue in this repository.

If you want to hire us, send an email to [email protected] or fill the form on contact page

Follow us:

Awesome Awesome Awesome Awesome Awesome

License


The MIT License (MIT)

Copyright (c) 2016 Cleveroad Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

More Repositories

1

SlidingTutorial-Android

Android Library for making animated tutorials inside your app
Java
2,486
star
2

FanLayoutManager

Using Fan Layout Manager you can implement the horizontal list, the items of which move like fan blades
Java
2,056
star
3

WaveInApp

Live Audio Equalizer with wave effect
Java
1,785
star
4

MusicBobber

Awesome Audio Widget for any Android Music App
Java
881
star
5

LoopBar

Tap Bar with infinite scrolling. Make the navigation menu right at fingerprints, in a tab bar.
Java
741
star
6

CRNetworkButton

Send Button for iOS
Swift
654
star
7

FireworkyPullToRefresh

Let's try to refresh your data with our library!
Java
641
star
8

BubbleAnimationLayout

You don’t want your apps look and feel boring, do you? Add some bubbles!
Java
577
star
9

CycleMenu

Custom LayoutManager for the inner RecyclerView
Java
575
star
10

CRPageViewController

While a standard page view allows you to navigate between pages by using simple gestures, our component goes further
Objective-C
394
star
11

PlayWidget

Break the monotony and make your music player unique!
Java
366
star
12

Bitutorial

Crumbling tutorial for Android Apps
Java
357
star
13

CRParticleEffect

A CocoaPod that simplifies creation of the particle effects.
Objective-C
348
star
14

Android-Marshmallow-Boot-Animation

Java
244
star
15

DroidArt

Android library that allows perform manipulations with text and easily combine it with images.
Kotlin
209
star
16

BlurTutorial

Library for creating blur effects under Android UI elements
Kotlin
155
star
17

flutter_sliding_tutorial

User onboarding library with smooth animation of objects and background colors
Dart
127
star
18

CRRulerControl

Customizable component, created by Cleveroad iOS developers, is aimed at turning a simple ruler into a handy and smart instrument
Objective-C
112
star
19

ARFaceDetection

AR-based library for Android which is capable of detecting faces and overlaying images above the user’s head
Kotlin
52
star
20

slidingtutorial-ios

iOS Library for making animated tutorials inside your app
Objective-C
49
star
21

Bootstrap

This set of libraries is designed to help developers accomplish various tasks easier and faster
Kotlin
40
star
22

cr_calendar

Highly customizable, feature-packed calendar widget for Flutter.
Dart
31
star
23

CRRollingLabel

Objective-C
30
star
24

CRCellCollectionView

With this component, pictures in your apps collection view will look like honeycomb instead of the boring standard variant
Objective-C
28
star
25

ColorDetection

ColorDetection is an app built with OpenCV and using computer vision at its core. It’s able to detect and change colors of objects using a camera of iOS devices.
Objective-C++
22
star
26

cr_logger

Dart
15
star
27

cr_file_saver

Kotlin
3
star
28

CRRefreshControl

2
star
29

cr_json_widget

Dart
2
star
30

CRPlotView

1
star
31

CRPinCodeControl

1
star
32

cr_mentions

Dart
1
star