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

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.

Awesome Lists containing this project

README

          

# did-motif-android
A android library for generating DID identicons.

# Install
![Maven Central](https://img.shields.io/maven-central/v/io.arcblock.did/did-motif)
```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.
image

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.

image

# 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.
```