Reputation: 667
I have an edit text whose height I am setting as wrap_content.
I have some layout below the edit text. when ever i write data in it and press enter to go to new line because of wrap content the size of edit text increases and its height increases downwards.Also the layout below is pushed down. I want the layout below not to be pushed down but the edit text should overlap the layout below. Can this be done?
Upvotes: 2
Views: 2253
Reputation: 2374
If you want overlapping layouts you need to use something like a RelativeLayout, if you were to only use a LinearLayout all the layouts will be placed in order.
If you use a Relative Layout you could define that all the TextViews start in the top left but the second one could have a margin so it is offset from the top. Then when your top textbox expands it would overlap the other (assuming the first TextView is drawn afterward , to do this list it in the XML after the other)
Upvotes: 1