Customize Android Pull-To-Refresh Icon - android

is it possible to replace the Icon of the Pull-To-Reload, the circle-arrow, with something else?
I'd like to have something like a trash-can instead.
Thanks,
Georg

If you are using the SwipeRefreshLayout, it seems there is no way to change the icon or animation for it yet. You can change the colors for the animation of spinning lines with the setColorSchemeColors method.
Some external pull to refresh libraries do let you do it, like Ultra Pull to Refresh by liaohuqiu. It seems to allow a lot of customisation of the effect.

Related

How to animate the color of the whole screen (all visible views/layouts) when changing to NightMode in Android?

I know there is ObjectAnimator / ValueAnimator for Property Animation in Android, and also one can set the system-wide night mode with UiModeManager.setNightMode(int):
https://developer.android.com/reference/android/app/UiModeManager#setNightMode(int)
How could we make a color animation when switching from DayMode to NightMode? (Currently I'm using the latest Huawei phone and find no animation there, not sure if other Android phone has this feature?)
try using MotionLayout with keyTrigger
check the documentation: https://developer.android.com/reference/android/support/constraint/motion/MotionLayout#keytrigger
Hi I think the best you can do is create a light and dark theme for your app in the style.xml file.
here is a github link of someone who achieved this with a simple code example. there is even a video of how it will look.
it seems like the animation is some android default fade_in/fade_out anim but personally i think it looks nice enough. let me know if this works for you

How to make a waterfall toolbar in Android?

I was exploring this app named ThemeDIY when I saw this beautiful waterfall toolbar. If you look well, you'll see that shadow doesn't get animated (like Google's), it appears as you pull. Just awesome.
Does anyone knows how to do that?
https://youtu.be/b3m1kkqUrx8
I made a library for it based on a scrollview's or recyclerview's scroll.
https://github.com/HugoCastelani/waterfall-toolbar

Animate Fab Button cross to mark

In my Android application I want to have a Floating Action Button to display a success state. I would like to have something like in the picture below:
But I have no idea how to animate the cross to the mark. Can someone please explain to me how I can do that? Is there maybe a library or something like that? Atm I'm using the default FAB from the design library.
This question got me interested in checking out AnimatedVectorDrawable, so I went ahead and made a small sample app that will achieve a similar animation, on github here.
Bad quality gif here.
Couple things to note: minimum SDK is set to 23 to make use of AnimationCallbacks for starting the 2nd animation, but you can achieve the same result using a Handler.postDelayed() with your animation durations to handle the drawable change and animation start. Since AnimatedDrawableCompat does not support path morphing, I needed two drawables to get the two different images.
Should be compatible with the Support Library AnimatedVectorDrawableCompat if you choose to use it as well.

Apply a gradient to a listview in android

I'm trying to use a listview in my application with a gradient from the bottom.
I do not want to use the gradient in the background, I like to use it in the listview.
To try to explain better, I attached a picture of what I want.
The background will show images that will change.
I searched a lot and made ​​several tests, but without success.
I appreciate any help.
Thanks and regards
Android has something built in for that. It is called fading edge. The two XML properties are android:fadingEdgeLength and android:requiresFadingEdge. If you were hoping to have the image gradient change, I don't think they are dynamic.

Android Custom Activity

http://tinypic.com/r/2v85soh/5
Hi!,
Do you see that bottom arrow pointing up? I want to allow users in Android to be able to drag it and use buttons from there!
Regards,
Michael
Android has a SlidingDrawer UI component that can be used for this sort of thing: http://developer.android.com/reference/android/widget/SlidingDrawer.html
Android has a SlidingDrawer widget, but it's deprecated. I would look online for open source libraries/projects that have implemented this kind of functionality. Perhaps something like this: AndroidSlideUpPanel

Categories

Resources