在安装android SDK时,会下载一个android sdk doc,有啥用呢?当然若进入下载后的该目录,点击可以查看api文档。在eclipse中,光标放在函数上,会出现注释,若其中有跳转链接,则点击,会另打开eclipse窗口显示页面,这个页面就来自android sdk doc。类似于联机帮助的功能。由于android官方开发网站被大陆封堵,这个下载到本地的android sdk doc是非常有用的。
另外,Android中显示一对话框的代码似乎非常简单:
private void msgbox(String Message){ AlertDialog alertDialog = new AlertDialog.Builder(this).create(); alertDialog.setTitle("This is Title"); alertDialog.setMessage(Message); alertDialog.setButton("OK", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { //here you can add functions } }); alertDialog.show(); }
原创文章,作者:苏葳,如需转载,请注明出处:https://www.swmemo.com/280.html
评论列表(1条)
To add to the si1;lness:RubenRl7is MLE triple-slash for the SAL, from the alternate universe where he went to an American college and got drafted and sent to low-A like a typical 21-year-old: .450/.563/.541.