I have a ListView with number of items. I'd like to place the item being clicked in the top of the screen. i am trying to use requestChildRectangleOnScreen of ListV开发者_运维百科iew that seems to do the job, however I cannot figure out how to properly specify the rectangle param. Any suggestion and/or code sample will be really helpful
Thanks a lot
You can get the rectangle of the view with getLeft() aso.
rectangle = new Rect(editText.getLeft(), editText.getTop(), editText.getRight(), editText.getBottom());
精彩评论