How to make view slide onto screen? - android

I want to make a horizontal LinearLayout that has a portion off screen slide onto the screen when it is dragged, using horizontalLayout.setX(), but when the layout is dragged the views in that layout that were off the screen don't seem to appear on screen, and they seem to be cut off by the screen edge. What would be the best way to achieve this? Can a view not be created off the screen?

I don't know whether I understood properly but..why don't you just use a horizontal scroll view?

Related

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?

LIBGDX/Android - How can scale a view?

I am trying to get a bar at the bottom of the screen where ads can be placed and have found no way of doing so. What I am trying to do is pretty much this (below)
You can see that there is a gap for adverts to fit in at the bottom, meaning that the view of the game doesn't actually take up the entire screen.
How can I achieve this? I am looking for maybe a way to scale the view to change its height but I don't know how
You put both in a relative layout. Make the bar aligned to the parent bottom, then make the game view align to the top of the bar.

Android layout that crops rather than resize its children

I am looking for an android layout (if there exists) that can do the following.
2 images that occupies the entire width of the screen, stacked on top of each other. A slider say 2 or three pixels wide that allows a user to slide across the width of the screen revealing or hiding portions of the images.
Note that the layout like slidingPane does not work in this scenario as it resizes the contents in each pane rather than cropping them which is what I want.
To better describe the question here are some images.
Not really a layout, but achieves what I was after.
Added images to textureviews(1,2), added one of the textureviews(2) to a linearlayout. Added the texureView1 and linearlayout to a framelayout such that the linearlayout is on top. To achieve the above said effect the linearlayout and the textureView(2) that it holds is moved in opposite directions.

Make a view fall of the screen

I have a RelativeLayout where I add and position Views (Buttons, TextViews) by changing their top and left margins. I can position them half outside the layout on the top and left side, but when I try to move them half outside the layout on the bottom or right side, they change shape to stay inside the layout.
How can I make the views fall outside the screen instead of resize them self?
Giving them a width does not solve it.
You can't do it using RelativeLayout, which always need to fit the screen size.
You can use ScrollView wich extends a FrameLayout and can be larger then the screen.
Regards.

overlay imageview without pushing layouts down

a picture is worth a thousand words, so my question should basically be self-explanatory with the attached image: How to get rightmost screen instead of the center screen?
turns out i cannot attach images directly yet, so i have to link to it right now:
How to get rightmost screen instead of the center screen?
just to add, i realise that it is not really possible to have the framelayout NOT expand as shown in screen 2b, but my question remains as to how to achieve such an overlay without pushing the Other layouts down i.e. the bottom part of the imageview would be on top of the top right part of the other layouts
perhaps you could have the image you are dynamically adding be outside the frame layout. ie have a relative layout contain both framelayouts and the imageview – jkhouw1 1 hour ago

Categories

Resources