1. Rotating the screen may cause activity to be destroyed. 2.activity life cycle: Start: OnCreate (), OnStart (), and Onresume () methods Close App:onpause (), OnStop (), and OnDestroy () methods. Activity is destroyed returned to desktop: OnPause () and OnStop () method. Activity has not been destroyed. Pop-up: OnPause () The masked activity is paused and cannot interact with it. When the pop-up window closes, it will continue to run. 3. Log level: 4. Layout properties: <?xml version= "1.0" encoding= "Utf-8"?><!--android:layout_above Place the control at the bottom of the control with the given ID android:layout_below the top of the control to the control of the given ID android:layout_toleftof the right edge of the control and the left edge of the control with the given ID aligned to Android: Layout_torightof aligns the left edge of the control with the right edge of the control of the given ID android:layout_alignbaseline the baseline of the control's baseline and the given ID to the Android : Layout_alignbottom aligns the bottom edge of the control with the bottom edge of the given ID control android:layout_alignleft the left edge of the control to the left edge of the given ID control android:layout_alignright Aligns the right edge of the control with the right edge of the given ID control Android:layout_aligntop aligns the top edge of the given control with the top of the given ID control android:alignparentbottom if the value is true, Aligns the bottom of the control with the bottom of the parent control Android:layout_alignparentleft if the value is true, the left side of the control is aligned to the left of the parent control android:layout_alignparentright True to align the right side of the control with the right side of the parent control android:layout_alignparenttop if true, aligns the top of the space with the top of the parent control android:layout_centerhOrizontal if the value is true, the control will be in the horizontal direction of the center android:layout_centerinparent if the value is true, the control will be in the horizontal and vertical direction of the parent control Android:layout_ Centervertical if the value is true, the control will be in the vertical direction of the central android:padding and Android:layout_margin Popular understanding Padding as the inner border, Margin for the outside of the box android:padding and android:layout_margin difference, in fact, the concept is very simple, padding is standing in the angle of the parent view to describe the problem, it specifies that its contents must be in the distance from the parent view boundary. Margin is to stand in their own perspective to describe the problem, and other (up and down) the distance between the view, if there is only one view at the same level, then its effect is basically the same as padding. android:layout_gravity= the "center" Android:gravity property is the qualification for the view content. For example, a button above the text. You can set the text on the left side of the view, on the right, and so on. Android:layout_gravity is used to set the position of the view relative to the parent view. For example, a button in the LinearLayout, you want to put the button on the left to the right and so on can be set by this property. Extensibility is just: EditText's android:hint setting EditText is empty when the prompt in the box is entered. android:scaletype: android:scaletype is a size that controls how the picture resized/moved to the ImageView. The meaning difference of imageview.scaletype/android:scaletype value: center/center by the original size of the picture, when the picture is longer/wider than the length/width of the view, The center portion of the image is truncated CENTER_CROP/centerCrop the size of the enlarged image is centered so that the image is long (wide) equal to or greater than the length (width) of the view center_inside/centerinside the contents of the picture to the full center display, by proportionally reduced or the original size so that the picture length/width is equal to or less than the length/width of the view FIT_CENTER/fitCenter the picture proportionally enlarge/ Zoom in to the width of the view, center FIT_END/fitEnd enlarge/Shrink the image to the width of the view, displayed in the lower part of the view FIT_START/fitStart Enlarge/Narrow The picture to the width of the view, display the upper part of the view FIT_XY/fitXY the picture is not scaled up/down to the view size display matrix/matrix is drawn with a matrix, Zoom in and out to display the image dynamically. To be aware, the name of the image in the Drawable folder cannot be capitalized.
Android fragment life cycle