Skip to content
This repository was archived by the owner on Jan 18, 2021. It is now read-only.
/ IdenticonView Public archive

Probably the most original way to visualize hashes. 👾

License

Notifications You must be signed in to change notification settings

st235/IdenticonView

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Download

Identicons

Probably the most original way to visualize hashes.

Screens

Installation

From maven

<dependency>
  <groupId>com.github.st235</groupId>
  <artifactId>identiconview</artifactId>
  <version>0.0.2</version>
  <type>pom</type>
</dependency>

From gradle

compile 'com.github.st235:identiconview:0.0.2'

Usage

To begin is the most difficult. I prepared the opportunity to configure the view straight from the markup.

    <st235.github.com.identiconview.IdenticonView
        android:id="@+id/identicon"
        android:layout_width="84dp"
        android:layout_height="84dp"
        app:text="hello world!"
        app:colorMode="manual"
        app:cellsColor="@color/colorPrimary"
        app:backgroundColor="@color/colorAccent"/>

The text field allows you to enter text based on which the hash will be considered.

colorMode - sets the mode for controlling the color of the shape. There are 2 modes: automatic and manual. In manual mode, you need to specify cellsColor and backgroundColor, whereas in the automatic mode, they will be calculated based on the hash.

Code API

All listed ways of controlling the view have a mapping in the api.

    private IdenticonView identiconView;

    ...
    @Override
    public void afterTextChanged(Editable editable) {
        identiconView.setText(editable.toString());
    }
    ...    

IdenticonView interface

public void setText(@Nullable String text)
public void setColors(@ColorInt int cellsColor, @ColorInt int backgroundColor)
public void resetColors() 
public void setFieldProvider(@Nullable IdenticonFieldProvider fieldProvider)

License

MIT License

Copyright (c) 2018 Alexander Dadukin

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

Probably the most original way to visualize hashes. 👾

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages