Let say you have a list view activity in a separate project and is defined as library and it's main activity is "com.ls.list.MyActivity"
the proper way is to add the activity in the main project manifest file
<activity android:name="com.ls.list.MyActivity" />
then create intent as usual
Intent intent =new Intent(this, MyActivity.class);
startActivity(intent);
another way which does not need the manifest changes
the proper way is to add the activity in the main project manifest file
<activity android:name="com.ls.list.MyActivity" />
then create intent as usual
Intent intent =new Intent(this, MyActivity.class);
startActivity(intent);
another way which does not need the manifest changes
inside the main project's activity just write this simple code
Intent intent = new Intent(android.content.Intent.ACTION_VIEW);
intent.setComponent(new ComponentName("com.ls.list","com.ls.list.MyActivity"));
startActivity(intent);
Comments
Post a Comment