public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        final ImageView imageView = (ImageView) findViewById(R.id.imageview);
        final TextView textView = (TextView) findViewById(R.id.text);
        imageView.setOnClickListener(new View.OnClickListener() {

@Override
public void onClick(View v) {
LayoutParams layoutParams = imageView.getLayoutParams();
int height = layoutParams.height;
int width  = layoutParams.width;
int height2 = imageView.getHeight();
int width2 = imageView.getWidth();
textView.setText(height+","+width+"; "+height2+","+width2);
//Toast.makeText(this, height+","+width+"; "+height2+","+width2, 1).show();
}
});
    }