Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3221206
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T15:50:59+00:00 2026-05-17T15:50:59+00:00

I am very new to Android (and Java) originally a C# developer.. and am

  • 0

I am very new to Android (and Java) originally a C# developer.. and am struggling with the concepts and terminology.
I have been through almost all the tutorials and have decided to start on my first test app.

The first part of my app is going to involve using the gallery widget (based on the hello gallery tutorial) to display a load of images. (these images will eventually come from the phones camera, but I will cross that bridge later!)
My images are currently stored in the drawable folder in my project.

As a first step I want to just have the user click on an image and it pops up full screen, just so I know how to get reference to it, but I am struggling. Evetually I want the user to click an image, then a window/activity(?) will open asking them for a bit of text. This will then be store in sqllite against the image.

So far I have two classes:
Class1 & OpenImage. Class1 one contains the ImageAdapter class similar to the HelloGallery tutorial.. I am adding an onclick listener in the “getView” as follows:

public View getView(final int position, View convertView, ViewGroup parent) {
        ImageView i = new ImageView(mContext);

        i.setImageResource(mImageIds[position]);
        i.setLayoutParams(new Gallery.LayoutParams(150, 100));
        i.setScaleType(ImageView.ScaleType.FIT_XY);
        i.setBackgroundResource(mGalleryItemBackground);

        i.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {                    
                    Intent i = new Intent(Class1.this, OpenImage.class);
                    startActivity(i);
                    finish();                    
            }
          });     

        return i;
    }

The part I am struggling with is opening my OpenImage and getting it to show the image.

Firstly I’m not actually sure what I need to pass and how I do it, then how I get it on the OpenImage page/activity.

I am not even sure of the terminology of what I’m trying to do so I am also finding it hard to research. Am I opening a new activity when I am opening the fullscreen image? or should it be some sort of pop up?

This seems like the simplest thing to do but I’m falling at the first hurdle.
Can someone give me some guidance?

Thanks Bex

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T15:50:59+00:00Added an answer on May 17, 2026 at 3:50 pm

    You are almost done. Just pass the ID of the image to the intent:

                    Intent i = new Intent(Class1.this, OpenImage.class);
                    i.putExtra("the_image_id", mImageIds[position]);
                    startActivity(i);
                    finish();
    

    Then, on your OpenImage class, you get the ID and set it to a ImageView in fullscreen:

    public void onCreate(Bundle b){
        super.onCreate(b);
        // blah blah blah
        int theID = getIntent().getExtras().getInt("the_image_id");
        imageView.setImageResource(theID);
    }
    

    I’m assuming that you have already build a layout for the OpenImage activity, and that you have already initialized the imageView object and so on. The important thing here is that you learn how to pass data between activities.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im very new to android/java and have been following a few youtube tutorials and
I am very new to Android development and Java. Have read around but I'm
I'm following the android developer tutorials on tab layouts. (im very very new to
I am very new to the android platform thus java so i have a
I'm very new to Java and the Android SDK but I'm almost done with
Just a disclaimer, I'm very new to both android and Java. The end product
Before I delve into it, I'm very new to Android and I have just
I am very new to Java as well as Android programming. I was attempting
ok so im very new to android development and fairly new to java and
I am very new to java and trying to develop an Android app called

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.