android

来源:互联网 发布:萌妹子语音软件 编辑:程序博客网 时间:2024/06/05 03:42

1. Activity  的布局初步

      相对布局   线性布局  table布局   和其 嵌套结构

  2.相对布局 

      RelativeLayout   

两个控件 左右 上下    above   below  toLeftOf  boRightOf  

          成包含关系                alignBaseline     alignLeft    alignRight  alignTop    对像为其它控件

         父子控件              alignParentBottom alignParentLeft algnParentRight   alignParentTop   True or  (false ) 

          对齐方式      centerHorizontal    centerInParent  centerVertical    True or  (false ) 

           EditText   background

            margin  内边距  left top  right  bottom   单位 px

  3 常用控件 

      RadioGroup  RadioButton   CheckBox   Toast

       RadioGroup  width =wrap_contert   height=wrap_content

        RdaioGrout  包含多个  RadioButton

      声明   fingviewbyid     给RadioGroup绑定监听器  setOnCheckedChangeListerer (new RadioGroup.onCheckChangeListener))

      通过监听器的实现  根据id 判断哪个被选定   

      

            system.out.printlin("   ")


           Check  每个都要设定 监听器    Setoncheckedchangelistener       

      

原创粉丝点击