Skip to content

Snappy1

  • Home
  • Android
  • What
  • How
  • Is
  • Can
  • Does
  • Do
  • Why
  • Are
  • Who
  • Toggle search form

[FIXED] Custom Button Android that increases percentage on touch event

Posted on November 11, 2022 By

Solution 1 :

I used the library that has almost the same design that you need. If it’s not convenient for you can check implementation and create your own custom view. Basically you would need to track touch events in OnTouchListener and draw on Canvas with coordinates that you got from OnTouch.

Problem :

I need to achieve this UI in Android. When sliding right, it increases the percentage and the blue view increases in both ways, and when sliding left it decreases it, both view and percentage in TextView. Any ideas I can do that? Thanks

enter image description here

Comments

Comment posted by Ihor Bykov

Do you use Compose?

READ  [FIXED] java - Create application class dynamically in Android
Powered by Inline Related Posts
Android Tags:android, touch-event

Post navigation

Previous Post: [FIXED] android developer api – there is a ‘Late Initialization Error’ during flutter development
Next Post: [FIXED] android – How to set SSL pinning using retrofit for Firebase Realtime Database Url?

Related Posts

[FIXED] android – I have a Kotlin async task that performs a network call. I would like to pass the method that the task should execute at runtime Android
[FIXED] android – AOSP: Write a file on /data directory Android
[FIXED] kotlin – Format different parts of text that is in a container in android studio Android
[FIXED] A Menu hangs on Android Studio Android
[FIXED] android – Firebase dynamic link with flutter: Deep link URL doesnt open app Android
[FIXED] kotlin – MutableState ignores first value if set two values in a row Android

Archives

  • March 2023
  • February 2023
  • January 2023
  • December 2022
  • November 2022
  • October 2022
  • September 2022

Categories

  • ¿Cómo
  • ¿Cuál
  • ¿Cuándo
  • ¿Cuántas
  • ¿Cuánto
  • ¿Qué
  • Android
  • Are
  • At
  • C'est
  • Can
  • Comment
  • Did
  • Do
  • Does
  • Est-ce
  • Est-il
  • For
  • Has
  • Hat
  • How
  • In
  • Is
  • Ist
  • Kann
  • Où
  • Pourquoi
  • Quand
  • Quel
  • Quelle
  • Quelles
  • Quels
  • Qui
  • Should
  • Sind
  • Sollte
  • Uncategorized
  • Wann
  • Warum
  • Was
  • Welche
  • Welchen
  • Welcher
  • Welches
  • Were
  • What
  • What's
  • When
  • Where
  • Which
  • Who
  • Who's
  • Why
  • Wie
  • Will
  • Wird
  • Wo
  • Woher
  • you can create a selvedge edge: You can make the edges of garter stitch more smooth by slipping the first stitch of every row.2022-02-04
  • you really only need to know two patterns: garter stitch

Recent Posts

  • What is the rising action in Julius Caesar?
  • How do you secure a rope to itself?
  • Does waterproof laminate scratch easily?
  • What makes a building prewar?
  • What can you learn in a month without alcohol?

Recent Comments

No comments to show.

Copyright © 2023 Snappy1.

Powered by PressBook Grid Dark theme