All Projects → javonleee → Dragpointview

javonleee / Dragpointview

Licence: apache-2.0
A draggable PointView for Android.

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Dragpointview

Stockticker
A resizable widget that shows your financial portfolio on your android home screen
Stars: ✭ 285 (-28.93%)
Mutual labels:  widget
Portal Lite
Multi-platform Personalized Portal: Web, Browser Extension. All components are web apps--users can compose their own Portal freely, and developers can contribute to the Privoce Web App library to easily incorporate their web app to our Portal.
Stars: ✭ 335 (-16.46%)
Mutual labels:  widget
Flutter Settings Ui
Create native settings for Flutter app in a minutes.
Stars: ✭ 363 (-9.48%)
Mutual labels:  widget
Snwe
🚀 Extensible, customisable, menubar replacement for macOS/UNIX.
Stars: ✭ 295 (-26.43%)
Mutual labels:  widget
Huebee
🐝 1-click color picker
Stars: ✭ 332 (-17.21%)
Mutual labels:  widget
Stacklayoutmanager
customized layoutmanager,let item pile up like stackview/类似最美有物卡片堆叠效果
Stars: ✭ 343 (-14.46%)
Mutual labels:  widget
Tickview
一个精致带感的打钩小动画
Stars: ✭ 284 (-29.18%)
Mutual labels:  widget
Sofi
an OS agnostic UI module for Python
Stars: ✭ 378 (-5.74%)
Mutual labels:  widget
Eww
ElKowar's wacky widgets
Stars: ✭ 322 (-19.7%)
Mutual labels:  widget
Direct Select Flutter
DirectSelect is a selection widget with an ethereal, full-screen modal popup displaying the available choices when the widget is interact with. https://dribbble.com/shots/3876250-DirectSelect-Dropdown-ux
Stars: ✭ 360 (-10.22%)
Mutual labels:  widget
Supertextview
Hi,Developer,Welcome to use SuperTextView !
Stars: ✭ 3,170 (+690.52%)
Mutual labels:  widget
React Native Today Widget
iOS Today Widget in React Native
Stars: ✭ 320 (-20.2%)
Mutual labels:  widget
Pickr
🎨 Flat, simple, multi-themed, responsive and hackable Color-Picker library. No dependencies, no jQuery. Compatible with all CSS Frameworks e.g. Bootstrap, Materialize. Supports alpha channel, rgba, hsla, hsva and more!
Stars: ✭ 3,759 (+837.41%)
Mutual labels:  widget
Gradient Widgets
Flutter widgets wrapped with gradients
Stars: ✭ 290 (-27.68%)
Mutual labels:  widget
Neogfx
Cross-platform GPU-oriented C++ application/game framework
Stars: ✭ 362 (-9.73%)
Mutual labels:  widget
Nbaseuikit
个人平时使用的一些Qt编写的组件(有部分是整合的开源作品,部分是自己原创);
Stars: ✭ 286 (-28.68%)
Mutual labels:  widget
Flutter oktoast
a pure flutter toast library
Stars: ✭ 338 (-15.71%)
Mutual labels:  widget
Flutter badges
A flutter package for creating badges.
Stars: ✭ 391 (-2.49%)
Mutual labels:  widget
Functional widget
A code generator to write widgets as function without loosing the benefits of classes.
Stars: ✭ 374 (-6.73%)
Mutual labels:  widget
Flutter radial menu
A simple animated radial menu widget for Flutter.
Stars: ✭ 359 (-10.47%)
Mutual labels:  widget

DragPointView

Build Status License 作者

This is a handy developer to quickly implement drag and drop unread messages, widget, which you can use as you do with TextView, and customize detail effects with extra attributes and method.

Dependency

Add this in your project build.gradle file:

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

Then, add the library to your module build.gradle

dependencies {
    compile 'com.github.javonleee:DragPointView:latest.release'
}

Features

  • Inherited from TextView, easy to use.
  • Bessel curve is used to achieve tensile effect.
  • Provide you with rich attributes to customize various effects, such as maximum length of drag and drop, front and rear round radius, curve part color, radius scaling coefficient, etc.
  • Drag and drop actions are not restricted by the parent container, and the screen is free to drag and drop.
  • Allows settings to release animation, Animator or AnimationDrawable.
  • External development status monitoring, monitoring the status of the widget.
  • Convenient to clear the widget of the same sign.

Usage

There is a sample provided which shows how to use the library in a more advanced way, but for completeness, here is all that is required to get DragPointView working:

<com.javonlee.dragpointview.view.DragPointView
	android:id="@+id/drag_point_view"
	android:layout_width="wrap_content"
        android:layout_height="wrap_content"
	android:background="@drawable/shape_drag_point_red"
	android:gravity="center"
	android:text="66"
	android:textColor="#fff"
	android:textSize="16sp"
	app:centerMinRatio="0.5"
	app:clearSign="test"
	app:colorStretching="#f00"
	app:dragCircleRadius="100dp"
	app:maxDragLength="100dp"
	app:recoveryAnimBounce="0.25" />
DragPointView dragPointView = (DragPointView) findViewById(R.id.drag_point_view);
pointView.setRemoveAnim(animationDrawable);
pointView.setOnPointDragListener(listener);

That's it!

Attribute

You can customize the desired effect by setting the following properties in the layout file.

  • maxDragLength:Within this range, the Bessel rendering section will be shown, with the default value of Math.min (w, h)*3.
  • centerCircleRadius:The initial radius of the center circle.
  • dragCircleRadius:The initial radius of the drag circle.
  • centerMinRatio:When dragging, the center circle becomes smaller and smaller with distance, and the property controls its minimum coefficient range: 0.5f~1.0f.
  • recoveryAnimDuration:If the stretch length is not up to the threshold, the animation will be recovery, specifying the length of the animation.
  • recoveryAnimBounce:recovery animation bounce factor, range 0.0f~1.0f.
  • colorStretching:Bessel painted some colors, recommended consistent with the widget background.
  • sign:Mark the category of this control and use it with clearSign.
  • clearSign:The clearSign specified widgets are removed at the same time as they are removed.
  • canDrag:Controls whether or not to allow drag and drop.

Caution

When the DragPointView that sets the clearSign property is removed, be sure to update the relevant object information in the onRemoveStart or onRemoveEnd callback.For example, set all chat sessions to read.

@Override
public void onRemoveStart(AbsDragPointView view) {
	for (ConversationEntity entity : conversationEntities) {
		entity.setRead(true);
		entity.setMessageNum(0);
        }
}

Author

[email protected]

[email protected]

License

Copyright 2017 javonlee

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