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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T22:35:20+00:00 2026-06-03T22:35:20+00:00

the thing is i have made an application in which icons are there.. when

  • 0

the thing is i have made an application in which icons are there.. when we click on icon, it changes its image.. (i.e it glows). and open another activity.. but when back is pressed, its still in glowing state.. so i want to revert it to original statewhen back is pressed

package sditm.app;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageView;
import android.widget.Toast;

public class page1 extends Activity {
/** Called when the activity is first created. */
ImageView about;
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.page1);


    about=(ImageView)findViewById(R.id.imageView6);



    about.setClickable(true);




   about.setOnClickListener(new OnClickListener() {

        public void onClick(View v) {
            // TODO Auto-gener2ated method stub
            about.setImageResource(R.drawable.helps);
            Intent i=new Intent(getApplicationContext(),aboutActivity.class);
            startActivity(i);
            Toast.makeText(getApplicationContext(), "Enter all fields", Toast.LENGTH_SHORT).show();
            about.setImageResource(R.drawable.help);

        }
    });



}
}
  • 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-03T22:35:22+00:00Added an answer on June 3, 2026 at 10:35 pm

    use onResume() to restore image previous state:

     @Override  
        protected void onResume() {  
            about.setImageResource(R.drawable.imageView6);
            super.onResume();  
        }  
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have made an application, which keeps getting updated frequently. So every time a
I have made an application which draws a number of curves, using UIBezierPath. Now
Using jQuery UI's Droppable I have made a shelf type thing where the items
The thing I have a web app (asp.net) which needs to have a feed.
We have a web application which has been developed over the past 7 months.
I have kind of Listing application for iPhone application, which always calling a web
I have converted an iPhone application using the wizard like thing in XCode into
I have an nascent iPad application, which stores documents internally on the device in
I have a WinForms application in which I want to be able to provide
I have an application in which my first view has a label and a

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.