简体   繁体   中英

How to scroll my layout to particular textview in android?

In my android app I want to scroll my layout upto one particular textview using Java in Android Studio. But here I don't know how to give my textview in .scrollTo() . Anybody can help me?

Try this:

View v = findViewById(R.id.someId);  
v.getParent().requestChildFocus(targetView,targetView);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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