android - How can I know which childview is shown on the current Device screen in a scrollview? -
How do I know which childviewview is shown on the current device screen in ScrollView?
I want to create an unlimited ruler app, so when the scene is to flip I need to dynamically add and delete in view, but I can find out how and where to find that the current device screen Which childview view has been shown, so I can add or remove the correct view
< P> "itemprop =" text ">
I have also completed this problem you getlocalonscreen f For example:
1.
view.Glaloclokrune (xy); // xy [0] is the x axis, xy [1] ] Is y axis
2.
int nScreenWid = getwindowsmanager (). Getdefaultdisplay (). Getwidth (); Int nScreenHei = getwindowsmanager (). Getdefaultdisplay (). GetHeight ();
3.
if (xy [0]> nscreenWid) {// Your view beyond x axis Is} if (xi [1]> gtxxxhei) {// beyond y axis}
Comments
Post a Comment