• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Kotlin : Add a shadow effect when click on button

 
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I use the following library to make my button circular "implementation 'com.mikhaellopez:circularimageview:4.0.1'".
I create a recycler view that contains a list of colors of product. The color item is as follows :


and the following code is the adapte code :

I want to make a shadow effect on circular button when is clicked, how can i do it ?
 
Ranch Foreman
Posts: 376
4
Android Tomcat Server Java
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why you still using this Circle button widget for Android library?

As the library's author metioned:

This library is deprecated and no new development is taking place. Consider using a FAB(Floating action button) instead.


So why don't you try with Floating action button?



 
Maha Sakka
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If i use the floating button and i change the button color
with this line of code:

So, how can i make a shadow effect when i click on?
 
Randy Tong
Ranch Foreman
Posts: 376
4
Android Tomcat Server Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You want the color change when clicked?
 
Maha Sakka
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to make an effet on floating button when is clicked.for example a shadow, or surrounded by cercle
like the following picture, the yellow colors
Capture-du-2019-07-29-10-54-40.png
[Thumbnail for Capture-du-2019-07-29-10-54-40.png]
 
Randy Tong
Ranch Foreman
Posts: 376
4
Android Tomcat Server Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How about adding app:rippleColor="yourColorCode" to FloatingActionButton?
 
Maha Sakka
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Randy Tong wrote:How about adding app:rippleColor="yourColorCode" to FloatingActionButton?


i try the ripplecolor as you said but nothing change
 
Maha Sakka
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to ask you if there's another library that make a circular button and when i click on,the button surrounded by a shadow
 
Maha Sakka
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Still have the same problem, could you please give me another idea
 
Randy Tong
Ranch Foreman
Posts: 376
4
Android Tomcat Server Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No idea for that.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!