On Tue, Apr 12, 2011 at 2:18 AM, tamer hatoum <[email protected]>wrote:

>          public void onClick(View v) {
>              //alert.show();
>                //setContentView(R.layout.main2);
>                  String packageName =
> activity1.class.getPackage().getName();
>                  String packageAndClassName = activity1.class.getName();
>                  Intent intent = new Intent().setClassName(packageName,
>                  packageAndClassName);
>

Use this to create the Intent:

Intent = new Intent (activity.this, activity1.class);

(Btw, I strongly recommend staying with the naming conventions the platform
uses, where classes are in UpperCase; I think you'll find it a lot easier to
work on your code as the symbol names for classes, variables, and packages
don't get mixed together.)

-- 
Dianne Hackborn
Android framework engineer
[email protected]

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to