public class MainActivity extends Activity {
private ImageView iv;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
iv = (ImageView)findViewById(R.id.iv);
System.out.println(iv.getWidth()+"------"+iv.getHeight());
}
Android從零單排之獲取ImageView的寬高為0?
Android從零單排之獲取ImageView的寬高為0?
獲取imageView 的寬高
----------------------同志你好,我是CSDN問答機器人小N,奉組織之命為你提供參考答案,編程尚未成功,同志仍需努力!