650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M02/8B/49/wKioL1hJCTrQbAorAAHeWdhDusU595.png-wh_500x0-wm_3 -wmp_4-s_1480552663.png "title=" capture. PNG "alt=" Wkiol1hjctrqbaoraahewdhdusu595.png-wh_50 "/>
To achieve this effect,
Nested implementations of LinearLayout 2. Using Relativelayout
<?xml version= "1.0" encoding= "Utf-8"? ><linearlayout xmlns:android= "http// Schemas.android.com/apk/res/android " android:layout_width=" Match_parent " android:layout_height= "match_parent" android:orientation= "vertical" android:paddingleft= "10DP" android:paddingright= "10DP" > <edittext android:id= "@+id/EditText1" android:layout_width= "Match_parent" android:layout_height= "Wrap_content" android:hint= "@string/reminder" /> <Linearlayout android:layout_width= "Match_parent" android:layout_height= "Wrap_content" android:orientation= "Horizontal" > <EditText android:id= "@+id/dates" Android:layout_width= "0DP" android:layout_height= "Wrap_content" android:layout_weight= "1" /> <EditText android:id= "@+id/times" android: Layout_width= "100DP" android:layout_height= "Wrap_content" /> </LinearLayout> <button android:id = "@+id/button1" android:layout_width= "96DP" android:layout_height= "Wrap_content" android:layout_gravity= "Right" android:text= "Submit" /></LinearLayout>
<?xml version= "1.0" encoding= "Utf-8"? ><relativelayout xmlns:android= "http// Schemas.android.com/apk/res/android " android:layout_width=" Match_parent " android:layout_height= "Match_parent" android:paddingleft= "10DP" android:paddingright= "10DP" > <edittext android:id= "@+id/edittext1" android:layout_width= "Fill_parent" android:layout_height= "Wrap_content" android:hint= "@string/ Reminder " /> <EditText android:id= "@+id/dates" android:layout_width= "Wrap_content" android:layout_height= "Wrap_content" android:layout_below= "@id/edittext1" Android: Layout_alignparentleft= "true" android:layout_toleftof= "@+id/times" /> <edittext android: Id= "@+id/times" android:layout_width= "100DP" android:layout_height= "Wrap_content" android:layout_below= "@+id/EditText1" Android : layout_alignparentright= "true" /> <button android:id= "@+id/button1" android:layout_width= "96DP" android: layout_height= "Wrap_content" android:layout_below= "@id/ Times " android:layout_alignparentright=" true " android:text= "Submit" /> </RelativeLayout><!-- android:layout_alignparentleft= " True " left-aligns the parent control android:layout_toleftof=" @+id/times " android:layout_below= on the left side of the specified component @id /edittext1 " below the specified component -->
This article is from the "matengbing" blog, make sure to keep this source http://matengbing.blog.51cto.com/11395502/1880754
Android for integrated layout