Android Glowing Border - android

i was creating a border using this example:
Is there an easy way to add a border to the top and bottom of an Android View?
I was wonder is there anyway to make the border glow?
I want it to kind of look like this:
https://g1.gstatic.com/android/market/com.feelingtouch.glowsnake/ss-480-4-4
thanks!

Sure, just make a 9-patch and use it as the background.
https://developer.android.com/studio/write/draw9patch.html

Related

How can I achieve curly or wavy borders for a view on Android?

There is the concept of rounded corners for views and drawables in Android, however, am working on an interface for a kids robot, and someone asked for curly borders - sort of like wavy (sine wave kind of thing). Now, how the heck can one achieve such a thing in either XML or Java - especially, without resorting to use of image overlays or backgrounds?
rounded corners aren't in fact rounded Views, its just a bit of transparency in corners. you can create some custom drawables/Bitmaps and set for your Views (as a background or use ImageView) or you can use custom programmatic drawing like HERE
Have tried to use images of that form and use them as background in a transparent container?

shadow to layout by 100% radius

I want add shadow to layouts like below image :
http://s9.picofile.com/file/8321463292/android.png
I do not want use android:elevation, because not working for android 4.3
Also, I use these libraries but not work correct for me :
https://github.com/loopeer/shadow
https://github.com/dmytrodanylyk/shadow-layout
https://github.com/Devlight/ShadowLayout
https://github.com/harjot-oberai/MaterialShadows
https://github.com/xuehuayous/Android-ShadowView
How i can set shadow to layouts like top image ? ( smooth, 100% radius and colorful)
Thank you
I have two suggestions to make shadow as per your requirement
you can use 9-patch image, may be this link will help you to create 9-patch with shadow
alternate
solution is to make gradient and set background to your button view.

how to make gradient stroke with transparent background android

I want to create an EditText which will have a little transparent white background (about 30%) and gradient as a stroke, but i don't know how can i make gradient as a stroke color.
I try to do something like this:
example
Could you help me in this issue ?
Check this topic, its similiar like yours, you just have to make a custom edittext.
Custom designing EditText
I've already tryed to do this way, but in i can't add gradient only pure color (ex. android:color="#000000").
I know how to make custom rounded EditText with transparent background, and i only want to know how could i use gradient instead of color in stroke ?

Create 9patch with fully round sides

I'm trying to create a drawable that looks like the KitKat toast bacground:
but I have no idea how to recreate the fully round sides, I always end up with a rectangle with rounded edges like this:
or the sides aren't really round:
Any idea on how to accomplish this?
Btw, just setting the color of the Toast doesn't work.
Android 9-patch shadow generator
will help you achieve the desired 9patch, allowing you to customize the roundness of the sides to your liking.
"Fill & Outline" will also give you the ability to apply some color.
Do it like this:
This is the toast_frame_holo.9.png from Android-19 (HDPI)

Creating non-traditional shape tooltip in android with border

Hello fellow Android designers,
I am struggling right now to create xml tooltip that would look like the one on this picture:
Unfortunately it seems like a hell of a work. Till now I was only able to create a simple rounded rectangle like that:
Is it actually possible to create such a shape I have presented on the first photo using xml styling or should I try to create it programatically (which will probably take huge amount of time and creating border would be really hard)? Or maybe the simplest solution is the best and I should use partially transparent png image with the shape of my choosing?
Any advice would be much appreciated.
You can draw it using stretchable 9-patch drawable.
You can specify there which parts are fixed (the little knob on the left and corners) and which are stretchable (all other parts)

Categories

Resources