2013-02-11 31 views
2

當用戶點擊一個按鈕時,它會啓動Android計算器。問題是,我想推出小版計算器就像這個imageAndroid三星計算器

當我用下面的代碼我能夠啓動計算器的大版的嘗試:

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

有一種啓動小版本的方法?

回答

2

,不會直接解決您的問題,但能避免一些其他問題的建議:

通過啓動活動:「com.sec.android.app.popupcalculator.Calculator」,你正在啓動某些計算器僅適用於Android設備。根據不同的設備,活動名稱是不一樣的。因此,我建議你找到你的計算器如下所述:

How to call android calculator on my app for all phones

當關於小屏幕上啓動計算器,你也許可以使用自定義對話框:http://developer.android.com/guide/topics/ui/dialogs.html#CustomDialog或在小窗口中打開你的活動:見Android - Activity that does not fill the parent screen

+0

嗨米洛斯謝謝你,但這個應用程序將只用於大量的三星銀河標籤 – Katherine99 2013-02-11 11:14:14

+0

嗨Katherine99,這是一個很好的做法,發展與思考可持續發展,即使你的時刻,你是「肯定」,這將用於三星Galaxy Tab設備。我的答案的第二部分是否適合您的問題?正如我所說的,您可以在不填滿整個屏幕的情況下開始一項活動。 – 2013-02-11 12:24:27

+0

謝謝你米洛斯,會試試這個 – Katherine99 2013-02-11 15:09:31