0

how i will show other activity inside my activity any idea how i will do that? but i want to show other activity inside my main layout and take 50% of screen not show on full screen what will i do any idea???

String packageName = "com.mobile_banking"; // you must know package name
Intent i = new Intent(Intent.ACTION_MAIN);
PackageManager manager = getPackageManager();
i = manager.getLaunchIntentForPackage(packageName);
startActivity(i);
Chirag Ghori
  • 4,231
  • 2
  • 20
  • 35
user3472001
  • 855
  • 2
  • 7
  • 9

1 Answers1

1

With Activity, you can't show 2 Activities in single one.

What you are looking for is a FragmentActivity and Fragments with custom sizes in it.

First learn about Fragments and FragmentActivity

Once you learn the basics, you can follow these links:

Android Two Fragments in Same Activity

How to implement two fragments in single view?

Community
  • 1
  • 1
canova
  • 3,965
  • 2
  • 22
  • 39
  • not two activity i want to divide my main xml in 2 parts freist part show same application ui second part show another application(which is google navigation) – user3472001 Apr 22 '14 at 11:40
  • Intent i = new Intent(Intent.ACTION_VIEW, Uri.parse("google.navigation:q=" + destination)); startActivity(i); – user3472001 Apr 22 '14 at 11:50
  • im using this google.navigation app but when launch this app original app not show on screen how i iwll restrick other app to show only limited area of screen – user3472001 Apr 22 '14 at 11:50