super.onCreate(icicle);
setContentView(R.layout.scroll_to_rect_with_internal_scroll);
mTextBlob = (TextView) findViewById(R.id.blob);
mTextBlob.scrollBy(0, scrollYofBlob);
mScrollToBlob = (Button) findViewById(R.id.scrollToBlob);
mScrollToBlob.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
// the rect we want to make visible is offset to match
// the internal scroll
Rect rect = new Rect();
rect.set(0, 0, 0, mTextBlob.getHeight());
rect.offset(0, mTextBlob.getScrollY());
mTextBlob.requestRectangleOnScreen(rect);
}
});