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: 3 months 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 (about 8 years ago)
- Last Synced: 2024-08-02T01:23:26.456Z (7 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
[](http://android-arsenal.com/details/1/4832) []() []()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
### 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

### License
GNU GENERAL PUBLIC LICENSE 3