drawRect unit issues android
问题 I am trying to keep track of the bounding Rect for a child TextView inside of a class extending LinearLayout I am using View.getGlobalVisibleRect(Rect) in order to get the TextView's bounding box relative to its parent. It works great on some devices, but there is obviously some kind of unit issue going on on other phones. Simple example of what I'm seeing: //Extended LinearLayout's onDraw protected void onDraw(Canvas canvas){ super.onDraw(canvas); TextView tv = (TextView)findViewById(R.id