什么是机器人:isScrollContainer吗?机器人、isScrollContainer

2023-09-05 08:28:40 作者:那么爱劈腿怎么不去跳芭蕾

有谁知道安卓isScrollCOntainer =(布尔) $(查看).setScrollContainer(布尔)怎么办?

起初我还以为这将是答案设置内的滚动型视图不滚动使用滚动型,但它似乎并不如此。

At first I thought this would be the answer to set a View inside a ScrollView NOT to scroll with ScrollView, but it doesn't seem to be the case.

在Android开发者,它说,

On Android Developers it says,

设置此如果视图将作为滚动容器,这意味着它可以被调整大小,以缩小其总窗口,以便将有一个输入法的空间。

"Set this if the view will serve as a scrolling container, meaning that it can be resized to shrink its overall window so that there will be space for an input method. "

任何人都可以亲切地解释一下这个说明意思? 这是在这种情况下的滚动容器问题 什么样的输入法可用?

Can anyone kindly explain what this description means? What is a scrolling container in this case? What kind of input method is available?

推荐答案

滚动容器是其中容器的大小无关它的内容。 例如,你可以使高度100像素的滚动型的ListView ,但可以为适应尽可能多的内容,你想。同样,无论在视图中内容的大小,可以设置大小的查看到任何你想。

A scrolling container is one where the size of the container is independent of it's content. For instance you can make a ScrollView or ListView of height 100 pixels, but you can fit as much content in as you want. Similarly regardless of the size of the content in the view, you can set the size the of the View to whatever you'd like.

如果容器是可滚动的,那么安卓知道它可以缩小容器的大小而不会使容器无法访问的部分内容(因为用户可以直接向下滚动看东西不能在屏幕上)。它使用这个SoftKeyboard打开时为 - 。如果一个容器是可滚动的,它就会减少它尽可能以试图保持所有元素在屏幕上

If a container is scrollable, then Android knows it can shrink the size of the container without rendering parts of the content of the container inaccessible (since the user can just scroll down to see things not on screen). It uses this for when the SoftKeyboard is opened - if a container is scrollable it will shrink it as much as possible in an attempt to keep all of the elements on screen.

所以滚动型的ListView 的GridView 等的滚动容器的例子。

So ScrollView, ListView, GridView etc are all examples of scrolling containers.