Android slide animation problem - android

I have a 3 horizontal views - an image on the left which is a thin vertical handle-type bar and an image to its right followed by a textview. What I'm trying to achieve is a sliding animation, activated with a click on the handle, so that the center image slides in and out to the left (and so disappearing when fully left) with the textview following this animation smoothly. The effect will be the handle remains in place (hence I can't use the SlidingDrawer), the image comes and goes and the textview is always present but slides into the space where the image went. Its just collapsing the image really.
The problem is if I apply android.R.anim.slide_in_left/android.R.anim.slide_out_left to the image and the textview simultaneously I see they slide completely to the left edge of the screen, temporarily overwriting the handle. Is there a way to still animate but not go all the way to the screen edge?

Related

How to make horizontal RecyclerView's left end right borders appear and disappear on scroll in Android

I want to show left and right borders as user scrolls horizontally. If there are enough items at the start only left border is shown, as the user scrolls both left end right border disappears and when the user reaches end of the scroll I want to show right border. If there are not enough items I want to show both borders. This is illustrated at the image bellow:
What I currently have is this:
where I just put border drawable as RecyclerView background. This means that all the borders are always visible.

How to make an Imageview overlap the screen

I'm stacking ImageView's on eachother from bottom to top (by layout_above), but what I want to make the top one overflow/overlaps the screen. Normally this would resize/crop the imageview to make it fit in the screen, but I want to to be like in the picture shown below.
How would I be able to achieve this?

Move an element in relative layout to absolute edge of the screen

Is it possible to move a button or any other element in relative layout to the absolute edge of the sreen? If I drag a certain element to the edge of the layout, eclipse will automatically place it a few dp away from the edge. It'll basically just create a small space between a button and the end of the creen. Is it possible to bypass that?
I know buttons aren't meant to be that close to the edge of the screen anyway, but I need it for a certain thing.
The normal button has a little padding by default, because the buttons backgroundimage is a 9-patch image with padding left, right and on bottom. That's why you see the space between button and screen.
To solve this you can use a custom button. For example change the backgroundimage of button like this android:background="#drawable/image".

android book page scrolling with transparent background

I want to make a book page scrolling effect like the picture below.
This is a Standby screen in Acer Liquid.
It shows a transparent layout slidable with many views on it, and the left-bottom corner shows a book page rolling-up effect. The corner rolled is draggable and transparent.
If I slide the views, the corner rolled shows the views' moving with transparent.
That is what I don't know how to do.
I did the corner rolled with a screenshot bitmap. Take a screenshot and roll it up... That's what I did. And that means the corner rolled will be no change if I slide the views.. because it is a picture!
Does anybody know how to do that?
There is an open source library you can use. https://github.com/harism/android_page_curl

What kind of animation would one use

I am attempting a rather complicated animation in android. I want to be able to have a background image and have a sliding drawer come in from the left, BUT I don't want the drawer to come on over top of the the background image. Instead, I would like to squeeze the background so that you can see the drawer on the screen and the entire background image (though squeezed) at the same time.
I have looked into several animation but I can't come up with a combination that will do this.
Ideas?
Scale the background image with an anchor at the right side. Then translate the drawer from left (invisible area) to the right(visible area)

Categories

Resources