February 12 and February 13 learning log

1. Preparation of accounting of the family code:

Has completed the login screen, registration interface, the main interface, the interface and added functionality.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

2. Learning Andrews Studio

 

1. The relative layout

Relative layout:
with respect to the distance between the other controls.

Name: RelativeLayout

1.
relative id layout
android: layout_above = "@ + id /" with respect to the development of id up.
Android: layout_below = "@ + id /" with respect to the development of id down.
Android: layout_toLeftOf = "@ + id / "for the development phase left id.
Android: layout_toRightOf =" @ + id / "with respect to the development of id right.


2.
相对于给定id对齐
android:layout_alignBaseline="@+id/" 该控件的baseline和给定ID的控件的baseline对齐
android:layout_alignBottom="@+id/" 将该控件的底部边缘与给定ID控件的底部边缘对其(该控件还是默认位于父布局的左边)
android:layout_alignTop="@+id/" 将给定控件的顶部边缘与给定ID控件的顶部对齐(该控件还是默认位于父布局的左边)效果和上边一样
android:layout_alignLeft="@+id/" 将该控件的左边缘与给定ID控件的左边缘对齐(该控件默认位于父布局的上边)
android:layout_alignRight="@+id/" 将该控件的右边缘与给定ID控件的右边缘对齐(该控件默认位于父布局的上边)此时效果和上边效果一样


3.
相对与父控件
android:layout_alignParentBottom="true" 如果该值为true,则将该控件的底部和父控件的底部对齐(只写一行默认左下)
android:layout_alignParentLeft="true" 如果该值为true,则将该控件的左边与父控件的左边对齐(只写一条默认左上)
android:layout_alignParentRight="true" 如果该值为true,则将该控件的右边与父控件的右边对齐(默认右上)
android:layout_alignParentTop="true" 如果该值为true,则将空间的顶部与父控件的顶部对齐(只写一条默认左上)

android:layout_centerHorizontal="true" 如果值为真,该控件将被至于水平方向的中央(默认父布局的上方)
android:layout_centerInParent="true" 如果值为真,该控件将被至于父控件水平方向和垂直方向的中央
android:layout_centerVertical="true" 如果值为真,该控件将被至于垂直方向的中央(默认父布局的左边)


4.
相对偏移像素
android:layout_marginTop 向上偏移的值
android:layout_marginButtom 向下偏移的值
android:layout_marginLeft 向左偏移的值
android:layout_marginRight 向右偏移的值

 

 2.

实现了模拟小相册与登录的开发

 

 

 

 

 

 

 

 

Guess you like

Origin www.cnblogs.com/sicilya/p/12305874.html