Java Code Examples for android.widget.TextView.getBottom()

The following are Jave code examples for showing how to use getBottom() of the android.widget.TextView class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: GitHub   File: CountryListView.java   View Source Code Vote up 5 votes
/** 设置列表右边的字母索引的滑动时的显示*/
public void onScroll(ViewGroup llScroll, float x, float y) {
	for (int i = 0, count = llScroll.getChildCount(); i < count; i++) {
		TextView v = (TextView)llScroll.getChildAt(i);
		if (x >= v.getLeft() && x <= v.getRight()
				&& y >= v.getTop() && y <= v.getBottom()) {
			lvContries.setSelection(i);
			tvScroll.setVisibility(VISIBLE);
			tvScroll.setText(v.getText());
			break;
		}
	}
}