Back to project page Whats-My-Number.
The source code is released under:
GNU General Public License
If you think the Android project Whats-My-Number listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package mynumberwidget.app.action; /* w w w . ja v a 2 s . c om*/ import mynumberwidget.app.R; import android.app.Activity; import android.os.Bundle; import android.util.Log; import android.view.Gravity; import android.widget.Toast; public class DisplayPhoneNumber extends Activity { protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Log.i(getClass().getName(), "Displaying phone number"); // Show the phone number using a toast String phoneNumber = getIntent().getExtras().getString("PHONE_NUMBER"); String message = getText(R.string.display_phone_number).toString().replaceAll("\\{PHONE_NUMBER\\}", phoneNumber); Toast toast = Toast.makeText(getApplicationContext(), message, Toast.LENGTH_LONG); toast.setGravity(Gravity.CENTER, 0, 0); toast.show(); // Close activity immediately finish(); } }