1

When the user clicks on a button it launches the Android Calculator. The problem is that I want to launch small version of the calculator like in this image:

When I tried with the following code I am able to launch the big version of the calculator:

Intent i = new Intent(); 
                i.setClassName("com.sec.android.app.popupcalculator","com.sec.android.app.popupcalculator.Calculator"); 
             startActivity(i);

Is there a way of launching the small version?

midhunhk
  • 5,560
  • 7
  • 52
  • 83
Katherine99
  • 980
  • 4
  • 21
  • 40

1 Answers1

2

A suggestion which will not resolve directly your problem but can avoid some other problems:

By starting the activity: "com.sec.android.app.popupcalculator.Calculator", you are launching the calculator for certain Android devices only. Depending on different devices, teh activity name is not the same. So I suggest you to find your calculator as described here:

How to call android calculator on my app for all phones

When about launching your calculator on a small screen, you can maybe use a Custom Dialog: http://developer.android.com/guide/topics/ui/dialogs.html#CustomDialog or to launch your activity in a small window: see Android - Activity that does not fill the parent screen.

Community
  • 1
  • 1
Milos Cuculovic
  • 19,631
  • 51
  • 159
  • 265
  • Hi Milos thank you but this app will be only used for a great number of Samsung Galaxy Tabs – Katherine99 Feb 11 '13 at 11:14
  • Hi Katherine99, it is a good practice to developp with thinking on sustainability, even if for teh moment you are "sure" that this will be used for Samsung galaxy Tab devices. Is the 2nd part of my answer suitable for your question? As I said, you can start an activity without filling the entire screen. – Milos Cuculovic Feb 11 '13 at 12:24
  • You're welcome. If you need help, please don't hesitate to write back. – Milos Cuculovic Feb 11 '13 at 15:14