Scrollview like in Google+ feed detail - android

I want to do ScrollView where the bottom view with information data when scrolling overlaps photo above (photo remains in the same place), as well as in google+ application in feed detail. Sorry for bad English. Thanks
Image what I want:
When detail loaded
When srolling

You could use a an ImageView in the background for your top image and then put a ScrollView on top of it, either using RelativeLayout or FrameLayout. Then inside the ScrollView you could use a vertical LinearLayout and either use a Space as the first item in the list and make it the same size as the ImageView, or you could simply set the margin of the first item to have a top margin that is the same size as the ImageView.

Related

Scroll linear layout beyond the content

I think that this is a simple question but I can't figure it out, I have a Scroll View with some text inside and it works perfectly, it only enables scrolling when the content doesn't fit into the screen. The thing is that I want to scroll the content no matter if it fits or not until the last line of the text reach the top of the view leaving blank space below and obviously "hiding" the content above it. I don't know if I'm explaining myself very well, thanks in advance!
Add a dummy view with height equal to the height of device's screen beneath your textview in scrollView.

Expand an image in gridview when clicked in Android

I am implementing a GridView which contains images.
I want to expand an image to occupy the whole row when it's clicked as shown in the images below.
I also want to show a button when the image is expanded so the user can take an action similar to how the ESPN app does that.
How can I achieve this?
---->
Surround your layout with a relative layout. Create a layout and a button inside it outside grid layout/inside relative layout. Set it's initial visibility to gone and match it's height, width to row you want it to encompass. Then in the onclick of the image set the layouts view to visible and it's button. Perhaps not perfect but it has the added benefit of allowing scrolling of your gridview while showing the big image you want.

Combine scrollview and listview in Android like Wunderlist animation

I want to create a scroll animation with image on top of listview.
I want that when user scroll listview, image on top scaledown until 50dp of height. Than listview scroll without other anim. When user scroll up until the first item, image scaleup to fit the original size.
This behavior is present in wunderlist profile view and in this link is similar.pinterest demo
Can you help me to create this?
I'm using a scrollview with linearlayout, when user scroll in the scrollview image scaledown, but i'm not able to enable listview scroll.
you should check Android-OberservableScrollView to achieve what you need:
https://github.com/ksoichiro/Android-ObservableScrollView

How Cover the whole screen by textview irrespective of other elements present in the XML file?

How can i cover the screen by TextView i written Below but it does not work
I want the Facebook buttons to show sometimes i dont want them to show i just want to show a
Thank You for your help
Either re-order your RelativeLayout to place the element you want on top at the bottom of the layout list, or use a FrameLayout. A FrameLayout will allow you to overlay elements.
See here:
Android overlay a view ontop of everything?
The problem here is very simple. You are adding your TextView first and then you are adding ImageView. Both these are set to match parents width and height but since you are adding ImageView later its z-index is greater than that of TextView.
To confirm these just remove the ImageView and then check.
Hope this helps :)

How to create an UI similar to the attached image?

I am trying to create an UI just like the attached image!
How do we create these types of UI? Is it a ListView? And how do we get the arrow button on the right hand side? How should I start with such kind of layouts?
You can achieve that with a LinearLayout too.
Have that LinearLayouts orientation be vertical. Create such list items (it isn't related to ListView) using RelativeLayout.
Have the icon be an ImageView aligned to its parent left and vertically centered, the text would be a normal TextView which is to the right of that icon and vertically centered as well and finally another ImageView but this time aligned to its parents right and vertically centered.
These is the receipt.
It's a ListView, you should learn how to write your own ArrayAdapter and returns in the getView method the View you want to be each row of the ListView.
AnDroidDraw lets you create the layout online and then later download it on your device. http://www.droiddraw.org/
Create appropriate custom ArrayAdapter for this layout.

Categories

Resources