Android:What is difference between setFlags and addFlags for intent

前端 未结 3 533
暗喜
暗喜 2020-11-29 17:11

What is difference between setFlags and addFlags for intent. Could any one explain it please. Help Appreciated.

3条回答
  •  暖寄归人
    2020-11-29 17:39

    intent.setFlags(int num);
    

    This set flag controls how to handle the Intent.setflag mainly depends on type of component being executed by the Intent.It returns the same intent object for chaining multiple calls into a single statement.

    intent.addFlags(int num);
    

    This helps to add additional flags to a particular intent with the existing values.this also returns the same intent object for chaining multiple calls into a single statement.

提交回复
热议问题