kai0masanari / Forcelayout
Licence: apache-2.0
Forcelayout is library for android. You can drawing graph with spring-like attractive forces. Inspired by force layout in D3.js.
Stars: ✭ 108
Projects that are alternatives of or similar to Forcelayout
Sureness
A simple and efficient open-source security framework that focus on protection of restful api.
Stars: ✭ 254 (+135.19%)
Mutual labels: spring, library
Pipelinr
PipelinR is a lightweight command processing pipeline ❍ ⇢ ❍ ⇢ ❍ for your Java awesome app.
Stars: ✭ 134 (+24.07%)
Mutual labels: spring, library
Stepper Touch
Stepper Touch for Android based on MaterialUp submission
Stars: ✭ 621 (+475%)
Mutual labels: spring, library
Panningview
An Android library for panning an image horizontal and vertically
Stars: ✭ 107 (-0.93%)
Mutual labels: library
Yeelightapi
C# API (.Net) to control Xiaomi Yeelight devices
Stars: ✭ 106 (-1.85%)
Mutual labels: library
Rando Php
RandoPhp is a open source library that implements random generators (Integer, Char, Byte, Sequences, Boolean) and take random sample from arrays
Stars: ✭ 107 (-0.93%)
Mutual labels: library
Kivymd
Set of widgets for Kivy inspired by Google's Material Design.
Stars: ✭ 107 (-0.93%)
Mutual labels: library
Freecodecamp.cn
FCC China open source codebase and curriculum. Learn to code and help nonprofits.
Stars: ✭ 36,576 (+33766.67%)
Mutual labels: d3
Paperlib
Plugin Library for interfacing with Paper Specific API's with graceful fallback that maintains Spigot Compatibility, such as Async Chunk Loading.
Stars: ✭ 108 (+0%)
Mutual labels: library
Webfluxtemplate
Spring Webflux template application with working Spring Security, Web-sockets, Rest, Web MVC, and Authentication with JWT.
Stars: ✭ 107 (-0.93%)
Mutual labels: spring
Jvfloatingdrawer
An easy to use floating drawer view controller.
Stars: ✭ 1,424 (+1218.52%)
Mutual labels: library
Mall
mall项目是一套电商系统,包括前台商城系统及后台管理系统,基于SpringBoot+MyBatis实现,采用Docker容器化部署。 前台商城系统包含首页门户、商品推荐、商品搜索、商品展示、购物车、订单流程、会员中心、客户服务、帮助中心等模块。 后台管理系统包含商品管理、订单管理、会员管理、促销管理、运营管理、内容管理、统计报表、财务管理、权限管理、设置等模块。
Stars: ✭ 54,797 (+50637.96%)
Mutual labels: spring
Libqtshadowsocks
A lightweight and ultra-fast shadowsocks library written in C++14 with Qt framework
Stars: ✭ 1,455 (+1247.22%)
Mutual labels: library
Sod
An Embedded Computer Vision & Machine Learning Library (CPU Optimized & IoT Capable)
Stars: ✭ 1,460 (+1251.85%)
Mutual labels: library
Force layout
Forcelayout is an Android library for visualizing data. You can drawing graph with spring-like attractive forces.
Demo
Usage
Usage in kotlin
1. Gradle
repositories {
jcenter()
}
dependencies {
compile 'jp.kai:forcelayout:1.1.0'
}
2. Definitions of nodes
val nodes = ArrayList <Pair<String,Int>>()
nodes.add(Pair("nodeName1", R.drawable.example1))
nodes.add(Pair("nodeName2", R.drawable.example2))
nodes.add(Pair("nodeName3", R.drawable.example3))
or
val nodes: Nodes = Nodes()
nodes.add(NodePair("nodeName1", R.drawable.example1))
nodes.add(NodePair("nodeName2", R.drawable.example2))
nodes.add(NodePair("nodeName3", R.drawable.example3))
If you don't use image. You can just write node name.
val nodes: Array<String> = arrayOf( "nodeName1", "nodeName2", "nodeName3")
3. Definitions of links
val links = Arrays.asList("nodeName1-nodeName2", "nodeName1-nodeName3")
or
val links: Links = Links()
links.add(LinkPair("nodeName1", "nodeName2"))
links.add(LinkPair("nodeName1", "nodeName3"))
4. Set node and link style (optional)
val forcelayout = Forcelayout(applicationContext)
forcelayout.node()
.size(100)
.style(Color.argb(100,200,30,50))
forcelayout.link()
.style(Color.argb(60,50,30,200), 5.0f)
5. Set nodes and links
You can set node's size and link-strength, and so on. Please use anko if you write in kotlin.
val forcelayout = Forcelayout(applicationContext)
forcelayout.with(this)
.size(200)
.distance(200)
.gravity(0.04)
.friction(0.04)
.nodes(nodes)
.links(links)
.start()
Params | Description |
---|---|
size |
To set image width. |
distance |
To set distance between each nodes. |
gravity |
To set gravitation. |
friction |
To set gravitation between pair of nodes. |
nodes |
To set nodes that contain node name and image. |
links |
To set pairs that contain node names. |
Thanks
Inspired by force layout
in D3.js.
License
Copyright 2016 kai0masanari
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
http://www.apache.org/licenses/LICENSE-2.0
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.
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].