ATableView alternatives and similar packages
Based on the "Other Widget" category.
Alternatively, view ATableView alternatives based on common mentions on social networks and blogs.
-
AndroidSlidingUpPanel
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. -
BottomBar
(Deprecated) A custom view component that mimics the new Material Design Bottom Navigation pattern. -
ShortcutBadger
An Android library supports badge notification like iOS in Samsung, LG, Sony and HTC launchers. -
Litho (By Facebook)
A declarative framework for building efficient UIs on Android. -
SystemBarTint
[DEPRECATED] Apply background tinting to the Android system UI when using KitKat translucent modes -
DragSortListView
Android ListView with drag and drop reordering. -
TapTargetView
An implementation of tap targets from the Material Design guidelines for feature discovery. -
android-viewbadger
[DEPRECATED] A simple way to "badge" any given Android view at runtime without having to cater for it in layout -
AndroidViewHover
An elegant way to show your menu or messages. -
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. The library is based on the code of Mario Klingemann. -
android-iconify
Android integration of multiple icon providers such as FontAwesome, Entypo, Typicons,... -
DraggablePanel
Android library used to create an awesome Android UI based on a draggable element similar to the last YouTube graphic component. -
android-pdfview
[DEPRECATED] A fast PDF reader component for Android development -
android-pathview
Android view with both path from constructed path or from svg. -
AndroidTreeView
AndroidTreeView. TreeView implementation for android -
aFileChooser
[DEPRECATED] Android library that provides a file explorer to let users select files on external storage. -
Swipecards
A Tinder-like Android library to create the swipe cards effect. You can swipe left or right to like or dislike the content. -
android-viewflow
A horizontal view scroller library for Android -
TourGuide
TourGuide is an Android library that aims to provide an easy way to add pointers with animations over a desired Android View -
MaterialIntroScreen
Inspired by Heinrich Reimer Material Intro and developed with love from scratch -
Flow
Name UI states, navigate between them, remember where you've been. -
MultiSnapRecyclerView
Android library for multiple snapping of RecyclerView -
chromeview
Android WebView implementation that uses the latest Chromium code -
android-segmented-control
ios UISegmentedControl for android -
StickyGridHeaders
An Android Library that makes it easy to make grid views with sectioned data and headers that stick to the top. -
FloatingView
FloatingView can make the target view floating above the anchor view with cool animation -
HoloColorPicker
An Android Holo themed colorpicker designed by Marie Schweiz -
TileView
TileView is a subclass of android.view.ViewGroup that asynchronously displays, pans and zooms tile-based images. Plugins are available for features like markers, hotspots, and path drawing. -
Android-SwipeToDismiss
Android swipe-to-dismiss mini-library and sample code -
StandOut
StandOut lets you easily create floating windows in your Android app. -
Flashbar
⚡️A highly customizable, powerful and easy-to-use alerting library for Android. -
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 development. -
FancyCoverFlow
A cool Open Source CoverFlow view for Android with several fancy effects. -
Emoji
A library to add Emoji support to your Android / JVM Application -
SwipeStack
A simple, customizable and easy to use swipeable view stack for Android. -
RippleView
View that imitates Ripple Effect on click which was introduced in Android L (for Android 2.3+) -
Android-ActionItemBadge
This library offers a simple method to add a small badge icon to your ActionBar-MenuItem -
android-sliding-layer-lib
Highly customizable SlidingLayer as you have seen in Wunderlist -
SortableTableView
An Android library containing a simple TableView and an advanced SortableTableView providing a lot of customisation possibilities to fit all needs. -
ScratchView
ScratchView repo is UX Design involving scratch cards like views which are scratched to reveal the information they conceal. -
SwipeSelector
A nicer-looking, more intuitive and highly customizable alternative for radio buttons and dropdowns for Android.
Appwrite - The open-source backend cloud platform
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of ATableView or a related project?
README
THIS PROJECT IS NO LONGER MAINTAINED
Please refer to Android docs to customize lists depending on your needs.
ATableView
Summary
ATableView intends to imitate same object model proposed on UIKit for building tables, so it's not only limited on theming Android ListView. If you've some background on iOS development you may jump over some of the sections below, you'll find a lot of similarities with the native framework.
If not, you should be good with the examples included here and the demo project.
Updates
Documentation is a little outdated, please use it only for reference and stay close to the examples included on the demo project. Feel free to submit a bug if you find any issues using it.
How to use it
Creating tables
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
// ATableViewStyle.Plain & Grouped supported.
ATableView tableView = new ATableView(ATableViewStyle.Grouped, this);
// don't forget to set the datasource, otherwise you'll get an exception.
// it must be an object extending ATableViewDataSource, or ATableViewDataSourceExt (more on this later).
tableView.setDataSource(new SampleATableViewDataSource());
// delegates are optional, it must extend ATableViewDelegate.
tableView.setDelegate(new SampleATableViewDelegate());
FrameLayout container = (FrameLayout)findViewById(android.R.id.content);
container.addView(tableView);
}
Implementing a data source
It's your responsability to implement the required methods when extending ATableViewDataSource
. The following are supported:
public ATableViewCell cellForRowAtIndexPath(ATableView tableView, NSIndexPath indexPath); [Required]
public int numberOfRowsInSection(ATableView tableView, int section); [Required]
public int numberOfSectionsInTableView(ATableView tableView);
More on how this methods works can be found on the iOS UITableViewDataSource Protocol Reference.
Example
@Override
public ATableViewCell cellForRowAtIndexPath(ATableView tableView, NSIndexPath indexPath) {
final String cellIdentifier = "CellIdentifier";
// ATableViewCellStyle.Default, Subtitle, Value1 & Value2 supported.
ATableViewCellStyle style = ATableViewCellStyle.Default;
// reuse cells. if the table has different row types it will result on performance issues.
// Use ATableViewDataSourceExt on this cases.
// please notice we ask the datasource for a cell instead the table as we do on ios.
ATableViewCell cell = dequeueReusableCellWithIdentifier(cellIdentifier);
if (cell == null) {
cell = new ATableViewCell(style, cellIdentifier, MainActivity.this);
// ATableViewCellSelectionStyle.Blue, Gray & None supported. It defaults to Blue.
cell.setSelectionStyle(ATableViewCellSelectionStyle.Blue);
}
// set title.
cell.getTextLabel().setText("Buenos Aires");
// set detail text. careful, detail text is not present on every cell style.
// null references are not as neat as in obj-c.
TextView detailTextLabel = cell.getDetailTextLabel();
if (detailTextLabel != null) {
detailTextLabel.setText("Argentina");
}
return cell;
}
@Override
public int numberOfRowsInSection(ATableView tableView, int section) {
// return number of rows for this section.
if (section == 1) {
return 4;
}
return 2;
}
@Override
public int numberOfSectionsInTableView(ATableView tableView) {
// defaults to 1.
return 2;
}
Table styles (ATableViewStyle)
All UITableViewStyle styles are supported. These are:
- ATableViewStyle.Plain
- ATableViewStyle.Grouped
Creating cells
You can use cell styles included by default, or extend ATableViewCell
to create your own cells.
Cell styles (ATableViewCellStyle)
All UITableViewCellStyles styles are supported. These are:
- ATableViewCellStyle.Default
- ATableViewCellStyle.Subtitle
- ATableViewCellStyle.Value1
- ATableViewCellStyle.Value2
Cell selection styles (ATableViewCellSelectionStyle)
All UITableViewCellSelectionStyle styles are supported These are:
- ATableViewCellSelectionStyle.None
- ATableViewCellSelectionStyle.Blue (Default)
- ATableViewCellSelectionStyle.Gray
Adding images to cells (imageView)
imageView is shown automatically when an image is defined for it, otherwise is hidden by default on each cell.
Example
Drawable drawable = getResources().getDrawable(R.drawable.some_image);
cell.getImageView().setImageDrawable(drawable);
Creating custom cells
Creating custom cells is as simple as extending ATableViewCellStyle
and indicate the layout you want your cell to use.
Example
public class MyCustomCell extends ATableViewCell {
private UILabel mCustomLabel;
protected int getLayout(ATableViewCellStyle style) {
// here it goes your custom cell layout.
return R.layout.my_custom_cell;
}
public MyCustomCell(ATableViewCellStyle style, String reuseIdentifier, Context context) {
super(style, reuseIdentifier, context);
mCustomLabel = (UILabel)findViewById(R.id.custom_cell_label);
}
public UILabel getCustomLabel() {
return mCustomLabel;
}
}
Implementing a delegate
Adding a delegate to the table is optional. UITableViewDelegate defines many methods to describe how the table should look and behave. Only a few of them are currently supported on ATableViewDelegate
. These are:
public void didSelectRowAtIndexPath(ATableView tableView, NSIndexPath indexPath);
public int heightForRowAtIndexPath(ATableView tableView, NSIndexPath indexPath);
Example
@Override
public void didSelectRowAtIndexPath(ATableView tableView, NSIndexPath indexPath) {
// do something when the row is selected. rows are identified by its indexPath.
}
@Override
public int heightForRowAtIndexPath(ATableView tableView, NSIndexPath indexPath) {
// return height size on dip. defaults to 44 if not implemented.
return 54;
}
Table data source additional methods (ATableViewDataSourceExt)
On the case you need to use different cell styles on the same table, you should extend ATableViewDataSourceExt
to avoid performance issues when scrolling. This is necessary since Android ListView uses different pools for reusing cells, a pool for each cell type. ATableViewDataSourceExt
is used to specify how many rows and pools should be created to run smoothly.
You'll have additionally to implement the following methods:
public int numberOfRowStyles(); [Required]
public int styleForRowAtIndexPath(NSIndexPath indexPath); [Required]
Example
@Override
public int numberOfRowStyles() {
// number of different rows on the table.
return 4;
}
@Override
public int styleForRowAtIndexPath(NSIndexPath indexPath) {
// integer identifying the style for a cell at a given indexPath.
return myOwnImplementationGetStyle(indexPath);
}
Extra stuff
UILabel
UILabel uses internally Roboto font, which make labels look-alike in iOS and it's rendered great by Android. Roboto font is available from ICS and above, so it should be included on your project /assets
folder in order to make it work for any version.
Both Roboto-Regular.ttf and Roboto-Bold.ttf are included on the demo project. On the case you don't include these files, text will render using the default font available.
License
Copyright 2012 Diego Acosta - Contact me at [email protected] / @nakardo
Released under the Apache 2.0. license.
Roboto font by Google Android - Licensed under the Apache License.
Awesome Android PSD images by slaveoffear.
*Note that all licence references and agreements mentioned in the ATableView README section above
are relevant to that project's source code only.