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 9043361
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T10:43:03+00:00 2026-06-16T10:43:03+00:00

I have custom Listview . Inside it has one Button and ImageView . on

  • 0

I have custom Listview. Inside it has one Button and ImageView.

on Button click Camera will open.(Camera Intent fired).

I want that captured Image (you also call as Bitmap) onto ImageView which is also a ListItem.

that means when i capture image and press Done button of camera then my imageview have to set that image.

How can i do this?

  • 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-06-16T10:43:04+00:00Added an answer on June 16, 2026 at 10:43 am
     private static int FILE_SELECT_CODE_1 = 0;
        function intentCamera(){
             Intent i = new Intent(
                            android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
             startActivityForResult(i, FILE_SELECT_CODE_1);
    
    
      }
    
    private String getLastImagePath() {
            final String[] imageColumns = { MediaStore.Images.Media._ID,
                    MediaStore.Images.Media.DATA };
            final String imageOrderBy = MediaStore.Images.Media._ID + " DESC";
            Cursor imageCursor = managedQuery(
                    MediaStore.Images.Media.EXTERNAL_CONTENT_URI, imageColumns,
                    null, null, imageOrderBy);
            if (imageCursor.moveToFirst()) {
                //int id = imageCursor.getInt(imageCursor.getColumnIndex(MediaStore.Images.Media._ID));
                String fullPath = imageCursor.getString(imageCursor
                        .getColumnIndex(MediaStore.Images.Media.DATA));
                // Log.d(TAG, "getLastImageId::id " + id);
                // Log.d(TAG, "getLastImageId::path " + fullPath);
                imageCursor.close();
                return fullPath;
            } else {
                return "";
            }
        }
    
    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        if (requestCode == FILE_SELECT_CODE_1 && resultCode == RESULT_OK){
             String lastImagePath = getLastImagePath();
             File fileImage = new File(lastImagePath);
             Uri u = Uri.fromFile(fileImage);
             //now you can set the image example:
             ImageView img = new ImageView(this);
             img.setImageURI(u);
    
    
    
    
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a ListView which has custom elements inside of it. I want to
I have a custom listview row whose XML has one ImageView and three TextViews
I have a custom ListView with two button and I when I click either
I have a Custom ListView which has an ImageView and a TextView. and i
I have a ListView inside a Linearlayout. The listview has a custom cursoradapter. Everything
I have a custom dialog which extends Dialog and has a ListView inside its
I have a custom listview with three items. One of them is like Add
We have used Custom List View inside that one Text View and two Edit
I have referred to the following URL: Textview not scrolling inside custom listview but
I have a custom ListView and an ImageView that I'm trying to use as

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.