Egret learning diary entry --- twenty-four (book section 9.12 ~ 9.15 Content)

Twenty-four (book section 9.12 ~ 9.15 Content)

  9.12 Section Start content.

  

  

  

  

   Key:

    1, TextInput use, and how to set the encryption attribute.

  operating:

    1, TextInput use, and how to set the encryption attribute.

      Creating exml file, drag the component, set id.

      

      This is a property asterisk password process.

      

      Create a binding class.

      

      Instantiated and run.

      

      However, when the focus password input box, the password is displayed.

      

      I did not know how to set the method "when the focus is on the password box, is display or an asterisk."

  At this point, the contents of the end section 9.12.

  

  Start 9.13.

  

  

  

  

  

  

  

    This, and use the TextInput are similar.

    Compared to just EditableText and TextInput, EditableText is transparent, and no white background.

 

    

    The provision of the displayAsPassword = true, so, after losing focus, but also display an asterisk.

    

  At this point, the contents of the end section 9.13.

  

  Start 9.14.

  

  

  

  

  

  

  

  

  

  Key:

    1, create a Group with Exml way, and familiar layout Group.

    2, with the Create Group Code, and set the layout of the Group.

  operating:

    1, create a Group with Exml way, and familiar layout Group.

      Horizontal layout.

        

      Vertical layout.

        

      I think this should be the most difficult tileLayout layout:

        

        Because there are too many parameters you can be elected. . .

        

        

        and so. . . I am still ignorant of force. . .

    2, with the Create Group Code, and set the layout of the Group.

      

  At this point, the contents of the end section 9.14.

 

  Start 9.15.

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  Wow, this really is the content of the scroll bar and more. 9.15.4 9.11.4 and the authors wrote, made me think that I shot wrong.

  Key:

    1, the vertical scroll bar is used.

    2, use the horizontal scroll bar.

    3、封装一个滚动条和List的组合类。(List组件还没学到,暂时先当做了解)

    4、使用封装好的组合类。

  操作:

    1、垂直滚动条的使用。

      首先,想要有滚动效果。那么,可视区域,必须小于内容长度。

      

    2、水平滚动条的使用。

      其实和垂直滚动条一样,只要把 竖着的 改成 横着的 就行了。

      

    3、封装一个滚动条和List的组合类。(List组件还没学到,暂时先当做了解)

      这个就麻烦点了,因为List组件还没有学习过,所以就当成做一个List的包装类。

      List提供的接口,包装类也提供就好了。

      那么包装类的主要作用,就是在List上,多加一个滚动条。

      好了,接下来将是有史以来最长的代码,我来慢慢分析。

      呼~~~经过了半个小时。我按照我个人理解,写好了注释。

      

      

      这里有一部分没有写注释,因为太简单了,只不过是 获取和设置 List 的属性而已。

      

    4、使用封装好的组合类。

      既然,我们封装好了类,就开始来使用这个类吧。

      

      好的。。。运行后,我并不知道怎么设置List要显示的内容。所以。。。没什么用。

      为什么这本书不能先把List讲清楚,再来讲Scroller呢?真是坑!!!

      算了,要等待List学习了之后,才能回头来纠正这里的问题。

 

  至此,9.15节 内容结束。

 

  今天太晚了,哎。。。。。。没想到弄这个玩意这么费时。

  洗澡去了,撤了。 

Guess you like

Origin www.cnblogs.com/dmc-nero/p/11288075.html