@Override
          public void run() {
            TextView textView = (TextView) findViewById(R.id.license_activity_textview);
            int firstVisibleLine = textView.getLayout().getLineForOffset(firstVisibleChar);
            int offset = textView.getLayout().getLineTop(firstVisibleLine);
            scrollView.scrollTo(0, offset);
          }
Simple Activity that renders locally stored open source legal info in a text view.
java/com/google/android/apps/authenticator/license/LicenseActivity.java