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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T11:54:45+00:00 2026-06-04T11:54:45+00:00

i created a button checkdata in android when i was clicking on it, it

  • 0

i created a button checkdata in android when i was clicking on it, it doesnot do anything…

switch(v.getId()){

        case R.id.Button01add:
            showDialog(DIALOG_ID);
            break;

        case R.id.Button01check:
             break;
        }

when i click on add it shows some dialog which pops up like that i want to display images which are saved in database when i click on check button
this is my checkdata.java

public class CheckData extends ListActivity  {     
    TextView selection;
    DataManipulator dm;
    private DataManipulator DbHelper;
private Object testFruit;
    protected void onCreate(Bundle savedInstanceState){
    super.onCreate(savedInstanceState);
    setContentView(R.layout.check);
    dm = new DataManipulator(this);

    LinearLayout layout = new LinearLayout(this);
    ImageView image = new ImageView(this);
    DbHelper = new DataManipulator(this);

    DbHelper.open();
    DbHelper.createFruitEntry((Fruit) testFruit);
    DbHelper.close();

    testFruit = null;

    DbHelper.open();
    testFruit = DbHelper.getFirstFruitFromDB();
    DbHelper.close();

    image.setImageBitmap(((Fruit) testFruit).getBitmap());

    ViewGroup.LayoutParams params = new ViewGroup.LayoutParams(
                                    LinearLayout.LayoutParams.WRAP_CONTENT,
                                    LinearLayout.LayoutParams.WRAP_CONTENT);

    setContentView(layout);
    addContentView(image, params);
}

}

what should be written in between in this case statement so that i can see images which are saved in the database

  • 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-04T11:54:46+00:00Added an answer on June 4, 2026 at 11:54 am
    public class TestActivity extends Activity implements OnClickListener {
        /** Called when the activity is first created. */
        @Override
        public void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.main);
    
      Button aboutButton =(Button)findViewById(R.id.about_content);
            aboutButton.setOnClickListener(this);
        }
    public void onClick(View v) {
            switch (v.getId()) {
            case R.id.about_content:
            break;
            // More buttons go here (if any) ...
            }
        }
    }
    

    try like above code.

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

Sidebar

Related Questions

I have created a button in my Android application & I tried to set
I have a button created using android widgets. I want to set the font
I have created a button in my screen's XML like this: <Button android:text=Lets Get
When I created a button view, Android always create some extra space between this
I am new to iphone development.I have created a button in UIView controller.On clicking
I have created button 2 below: <input id=Button1 type=button value=Stop onclick=alert('hello world');/> <input id=Button2
I created a button and added an action for it, but as soon as
I created a button and I need it to restart the form I have
I created a button with a 9patch image as a background. In the 9patch
I have created a button CSS class that uses background images with different positions

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.