开发者

Android - Issue with View when set above another View while scrolling

I've created a ScrollView with a RelativeLayout inside of it. I have a TextView aligned at the bottom of the RelativeLay开发者_Python百科out using layout_alignParentBottom="true" and a ImageView above the TextView using "layout_above". The layout works perfect when I am on a device where the display is large enough to not have to scroll up and down. When I test it on devices where you need to scroll to see the ImageView and TextView the ImageView doesn't line up above the TextView. Actually I haven't a clue where it goes because I can't see it anywhere. It might be behind the TextView. This also happens when I'm editing an EditText with the Soft Keyboard up, which causes the RelativeLayout to scroll.

Anyone knows what's going on here?


Try this: for relative layout you specify android:layout_alignParentTop="true" and then place the image view below it by android:layout_below="" and then the textview below the image view. I guess you might get it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜