Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

So I have this code that when it is pressed it is supposed to pass a resource id using an intent put extra then on the next activity the image view was set to full screen of the phone while its Java code contain

    il = (ImageView) findViewById(R.id.loadhere);


        Bundle bundle = getIntent().getExtras();
        if(bundle!=null) {
            int resid = bundle.getInt("resId");
            il.setImageResource(resid);

on my understanding this code should be able to receive my picture address ffrom drawable and be able to output it but all I get is a white screen

here is the code for the if then

    if (position == 0) 
{
Intent iintent = new Intent(getApplicationContext(), image_loaded.class);
                    iintent.putExtra("resID",R.drawable.compass_logo);
                    startActivity(iintent);
}
question from:https://stackoverflow.com/questions/65644121/encountered-white-screen-on-my-image-view-on-android-studio

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
105 views
Welcome To Ask or Share your Answers For Others

1 Answer

Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...