https://github.com/arcblock/did-motif-android
A android library for generating DID identicons.
https://github.com/arcblock/did-motif-android
Last synced: about 1 year ago
JSON representation
A android library for generating DID identicons.
- Host: GitHub
- URL: https://github.com/arcblock/did-motif-android
- Owner: ArcBlock
- License: apache-2.0
- Created: 2022-03-15T10:58:51.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-06-05T03:17:15.000Z (about 3 years ago)
- Last Synced: 2025-05-06T23:14:57.116Z (about 1 year ago)
- Language: Kotlin
- Size: 123 KB
- Stars: 3
- Watchers: 17
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# did-motif-android
A android library for generating DID identicons.
# Install

```groovy
implementation 'io.arcblock.did:did-motif:${version}'
```
# Usage
render DID Motif:
1. add view in xml
```xml
```
2. set motif address
```kotlin
binding.motifCircle.setAddress(address, DIDMotif.Shape.Circle, true)
```
there are 4 shape of DIDMotif: Circle, Square, Hexagon and Rectangle. and the last parameter indicates whether to render the animation.

render Blockies IdentIcon
1. add view in xml
```xml
```
3. set data in kotlin
```kotlin
binding.identicon.setAddress(ethAddress,BlockiesIdenticon.SHAPE_SQUARE, BlockiesData.DEFAULT_SIZE, 20f)
```
the Blockies Identicon only has 2 shape: Circle and Square.

# LICENSE
```
Copyright [2022] [ArcBlock.io]
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 at
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.
```