1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
| import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import android.widget.ImageView;
public class MainActivity extends Activity {
public static final String APP_TAG="Mon_tag";
public ImageView image;
@Override
public void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
this.setContentView(R.layout.activity_main);
image = (ImageView) findViewById(R.id.main_image);
Log.i(APP_TAG, "onCreate(): fin ! / dimensions de l'imageView: "
+ image.getWidth() + " / " + image.getHeight());
}
@Override
public void onStart(){
Log.i(APP_TAG, "onStart(): début ! / dimensions de l'imageView: "
+ image.getWidth() + " / " + image.getHeight());
super.onStart();
Log.i(APP_TAG, "onStart(): fin ! / dimensions de l'imageView: "
+ image.getWidth() + " / " + image.getHeight());
}
@Override
public void onResume(){
Log.i(APP_TAG, "onResume(): début ! / dimensions de l'imageView: "
+ image.getWidth() + " / " + image.getHeight());
super.onResume();
Log.i(APP_TAG, "onResume(): fin ! / dimensions de l'imageView: "
+ image.getWidth() + " / " + image.getHeight());
}
} |
Partager