Android: Add outer glow to ImageButton [duplicate] - android

This question already has answers here:
Standard Android Button with a different color
(20 answers)
Closed 3 years ago.
I have been looking at these posts:
StateList
, Different states
What I really want is to add an outer-glow or some way to highlight the button onclick versus making different images for the associated states. Is this possible using colors or themes?
Thanks in advance :)
EDIT:
I found a good solution here, not quite the right answer but a good one none the less:
standard-android-button-with-a-different-color

I think you will be better off making an image for the state rather than trying to use software to render this automatically. The software solution will most likely be slower.

Related

Customize SeekBar with two thumb in Android [duplicate]

This question already has answers here:
Android Seekbar with two thumbs
(5 answers)
Closed 6 years ago.
I use a seekbar with two thumb in my application and would like to customize it.
I want to change the drawable(I want to use my own image). How to do it?
Basically you will need Range Bar. User can set Range between two numbers
Check this lib - https://github.com/oli107/material-range-bar
Above library is also supports Material design which provides rich UI
Hope it will help :)

How to add Ripple effect in RecyclerView? [duplicate]

This question already has answers here:
Adding Ripple Effect to RecyclerView item
(6 answers)
Closed 4 years ago.
I would like to add this nice effect to my RecyclerView items but I don't know where to start. Does anyone know of a good and simple tutorial on this topic?
Here's a good library: RippleView
Hope it helps.
Update
The library above is only for Buttons, as I was pointed out.
This library, RippleEffect, you can have the Ripple Effect to Views too.

Change Activity design programmatically [duplicate]

This question already has answers here:
Switching application-wide theme programmatically?
(2 answers)
Closed 8 years ago.
i'm encountering an issue. I'm developping an Android application which contains several Activities. And i want to let the user choose black or white design dynamically. My issue is that i don't know how i must change the design for my Activites when they're on the backstack. I though about 2 options :
Change programmatically the color of each view on each activity.
Do two versions of each activity. A black one and a white one and switch beetween them according to the user color choice.
Which one is the better way ? Is there another way to achieve this ?
Regards.
You want to use Themes, and you can apply theme before calling super.onCreate()

border for EditText? [duplicate]

This question already has answers here:
Is there an easy way to add a border to the top and bottom of an Android View?
(25 answers)
Closed 8 years ago.
I saw many related discussions but didn't find a suitable solution. What I need to do is to create a black border on the top and the bottom sides of an EditText widget. Is that possible?
This is possible with a NinePatchDrawable background.
http://developer.android.com/guide/topics/resources/drawable-resource.html#NinePatch
Yes, it is. Just create your custom EditText or set a suitable drawable as a background.

Android-widget : Change app widget background on the fly [duplicate]

This question already has answers here:
Closed 11 years ago.
I have been trying to change the background color of the app widget on the fly for sometime now, with no success.
I had found one solution (http://stackoverflow.com/questions/2726295/android-changing-linearlayout-in-a-widget) which we have been using.
Problem is we already have 8 layout files for 8 background colors, which is really difficult to maintain.
We would also like to add a color picker so that users can select their own choice of color.
Is there a better way to work around the RemoteViews limitations?
Thanks...
Won't
android.view.View.setBackgroundColor(int color)
do the trick? The color is a 32 bits made up of four 8-bit values for alpha, red, green and blue. See android.graphics.Color for details, it also has helper functions for selecting colors. Or is that not supported by RemoteViews? I suppose it would correspond to
views.setInt(R.id.my_ll,"setBackgroundColor",myColor);
as stated in your link, don't know if that works though.
HTH.

Categories

Resources