Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/Morxander/Zaman
- Owner: Morxander
- License: gpl-3.0
- Created: 2016-12-12T14:36:51.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2016-12-14T17:14:28.000Z (almost 8 years ago)
- Last Synced: 2024-08-02T01:23:26.456Z (4 months ago)
- Topics: android, android-library, textview
- Language: Java
- Homepage:
- Size: 183 KB
- Stars: 60
- Watchers: 5
- Forks: 13
- Open Issues: 0
-
Metadata Files:
- Readme: README.MD
- License: LICENSE.md
Awesome Lists containing this project
- awesome-github-android-ui - Zaman - 将timestamp转化为时间String (TextView)
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