Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/florent37/Carpaccio
Data Mapping & Smarter Views framework for android
https://github.com/florent37/Carpaccio
Last synced: 3 months ago
JSON representation
Data Mapping & Smarter Views framework for android
- Host: GitHub
- URL: https://github.com/florent37/Carpaccio
- Owner: florent37
- License: apache-2.0
- Archived: true
- Created: 2015-07-21T22:07:36.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2018-01-04T13:00:30.000Z (almost 7 years ago)
- Last Synced: 2024-06-28T12:32:27.236Z (4 months ago)
- Language: Java
- Homepage: https://github.com/florent37/Carpaccio/wiki
- Size: 29.8 MB
- Stars: 414
- Watchers: 22
- Forks: 70
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Carpaccio
[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-Carpaccio-brightgreen.svg?style=flat)](http://android-arsenal.com/details/1/2211)
[![Join the chat at https://gitter.im/florent37/Carpaccio](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/florent37/Carpaccio?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)Developed to facilitate integration on Android ( Designers can thanks me :D )
![logo](https://raw.githubusercontent.com/florent37/Carpaccio/master/screenshot/carpaccio_small.png)
**Data Mapping & Smarter Views framework for android**
With Carpaccio, your views became smarter, instead of calling functions on views, now your views can call functions !
You no longer need to extend a view to set a custom behaviorCarpaccio also come with a beautiful mapping engine !
# Usage
```xml
```
![url](https://raw.githubusercontent.com/florent37/Carpaccio/master/screenshot/sample_crop.png)
# Download
Add into your **build.gradle**
[![Download](https://api.bintray.com/packages/florent37/maven/Carpaccio/images/download.svg)](https://bintray.com/florent37/maven/Carpaccio/_latestVersion)
```groovy
compile ('com.github.florent37:carpaccio:(lastest version)@aar'){
transitive=true
}
```------------
# DataBinding
```xml
```
In your activity / fragment :
```java
Carpaccio carpaccio = (Carpaccio)findViewById("R.id.carpaccio");
carpaccio.mapObject("user",new User("florent", "www."));
```![set_text](https://raw.githubusercontent.com/florent37/Carpaccio/master/screenshot/set_text.png)
------------
## RecyclerView Mapping
You dreamed it, Carpaccio did it ! You can now bind a List with a RecyclerView !
**WORKS WITH ANDROID STUDIO PREVIEW !!!**, don't hesitate to refresh your preview
![url](https://raw.githubusercontent.com/florent37/Carpaccio/master/screenshot/refresh.png)![recycler](https://raw.githubusercontent.com/florent37/Carpaccio/master/screenshot/recycler_small.png)
![recycler_preview](https://raw.githubusercontent.com/florent37/Carpaccio/master/screenshot/recycler_preview_small.png)R.layout.activity_main_recyclerview_mapping
```xml
```
R.layout.cell_user
```xml
```
Finally, in your activiy/fragment you just have to indicate the List to map !
```java
setContentView(R.layout.activity_main_recyclerview_mapping);
Carpaccio carpaccio = (Carpaccio)findViewById("R.id.carpaccio");
carpaccio.mapList("user", this.users);
carpaccio.mapObject("header", this.headerObject);
```------------
# ViewControllers
Carpaccio provide some awesome ViewControllers, you can use them directly into your project.
[Read the Wiki to have a list of all provided viewControllers](https://github.com/florent37/Carpaccio/wiki)------------
TextViewController can set a custom font (from assets/fonts/) to a TextView and provide text binding
**WORKS WITH ANDROID STUDIO PREVIEW !!!**
![font](https://raw.githubusercontent.com/florent37/Carpaccio/master/screenshot/custom_ttf_small.png)
```xml
```
------------
## ImageViewController
```xml
```
![url](https://raw.githubusercontent.com/florent37/Carpaccio/master/screenshot/url_small.png)
**WORKS WITH ANDROID STUDIO PREVIEW !!!**, don't hesitate to refresh your preview
![url](https://raw.githubusercontent.com/florent37/Carpaccio/master/screenshot/refresh.png)Preview an url image
```xml
```
![url](https://raw.githubusercontent.com/florent37/Carpaccio/master/screenshot/preview_image_url_small.png)
And some awesome customisations
![circle](https://raw.githubusercontent.com/florent37/Carpaccio/master/screenshot/circle_small_2.png)
![blur](https://raw.githubusercontent.com/florent37/Carpaccio/master/screenshot/blur_small.png)
![greyscale](https://raw.githubusercontent.com/florent37/Carpaccio/master/screenshot/greyscale_small.png)```xml
```
[![Video](http://share.gifyoutube.com/mGz9OZ.gif)](https://youtu.be/A0eyvpNh5wM)
[![Video](http://share.gifyoutube.com/vpMYjp.gif)](https://youtu.be/4b84gswKGkA)```xml
```
# Community
Looking for contributors, feel free to fork !
Tell me if you're using my library in your application, I'll share it in this README
# Dependencies
* [Picasso][picasso] (from Square)
* [KenBurnsView][kenburnsview] (from flavioarfaria)
* [Android-Observablescrollview][android-observablescrollview] (from ksoichiro)# Credits
Author: Florent Champigny
www.florentchampigny.com/License
--------Copyright 2015 florent37, Inc.
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 athttp://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.[picasso]: https://github.com/square/picasso
[kenburnsview]: https://github.com/flavioarfaria/KenBurnsView
[android-observablescrollview]: https://github.com/ksoichiro/Android-ObservableScrollView