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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T21:11:09+00:00 2026-05-14T21:11:09+00:00

I am using following code to open Android Contacts @Override public void onCreate(Bundle savedInstanceState)

  • 0

I am using following code to open Android Contacts

  @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        btnContacts = (Button) findViewById(R.id.btn_contacts);   
        txtContacts = (TextView) findViewById(R.id.txt_contacts);   

        btnContacts.setOnClickListener(new OnClickListener() {   
            public void onClick(View arg0) {   
                txtContacts.setText("");
                Intent intent = new Intent(Intent.ACTION_PICK, People.CONTENT_URI);   
                startActivityForResult(intent, PICK_CONTACT);   
            }   
        });   
}



 @Override  
    public void onActivityResult(int reqCode, int resultCode, Intent data) {   
        super.onActivityResult(reqCode, resultCode, data);   

        switch (reqCode) {   
            case (PICK_CONTACT):   
                if (resultCode == Activity.RESULT_OK) {   

//display picked contact data.
}

}

}

Now I want to put Button at the top of this Contact activity when opened or add my own Menu in this Activity

Can any one guide me? Is this possible or not? If yes then please tell how to achieve 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-05-14T21:11:10+00:00Added an answer on May 14, 2026 at 9:11 pm

    I don’t believe that is possible as each Activity in Android is working on its own and by starting the Intent, you are basically giving the new Activity the focus (and control).

    One way to do something like this would be to build a custom contact list activity that uses the public data providers to access the contacts and simply lists them then. Then you could add as many custom functions as you like or even add Intents for original actions (like viewing a contact’s details).

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

Sidebar

Related Questions

I am using following code to open a file dialog box, but nothing happens
I'm using following code to open the web.config of my current web application. Configuration
I am using XML file for creating Context Menu for my ListView. (Please see
My Android application has some files in the assets directory that I want to
I'm building an open source 2D game engine called YoghurtGum. Right now I'm working
I have four tabs (reports, review reports, map and settings). I have an sqlite
I want to have a dynamic table, with rows added over time as a
There is something I'm just not getting, and I'm looking for assistance in understanding
you would think this would be obvious, but searching through documentation, SAP forums, Googling,

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.