`
hemowolf
  • 浏览: 151755 次
  • 性别: Icon_minigender_1
  • 来自: 广州
社区版块
存档分类
最新评论
文章列表
[Toast] 1,显示提示信息 public static Toast makeText (Context context, CharSequence text, int duration).show()  public static Toast makeText (Context context, int resId, int duration).show()  duration可以是:Toast.LENGTH_LONG,Toast.LENGTH_SHORT   [Notification] 1,(NotificationManager)getSystemService(NOTIFI ...
1,继承自TabActivity类 2,getTabHost()获取TabHost实例 3, LayoutInflater.from(this).inflate(界面布局Id, tabHost.getTabContentView(), true); 4,添加选项卡    tabHost.addTab(        tabHost.newTabSpec(选项卡Tag)   //返回TabSpec实例 .setIndicator(选项卡显示标题) //或.setIndicator(CharSequence label, Drawable icon) .setContent(选项卡绑定视图Id ...
1,  a,创建.重写public boolean onCreateOptionsMenu(Menu menu)     menu.add添加菜单项  b,监听菜单选中事件.重写public boolean onOptionsItemSelected(MenuItem item)//item.getItemId()为菜单项的id   2,带子菜单的菜单 重写public boolean onCreateOptionsMenu(Menu menu)  menu.addSubMenu(CharSequence title)返回父菜单SubMenu,SubMenu.add添加其下级菜单   3 ...
1,创建  a,new AlertDialog.Builder(Context  context) b,一些设置 c,create()创建 d,show()显示 e,dismiss()退出对话框   2,常用方法 setIcon:设置图标 setTitle:设置标题 setPositiveButton:设置 确定按钮 setNegativeButton:设置 取消按钮 setNeutralButton:设置 忽略按钮 setCancelable(Boolean arg0)//按回退键是否可以取消   3,可选但唯一的方法 setMessage 设置显示消息 setItems   显示单选 ...
个人学习android做的笔记,贴出来备忘.   1,EditText     主要函数:setText/getText设置/获取文本内容,setHint设置缺省显示内容;   2,RadioGroup,RadioButton RadioButton的isChecked()判断是否被选中 获取选中RadioButon的ID:设置RadioGroup.setOnCheckedChangeListener方法 public onCheckedChanged(RadioGroup group,int checkedId)//checkedId是选中RadioButton的ID   3,Ch ...
   UI设计中使用XML(类XML)语言描述是一大趋势.AS中的界面UI部分是类XML,微软的WPF和Silverlight也采用类XML语言,当然在网页上的XHTML更是XML大应用了.或许由于Google是互联起家的缘故,所以在Android的界面布局中到处可以看到网页布局的影子.当你看到findViewById是否会想去js中经常用到的document.getElementById呢?当你用LinearLayout/RelativeLayout/TableLayou布局是否会想起网页中DIV+CSS和经典的Table布局呢?下面简单介绍Android的几个重要布局1,Linea ...
Global site tag (gtag.js) - Google Analytics