简体   繁体   English

多行EditText中的垂直滚动条

[英]Vertical scrollbar in multiline EditText

I have used table layout and given vertical scrollbar to it. 我使用了表格布局,并为其指定了垂直滚动条。 the table layout is having a table row of edittext whose input type is textMultiLine i want to add vertical scrollbar to it. 表布局中有一个表行的edittext,其输入类型为textMultiLine,我想向其中添加垂直滚动条。 For this i have used, 为此我用了

   edittext_level_desc.setScroller(new Scroller(getApplicationContext()));
   edittext_level_desc.setVerticalScrollBarEnabled(true);

But its not working. 但是它不起作用。

Check out these: 看看这些:

If any of them work, but it is quite difficult and annoying to apply scrollers in scrollers you may need a custom view, and also a custom scroll based on gestures or touch events. 如果它们中的任何一个都能工作,但是在滚动条中应用滚动条是非常困难和烦人的,您可能需要自定义视图,并且还需要基于手势或触摸事件的自定义滚动。

I suggest change your layout in order to avoid that. 我建议更改布局以避免这种情况。 It may be more helpful to have an EditText not scrolling expanding. 使EditText不滚动扩展可能会更有用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM