Search code examples
androiduser-interfaceandroid-viewandroid-custom-view

Custom view like lock/unlock screen of android


I would like to create effects like lock/unlock screen of android. I have attached the screenshot here as well. In lock screen we have 2 buttons but in my case I am having 3 buttons and the middle button must be draggable.

enter image description here

enter image description here

The middle button can be drag to left/right.

I know I have to create custom view for this to work but I don't have any idea about how to drag button left/right with nice effect(animations) which normally any android phone have.

I need guidance on this, so can anyone suggest me how to approach for this.

Basically i wish to move/slide button left and right and based on that want to take some action.


Solution

  • Maybe this project could help you GlowPadView. I've used it succesfully in one project. Hope it's what you're looking for.