Android: What does it mean when the code is crossed out in development?

Source: Internet
Author: User

 What's going on when I'm learning the status bar notification, when I get a dash off the code?

For example:

Package Com.example.notification;import Android.app.activity;import Android.app.alertdialog;import Android.app.notification;import Android.app.notificationmanager;import Android.app.pendingintent;import Android.content.context;import Android.content.dialoginterface;import Android.content.intent;import Android.net.uri;import Android.os.bundle;import Android.view.view;import Android.widget.button;public class Mainactivity extends Activity {@Overridepublic void onCreate (Bundle savedinstancestate) {super.oncreate ( Savedinstancestate); Setcontentview (R.layout.activity_main); Button button = (button) Findviewbyid (R.id.button); Button.setonclicklistener (new View.onclicklistener () {@ Suppresswarnings ("deprecation") @Overridepublic void OnClick (View v) {Notificationmanager Mnotificationmanager = ( Notificationmanager) Getsystemservice (context.notification_service); int icon = Android. R.drawable.sym_action_email;long when = System.currenttimemillis (); Notification Notification = new Notification (icon, NULL, when); notification.defaults = Notification.default_sound; Pendingintent contentintent = pendingintent.getactivity (mainactivity.this, 0, NULL, 0); Notification.setlatesteventinfo (mainactivity.this, "status bar Notification Test", "Morning 11:02", contentintent); Mnotificationmanager.notify (0, notification);}});}}

  

  Cause: This is used previously, is not currently in use or has changed, is not recommended, but does not affect the operation of the program
  
  
The question comes again, if it is changed, what is changed? I didn't find ...

Android: What does it mean when the code is crossed out in development?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.