Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/Morxander/Zaman

The library provides a custom TextView and Helper for Android to convert timestamp to time String
https://github.com/Morxander/Zaman

android android-library textview

Last synced: about 1 month ago
JSON representation

The library provides a custom TextView and Helper for Android to convert timestamp to time String

Awesome Lists containing this project

README

        

# Zaman
[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-Zaman-brightgreen.svg?style=flat)](http://android-arsenal.com/details/1/4832) [![GPL](https://img.shields.io/aur/license/yaourt.svg)]() [![Maintenance](https://img.shields.io/maintenance/yes/2016.svg)]()

The library provides a custom `TextView` and `Helper` for Android to convert `timestamp` to time `String`.
The library also provides a `singleton` thread that automatically updates the `TextView` .
`Zaman` also provides a helper that returns the relative time according to the `timestamp` sent.
`Zaman` means `Time` in `Arabic` and we named it that since our library works with time and the developers first language is `Arabic`.

### Screenshot
![Zaman](https://raw.githubusercontent.com/Morxander/Zaman/master/screenshot.png)

### Download

Download via Gradle:

```gradle
compile 'morxander.zaman:Zaman:1.0.0'
```

### Usage
#### Using ZamanTextView
```xml

```

In activity class:
```java
ZamanTextView ztv = (ZamanTextView) findViewById(R.id.ztv);
ztv.setTimeStamp(1481554570);
```

#### Using ZamanUtil ( The Helper )

```java
ZamanUtil zamanUtil = new ZamanUtil(1481554570);
zamanUtil.getTime(); // Returns the time string
```

### How It Works

![How](https://raw.githubusercontent.com/Morxander/Zaman/master/howitworks.png)

### License
GNU GENERAL PUBLIC LICENSE 3