Tuesday, January 28, 2014

tabhost nested scrollview can not scroll up and down? ? ? ? ?


            
tabhost the content, the use of a scrollview, when the height does not exceed the height of the phone screen to scroll up and down, how to solve? ? ?
Of course, if you have an alternative, you can. . .
The code:
android: id = "@ + id / mediatabhost"
android: layout_width = "fill_parent"
android: layout_height = "fill_parent">

android: layout_width = "fill_parent"
android: layout_height = "fill_parent"
android: orientation = "vertical">

android: id = "@ android: id / tabs"
android: layout_width = "fill_parent"
android: layout_height = "50.0dip"
android: layout_gravity = "top"
android: background = "@ drawable / suma_tab_bkg"
android: paddingBottom = "0.0dip"
android: paddingLeft = "0.0dip"
android: paddingRight = "0.0dip"
android: paddingTop = "1.0dip" />

android: id = "@ android: id / tabcontent"
android: layout_width = "fill_parent"
android: layout_height = "fill_parent"
android: orientation = "vertical">

android: id = "@ + id/suma_media_tab1"
android: layout_width = "fill_parent"
android: layout_height = "fill_parent"
android: scrollbarStyle = "insideOverlay"
android: scrollbars = "vertical">


android: layout_width = "fill_parent"
android: layout_height = "wrap_content"
layout = "@ layout / layout_media_detail_desc" />



layout_media_detail_desc.xml (This file nothing special)

android: id = "@ id / media_detail_desc"
android: layout_width = "fill_parent"
android: layout_height = "fill_parent"
android: orientation = "vertical">

android: id = "@ id / suma_media_detail_tv_director"
android: layout_width = "wrap_content"
android: layout_height = "20dip"
android: layout_weight = "1"
android: textColor = "# 000000" />

android: id = "@ id / suma_media_detail_tv_actor"
android: layout_width = "wrap_content"
android: layout_height = "20dip"
android: layout_weight = "1"
android: textColor = "# 000000" />

android: id = "@ id / suma_media_detail_tv_description"
android: layout_width = "fill_parent"
android: layout_height = "fill_parent"
android: layout_marginTop = "20dp"
android: textColor = "# 000000" />


Reply:
ScrollView should be placed in the outermost layer of your tabhost.
 android: id = "@ + id/suma_media_tab1" 
android: layout_width = "fill_parent"
android: layout_height = "fill_parent"
android: scrollbarStyle = "insideOverlay"
android: scrollbars = "vertical">
. . . . . . .


Reply:
cited a floor ncepu307 reply:
ScrollView should be placed in the outermost layer of your tabhost.
 android: id = "@ + id/suma_media_tab1" 
android: layout_width = "fill_parent"
android: layout_height = "fill_parent"
android: scrollbarStyle = "insideOverlay"
android: scrollbars = "vertical">
. . . . . . .


1st Floor, hello, you use the wrong of this, ah, are directly connected tabhost scroll up and down the title.
Reply:
How nobody can return it? ? Csdn so fewer people are now?
Reply:
tabhost The id should be set up so it .......?
android: id = "@ android: id / tabhost"
Reply:
references, 4th Floor u012476249 reply: id should be set
tabhost like it .......?
android: id = "@ android: id / tabhost"


No, it is. . . If the Activity inherited from TabActivity so id Andrews built-id, just like you write. If you do not inherit,
So id can easily write
Reply:
references, 5th Floor leehu1987 reply:
Quote: references to the 4th floor u012476249 reply:

tabhost The id should be set up so it .......?
android: id = "@ android: id / tabhost"


No, it is. . . If the Activity inherited from TabActivity so id Andrews built-id, just like you write. If you do not inherit,
So id can easily write


Well ... this is the way, but I have inherited TabActivity Activity wooden Yeah ....
And why did you want to pack a LinearLayout outside TabWidget it?
Reply:
reference to the 6th floor u012476249 reply:
Well ... this is the way, but I have inherited TabActivity Activity wooden Yeah ....
And why did you want to pack a LinearLayout outside TabWidget it?


TabWidget heading can be understood as a tabhost, the latter tabcontent content. After adding LinearLayout, can make the title, content installed vertically order. Specific reason is that I found the following version 3.0 style confusing, so before adding this LinearLayout. Then tabcontent after FrameLayout assembled tab.

Also you do not inherit TabActivity, then use getTabHost id you get to?
Reply:
reference to the 7th floor leehu1987 reply:
Quote: references to the 6th floor u012476249 reply:

Well ... this is the way, but I have inherited TabActivity Activity wooden Yeah ....
And why did you want to pack a LinearLayout outside TabWidget it?


TabWidget heading can be understood as a tabhost, the latter tabcontent content. After adding LinearLayout, can make the title, content installed vertically order. Specific reason is that I found the following version 3.0 style confusing, so before adding this LinearLayout. Then tabcontent after FrameLayout assembled tab.

Also you do not inherit TabActivity, then use getTabHost id you get to?


Possible eh

No comments:

Post a Comment