189 8069 5689

android自学笔记

  今日学习了Android常用的控件

成都创新互联公司长期为1000多家客户提供的网站建设服务,团队从业经验10年,关注不同地域、不同群体,并针对不同对象提供差异化的产品和服务;打造开放共赢平台,与合作伙伴共同营造健康的互联网生态环境。为丰宁企业提供专业的做网站、成都网站制作丰宁网站改版等技术服务。拥有十年丰富建站经验和众多成功案例,为您定制开发。

  1. TextView

    

2.Button

3.EditText

    

4.ImageView

    

5.ProgressBar

        

6.AlertDialog

AlertDialog.Builder dialog = new AlertDialog.Builder(this);
			dialog.setTitle("This is Dialog");
			dialog.setMessage("Something important.");
			dialog.setCancelable(false);
			dialog.setPositiveButton("OK", new DialogInterface.OnClickListener() {
				
				@Override
				public void onClick(DialogInterface dialog, int which) {
					// TODO 自动生成的方法存根
					
				}
			});
			
			dialog.setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
				
				@Override
				public void onClick(DialogInterface arg0, int arg1) {
					// TODO 自动生成的方法存根
					
				}
			});
			dialog.show();
			

7.ProgressDialog

			ProgressDialog progressDialog = new ProgressDialog(this);
			progressDialog.setTitle("This is ProgressDialog");
			progressDialog.setMessage("Loading...");
			progressDialog.setCancelable(true);
			progressDialog.show();

常用属性可查。


网页标题:android自学笔记
分享URL:http://cdxtjz.cn/article/pjijph.html

其他资讯