Wednesday 15 February 2012

android - How to enable scrolling? -


I have the following layout when Texways change through the code, they expand and which was down now It is intended to be cut but I can not scroll, my finger is moved from the bottom, can not change the scene, even if "scrollbarAlwaysDrawVerticalTrack =" true "" is enabled. How to enable scrolling?

Edit: Work Solution:

  & lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; ScrollView xmlns: p1 = "http://schemas.android.com/apk/res/android" p1: minWidth = "25px" page 1: minHeight = "25px" p1: layout_method = "fill" "p1: layout_height =" Fill_parent "p1: id =" @ + id / scrollView1 "> LinearLayout p1: orientation =" vertical "p1: minWidth =" 25px "p1: minHeight =" 25px "p1: layout_width =" fill_parent "p1: Layout_height = "fill_parent" p1: id = "@ + id / linearLayout1" p1: background = "# 005c2e" page 1: scrollbar unrecognized vertical trak = "true" page 1: scrollbar = "vertical" page 1: scrollbar style = "inside Overlay "& gt; TextView p1: text =" text "p1: layout_width =" fill_parent "p1: layout_height =" wrap_content "p1: id =" @ + id / text View1 "p1: textSize =" 22sp "p1: textcolor =" # 00005C "/> TextView p1: text =" text "p1: layout_width =" fill_parent "p1: layout_height =" wrap_content "p1: textSize = "22sp" p1: textcolor = "# 5C0000" p1: id = "@ + id / textView2" />> TextView p1: textSize = "22sp" p1: text = "text" p1: layout_width = "fill_parent "P1: layout_height =" wrap_content "p1: textcolor =" # 00005C "p1: id =" @ + id / textView3 "/> & Lt; TextView p1: textSize = "22sp" p1: text = "text" p1: layout_width = "fill_parent" p1: textcolor = "# 5C0000" p1: layout_height = "wrap_content" p1: id = "@ + id / textView4" / & Gt; & Lt; TextView p1: textSize = "22sp" p1: text = "text" p1: layout_width = "fill_parent" p1: layout_height = "wrap_content" p1: textcolor = "# 00005C" p1: id = "@ + id / textView5" / & Gt; & Lt; TextView p1: textSize = "text" p1: textColor = "# 5C0000" page 1: layout_wind = "fill_parse" page 1: layout_height = "wrap-content" page 1: id = "@ + id / TextView6 "/> & Lt; / LinearLayout & gt; & Lt; / Scrollview & gt;    

Host your linerlight inside one.

The doctor says:

Layout container for a visible hierarchy which can be scrolled by the user, so that it is larger than physical performance. A ScrollView is a FrameLayout, which means that you should have a child in it to scroll the entire contents; This child may also be a layout manager with a complex hierarchy of objects. Often used child has a linear layout in a vertical orientation, which features a vertical array of upper-level items that the user can scroll.

No comments:

Post a Comment