0

I have a layout which I want to slide down, but not entirely so you can still see a "scroll back up" text. So how I want to do this:

get the dimensions of the device. Put paddingTop = screenHeight - 7dp (for the text). Is this possible? I've tried with layoutparams too but then everything in the layout resized, including the "scroll back up" text.

What is the best way of doing this?

Vincent
  • 6,058
  • 15
  • 52
  • 94
  • Please post your layout (if you have a custom one), and relevant code, for better understanding. Thank you. – rekaszeru May 06 '11 at 03:00
  • I used a relativeLayout with an absolute height so I can easily shift it down by using absolute resizing values. My first try was with a linearlayout and layout weights in order to divide the layouts by percent but that didn't work at all for resizing. Too bad because it's a better use then using absolute heights for resizing – Vincent May 06 '11 at 07:58

1 Answers1

1

You could use Animation to accomplish this task.
A working example using animation with ViewFlipper can be found here.

Community
  • 1
  • 1
rekaszeru
  • 19,130
  • 7
  • 59
  • 73
  • I've tried this but since I'm using a mapview it isnt't possible to switch between two views with a mapview. (When I do I get a IllegalStateException: You are only allowed to have a single MapView in a MapActivity) – Vincent May 02 '11 at 14:25
  • It's not mandatory to use a `ViewFlipper`, you just use an animation to expand the text, and shrink the map. – rekaszeru May 02 '11 at 14:32