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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T05:00:14+00:00 2026-05-29T05:00:14+00:00

ImageView Iv2 = (ImageView)findViewById(R.id.imageView2); textId++; String imgId = full_ + textId; int Ivid =

  • 0
   ImageView Iv2 = (ImageView)findViewById(R.id.imageView2);
            textId++;
            String imgId = "full_" + textId;
            int Ivid = getResources().getIdentifier(imgId, "drawable", getPackageName());  
            Iv2.setImageResource(Ivid);
            Iv2.setOnTouchListener(new OnTouchListener() {

                @Override
                public boolean onTouch(View v, MotionEvent event) {
                    // TODO Auto-generated method stub
                    clapping =  MediaPlayer.create(textBasedquiz.this, R.raw.applause);
                    clapping.start();
                    Intent intent = getIntent();
                    overridePendingTransition(0, 0);
                    intent.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
                    finish();
                    overridePendingTransition(0, 0);
                    startActivity(intent);
                    return true;
                }
            });

*Basically im trying to build an quiz for kids and in this im selecting images randomly i want to restart same code after user has touch on right image so he/she can get another question , but activity must start after sound has been played Please Guys help me i really need your valued comments *

  • 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-29T05:00:15+00:00Added an answer on May 29, 2026 at 5:00 am

    You can setResult and go to activity from where you have called your this activity. Pass the value along and based on result of value received, call the saem activity passing new value that you just got from the same activity.

      static int RESULT_OK = 100;
      STATIC INT RESULT_CANCEL = 110;
    
      protected void onActivityResult(int requestCode, int resultCode, Intent data) {
          switch(resultCode) {
              case RESULT_OK:
                   // Get flags/values from intent Intent.FLAG_ACTIVITY_NO_ANIMATION
    
                   // Create new activity setting the intent to call
                   // and pass the values      
                   startActivity(intent);    
                   break;
          }
      }
    

    I think this will be more straight forward rather than calling same Activity from itself only.

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

Sidebar

Related Questions

ImageView connect = (ImageView) findViewById(R.id.fconnect); connect.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { facebook.authorize(SignIn.this,
I have an ImageView <ImageView android:id=@+id/auto android:layout_width=wrap_content android:layout_height=wrap_content android:layout_margin=10sp android:src=@drawable/auto /> How can I
Given ImageView image = R.findViewById(R.id.imageView); image.setImageBitmap(someBitmap); Is it possible to retrieve the bitmap?
How to load into ImageView if I have string which contains image position on
I want to add ImageView to FrameLayout with Gravity or margins. but FramLayout and
I have a ImageView and draw some things on that view. Now I want
I have added an imageView of size 300*300 into the interface in my ipad
I have used ImageView's before and understand the different scale types that can be
I want to flip an imageView (left/right), but I can not find a UIView
I am assigning to an ImageView contacts images using this code: mPhotoView = (ImageView)

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.