1、将CSDN的博客编辑功能中找到【源代码】图标
2、在你要贴代码的前面加上如下一句话:
<textarea readonly="readonly" name="code" class="java">
3、在代码结束的位置加上
</textarea>
4、测试如下:
protected void onDestroy() { super.onDestroy(); Intent service = new Intent(this, MainService.class); stopService(service); }
// 接收传递过来的参数
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
}