How do I call a class in the print function?
<p>I am a beginner in developing and I know the question may sounds very basic but, let me cut to the chase: here is my class</p>

<pre><code>public class MainActivity extends Activity {

    private ListView lvPhone;

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

        lvPhone = (ListView)findViewById(R.id.listPhone);

        List&lt;PhoneBook&gt; listPhoneBook = new ArrayList&lt;PhoneBook&gt;();
        listPhoneBook.add(new PhoneBook(
                BitmapFactory.decodeResource(getResources(), R.drawable.ic_launcher), 
                "blah_blah", "384765345667", "something@someprovider.com"));
        listPhoneBook.add(new PhoneBook(
                BitmapFactory.decodeResource(getResources(), R.drawable.ic_launcher),
                "blah_blah", "34856834796", "something@someprovider.com"));
        listPhoneBook.add(new PhoneBook( 
                BitmapFactory.decodeResource(getResources(), R.drawable.ic_launcher),
                "blah_name", "868734633", "something@someprovider.com"));
        PhoneBookAdapter adapter = new PhoneBookAdapter(this, listPhoneBook);
        lvPhone.setAdapter(adapter);
    }
}
</code></pre>

<p>and here I'd like it to be "attached" so then when the button is clicked the phone book comes up.</p>

<pre><code>public void addListenerOnButton(){

    imageButton = (ImageButton) findViewById(R.id.pb_button);

    imageButton.setOnClickListener(new OnClickListener() {

        @Override
        public void onClick(View arg0) {

           Toast.makeText(MyAndroidAppActivity.this,//phone_book goes here
            "ImageButton is clicked!", Toast.LENGTH_SHORT).show();//no toaster instead

        }

    });
}
</code></pre>

<p>Would any of you please help? This is going to be really helpful for me. And please if you do answer, try to explain as you're explaining to a "Java_moron" :) (as through as possible please)</p>

<p>[Now I did try the chat room, no reputation point so that didn't happen and I tried to google as much as possible couldn't find anything helpful; maybe there was answer but my lack of knowledge failed me.]
Thank you, </p>

<p>[EDIT: Or instead of using the phone book class, how can I call contacts from phone's native contact list? Anything would be helpful really.]</p>
