All Projects → NikitaGordia → Cosin

NikitaGordia / Cosin

Licence: mit
Android loading view library 📊🍭

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Cosin

Viewtooltip
A fluent tooltip for Android
Stars: ✭ 1,029 (+697.67%)
Mutual labels:  tutorial, view, indicator
Codeeditor
Code Editor Native Way
Stars: ✭ 155 (+20.16%)
Mutual labels:  gradle, jitpack, customview
Zloading
[Android] 这是一个自定义Loading View库。暂停更新
Stars: ✭ 552 (+327.91%)
Mutual labels:  view, customview, loading
Codeeditor
A cool code editor library on Android with syntax-highlighting and auto-completion.
Stars: ✭ 84 (-34.88%)
Mutual labels:  jitpack, customview
Images example
A simple example program made for the 42 students going into the graphic branch. Its purpose is to help them understanding the way images are working in the MLX (the graphcal lib we use).
Stars: ✭ 69 (-46.51%)
Mutual labels:  graphics, tutorial
Materialchipview
Material Chip view. Can be used as tags for categories, contacts or creating text clouds
Stars: ✭ 1,181 (+815.5%)
Mutual labels:  gradle, view
Fillingbutton
🔥Replace typical onLongClickListener with this library!
Stars: ✭ 31 (-75.97%)
Mutual labels:  view, customview
Ticketview
🎫 A custom view for showing tickets
Stars: ✭ 101 (-21.71%)
Mutual labels:  view, customview
Androidanimationexercise
Android 动画各种实现,包括帧动画、补间动画和属性动画的总结分享
Stars: ✭ 1,254 (+872.09%)
Mutual labels:  gradle, view
Drawablecolorchange
Android Library to dynamically change color of drawable.
Stars: ✭ 101 (-21.71%)
Mutual labels:  gradle, jitpack
Android Ratingreviews
Simple star rating system bars, a view similar to the ones seen on Google Playstore. ⭐🌟✨
Stars: ✭ 110 (-14.73%)
Mutual labels:  jitpack, view
React Native Hole View
✂️ React-Native component to cut a touch-through holes anywhere you want. Perfect solution for tutorial overlay
Stars: ✭ 61 (-52.71%)
Mutual labels:  tutorial, view
Fiftyshadesof
An elegant context-care loading placeholder for Android
Stars: ✭ 1,110 (+760.47%)
Mutual labels:  view, loading
Inifiniterecyclerview
Library for implementing endless loading list easily in Android applications
Stars: ✭ 79 (-38.76%)
Mutual labels:  view, loading
Tinyraycaster
486 lines of C++: old-school FPS in a weekend
Stars: ✭ 1,383 (+972.09%)
Mutual labels:  graphics, tutorial
Eclipseloading
🌞 日食加载动画
Stars: ✭ 114 (-11.63%)
Mutual labels:  view, loading
Avloadingindicatorview
DEPRECATED
Stars: ✭ 9,585 (+7330.23%)
Mutual labels:  loading, indicator
Vue Loaders
Vue + loaders.css
Stars: ✭ 127 (-1.55%)
Mutual labels:  loading, indicator
Windless
Windless makes it easy to implement invisible layout loading view.
Stars: ✭ 919 (+612.4%)
Mutual labels:  loading, indicator
Candyview
Implement any RecyclerView in just 1 Line. CandyView handles everything for you.
Stars: ✭ 15 (-88.37%)
Mutual labels:  gradle, view

COSIN

Loading android view lib

Gradle :

build.gradle (Project)

allprojects {
    repositories {
        ...
        maven { url 'https://jitpack.io' }
    }
}

build.gradle (Module)

implementation 'com.github.NikitaGordia:Cosin:1.1.0'

Quick start guide

Declaration

<com.nikitagordia.cosin.Cosin
        android:layout_width="170dp"
        android:layout_height="140dp" />

Properties

Property Description
speed Angle speed
isLoading If 'true' shows symbols on rectangle
setEnd Shows end animation (optionally you may pass onEnd(OnEnd))
rectWidth Width each of rectangle
period Determine period of cosinusoidal function
colorAdapter Define color changes by two parameters (position count, height percent) for each rectagle
offset Moving bottom offset
directionRight Determine movement side
textAdapter Define text changes by position count for each rectangle

There are 6 default ColorAdapter implementation in box :

  • DefaultColorAdapterGB (Green -> Blue)
  • ColorAdapterBG (Blue -> Green)
  • ColorAdapterBR (Blue -> Red)
  • ColorAdapterGR (Green -> Blue)
  • ColorAdapterRB (Red -> Blue)
  • ColorAdapterRG (Red -> Green)
  • ColorAdapterBG (Blue -> Green)

There are 2 default TextAdapter implementation in box :

  • DefaultBinaryTextAdapter (shows random [0, 1] symbols in each rectagle)
  • WordTextAdapter (shows specified cycle String)

ColorAdapter overriding example :

public class ColorAdapterBR implements Cosin.ColorAdapter {

    @Override
    public int getBackgroundColor() {
        return Color.TRANSPARENT;
    }

    @Override
    public int calcColor(int numOfRect, double percentOfHeight) {
        return Color.argb(150, (int)(255 * (1d - percentOfHeight)), 0, (int)(255 * percentOfHeight));
    }
}

TextAdapter overriding example :

public class WordTextAdapter implements Cosin.TextAdapter {

    private String word;

    public WordTextAdapter(String word) {
        this.word = word;
    }

    @Override
    public char getString(int numOfRect) {
        if (word.isEmpty()) return ' ';
        return word.charAt(numOfRect % word.length());
    }
}

A bit more gifs

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].