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

  • Home
  • SEARCH
  • 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 7604755
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T23:59:33+00:00 2026-05-30T23:59:33+00:00

I am looking for this for 2 days. I can’t figure out how can

  • 0

I am looking for this for 2 days. I can’t figure out how can i show an image( in my res folder) How can i show an image after clicking a button?

  • 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-30T23:59:34+00:00Added an answer on May 30, 2026 at 11:59 pm

    Activity One:

    public class TestbuttontestActivity extends Activity {
        /** Called when the activity is first created. */
        @Override
        public void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.main);
            Button btn=(Button)findViewById(R.id.widget45);
            btn.setOnClickListener(new OnClickListener() {
    
                public void onClick(View v) { 
                 Intent inf=new Intent(TestbuttontestActivity.this,Activityfullscreen.class);
    
                 startActivity(inf);
                }
              });
        }
    }
    

    Activity Two:

    public class Activityfullscreen extends Activity {
        @Override
        public void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.calc);
           ImageView img=(ImageView)findViewById(R.id.widget45);
           img.setBackgroundResource(R.drawable.digitallovesaktid);
        }
    }
    

    AndroidManifest.xml:

    <application
            android:icon="@drawable/ic_launcher"
            android:label="@string/app_name" >
            <activity
                android:label="@string/app_name"
                android:name=".TestbuttontestActivity" >
                <intent-filter >
                    <action android:name="android.intent.action.MAIN" />
    
                    <category android:name="android.intent.category.LAUNCHER" />
                </intent-filter>
            </activity>
            <activity 
                android:theme="@android:style/Theme.Light.NoTitleBar.Fullscreen"
                android:name="Activityfullscreen"></activity>
        </application>
    

    Activity One Layout:

    <?xml version="1.0" encoding="utf-8"?>
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:orientation="vertical" >
        <Button
        android:id="@+id/widget45"
            android:layout_width="fill_parent"
            android:layout_height="120dp"
             />
             <TextView
        android:id="@+id/widget45"
            android:layout_width="fill_parent"
            android:layout_height="120dp"
             />
    </LinearLayout>
    

    Activity Two Layout:

    <?xml version="1.0" encoding="utf-8"?>
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical" >
      <ImageView
        android:id="@+id/widget45"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
             />
    
    
    </LinearLayout>
    

    AND second and best way use popupwindow and two layout one for main activity and another for popupwindow:

    private void showpopup()
        {
           LayoutInflater inflater = this.getLayoutInflater();
           View mView= inflater.inflate(R.layout.popup,(ViewGroup)findViewById(R.id.lnparentpopup));
           PopupWindow mPopupWindow = new PopupWindow(mView,LayoutParams.FILL_PARENT,LayoutParams.FILL_PARENT, false);
           mPopupWindow.setAnimationStyle(android.R.style.Animation_Dialog);
    
           TextView TV=(TextView)this.findViewById(R.id.txtmain);          
          // TableLayout L1 = (TableLayout)findViewById(R.id.tblntarialview);
    
           mPopupWindow.showAtLocation(TV, Gravity.CENTER, 45, 0);
    
         }
    

    this code will show you an image in full screen when user press button and what you want apart from this please share your code….

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

Sidebar

Related Questions

I just can't figure it out, why i get this error. It is not
OK, I've been looking into this a few days and am not particularly sure
I've been looking into this issue for 2 days, but no luck. I have
Looking at this jQuery example, how can I modify the code so that it
I've been looking into this for the past few days, and so far I
**Updated: (See below)**I have been looking around for couple of days and can't find
I've been looking for ways to do this for days now ... and its
I was looking at the 14 days of jquery http://jquery14.com/day-01/jquery-14 and I saw this
I've been researching this for the last 2 days after I implemented my own
I have been trying to work out the bug on this but can't seem

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.