Thanks for your quick response.
I want to call the method of ListActivity from Activity class.
Code is as below:
---------------- MyActivity.java-----------------------
public class MyAcivity extends Activity
{
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.home);

        bStart = (Button)findViewById(R.id.browse);
        bStart.setOnClickListener(new clicker());

   class clicker extends Activity implements Button.OnClickListener
    {

        public void onClick(View v)
        {
          if(v == bStart)
          {
             Intent scanIntent = new Intent(MyActivity.this,
displayList.class);
             startActivity(scanIntent);
             // TODO:
          }
        }
    }
}
---------------------------------------------------------------------
--------------------displayList.java-------------------------------
public class displayList extends ListActivity
{
    @Override

    public void onCreate(Bundle icicle) {

        try {

                super.onCreate(icicle);

                updateList();

        } catch (NullPointerException e) {

                Log.v(getString(R.string.app_name), e.getMessage());

        }

    }


       public void updateList()
       {


          MyList = new ArrayAdapter<String>
(mmCnt,R.layout.item,ServerList);

          setListAdapter(MyList);

       }
}

How I can call "updateList()" of displayList from MyActivity class?
Can i call the method by Intent name?
Please help me..

Thanks,
Yogi

On Apr 19, 10:58 pm, Mark Murphy <mmur...@commonsware.com> wrote:
> Yogi wrote:
> > Can i call method of Listactivity from Activity class?
>
> That depends on what you mean. The amount of help you can get from
> forums like this depends on how much detail you can supply.
>
> > I have creates Intent object of myListActivity class and called
> > startIntent() from myActivity class.
>
> That will start up your ListActivity and pause/stop (but not destroy)
> the activity that called startActivity().
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> Warescription: Three Android Books, Plus Updates, $35/Year
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to