All Projects → SlavaKyrai → QuadTreeAndroid

SlavaKyrai / QuadTreeAndroid

Licence: Apache-2.0 license
Library that helps to implement the QuadTree in android, by using splitting images

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to QuadTreeAndroid

Glidetoast
GlideToast is a android library to implement flying Toast Animation
Stars: ✭ 162 (+440%)
Mutual labels:  android-development, android-ui
Modern Android Development
Modern Android Development tools & key points
Stars: ✭ 219 (+630%)
Mutual labels:  android-development, android-ui
Awesomedialog
A Beautiful Dialog Library for Kotlin Android
Stars: ✭ 163 (+443.33%)
Mutual labels:  android-development, android-ui
BusterNet
No description or website provided.
Stars: ✭ 49 (+63.33%)
Mutual labels:  image-manipulation, image-analysis
awesome-android-libraries
😎 A curated list of awesome Android libraries
Stars: ✭ 135 (+350%)
Mutual labels:  android-development, android-ui
Notzz App
📝 A Simple Note-Taking App built to demonstrate the use of Modern Android development tools - (Kotlin, Coroutines, State Flow, Hilt-Dependency Injection, Jetpack DataStore, Architecture Components, MVVM, Room, Material Design Components).
Stars: ✭ 158 (+426.67%)
Mutual labels:  android-development, android-ui
Bottomsheet
BottomSheet dialog library for Android
Stars: ✭ 219 (+630%)
Mutual labels:  android-development, android-ui
Fancyshowcaseview
An easy-to-use customisable show case view with circular reveal animation.
Stars: ✭ 1,662 (+5440%)
Mutual labels:  android-development, android-ui
Aboutlibraries
AboutLibraries automatically detects all dependencies of a project and collects their information including the license. Optionally visualising it via the provided ui components.
Stars: ✭ 2,777 (+9156.67%)
Mutual labels:  android-development, android-ui
Awesome Android Complete Reference
Awesome Android references for everything like best practices, performance optimization, etc.
Stars: ✭ 2,701 (+8903.33%)
Mutual labels:  android-development, android-ui
Materialdrawer
The flexible, easy to use, all in one drawer library for your Android project. Now brand new with material 2 design.
Stars: ✭ 11,498 (+38226.67%)
Mutual labels:  android-development, android-ui
VideoPreLoading
Demo for video PreLoading/ PreCaching using ExoPlayer 2.13.3 in Android.
Stars: ✭ 61 (+103.33%)
Mutual labels:  android-development, android-ui
Textwriter
Animate your texts like never before
Stars: ✭ 140 (+366.67%)
Mutual labels:  android-development, android-ui
Customrefreshview
一个支持网络错误重试,无数据页(可自定义),无网络界面(可自定义)的上拉加载更多,下拉刷新控件
Stars: ✭ 160 (+433.33%)
Mutual labels:  android-development, android-ui
Ibackdrop
A library to simply use Backdrop in your project (make it easy). Read more ->
Stars: ✭ 137 (+356.67%)
Mutual labels:  android-development, android-ui
Advancedrecycleview
♻ RecycleView with multiple view types, inner horizontal RecycleView and layout animation
Stars: ✭ 172 (+473.33%)
Mutual labels:  android-development, android-ui
Anychart Android
AnyChart Android Chart is an amazing data visualization library for easily creating interactive charts in Android apps. It runs on API 19+ (Android 4.4) and features dozens of built-in chart types.
Stars: ✭ 1,762 (+5773.33%)
Mutual labels:  android-development, android-ui
Easyadapter
Recyclerview adapter library- Create adapter in just 3 lines of code
Stars: ✭ 122 (+306.67%)
Mutual labels:  android-development, android-ui
Customfloatingactionbutton
This view is for replacement of standard Floating Action Button from Google Support Library. It is easy to use, customizable and you can also add text to button
Stars: ✭ 222 (+640%)
Mutual labels:  android-development, android-ui
QuestionnaireView
A simple view to be able to display question and various field (Radio, EditText, checkbox ) for answers
Stars: ✭ 34 (+13.33%)
Mutual labels:  android-development, android-ui

QuadTreeAndroid

alt tag alt tag

Library that helps to implement the QuadTree in android, by using splitting images

Download

Download via Gradle:

compile 'com.github.slavakyrai:quadtreeandroidimpl:0.1.1'

or Maven:

<dependency>
  <groupId>com.github.slavakyrai</groupId>
  <artifactId>quadtreeandroidimpl</artifactId>
  <version>0.1.1</version>
  <type>pom</type>
</dependency>

Usage

Create an instance of the QuadSplitter class. Pass the bitmap and OnQuadTreeSplitComplete callback in the constructor. The result will be returned as list of QuadTreeRect, in another thread in onSplitComplete().Use the method start() to start splitting image.

QuadTreeSplitter quadTreeSplitter = new QuadTreeSplitter(mutableBitmap, new OnQuadTreeSplitComplete() {
    @Override
    public void onSplitComplete(List<QuadTreeRect> quadTreeRects) {
        Log.d(TAG, "onSplitComplete: " + quadTreeRects.size());
      }
    });
quadTreeSplitter.start();

You can customize the work of the QuadSplitter class by using methods setMinQuadAreaSize() and setMinColorDistance().

quadTreeSplitter.setMinQuadAreaSize(50);
quadTreeSplitter.setMinColorDistance(5);

If you want to display the separeting image process, use the QuadTreeImageView class, which is extended by the ImageView. For than you must use the next methods: setImageBitmap() method of the QuadTreeImageView class, and setOnQuadDrawListener() method of the QuadTreeSplitter class. You can enable or disable the outlines of the rectangles borders, when you use the setDrawGreed() method.

QuadTreeImageView imageView = (QuadTreeImageView) findViewById(R.id.qtImgView);
imageView.setImageBitmap(mutableBitmap);
quadTreeSplitter.setOnQuadDrawListener(imageView);
imageView.setDrawGreed(true);

Look sample for more information

License

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].