Nonsense not much to say, this is address: http://android.lineten.net/layout.php.
There is a picture of the truth, such as:
If this is the case with your XML:
<?xml version= "1.0" encoding= "Utf-8"?>
<relativelayout xmlns:android= "Http://schemas.android.com/apk/res/android"
Android:layout_width= "Fill_parent"
android:layout_height= "Fill_parent"
android:orientation= "Vertical" >
<imageview
Android:id= "@+id/logo"
Android:layout_width= "Fill_parent"
android:layout_height= "Wrap_content"
android:background= "@drawable/ic_logo"/>
<button
Android:id= "@+id/version_btn"
Android:layout_width= "Wrap_content"
android:layout_height= "Wrap_content"
android:layout_below= "@id/logo"
Android:layout_centerhorizontal= "true"
android:layout_margintop= "@dimen/dp_54"
Android:textcolor= "@color/colffffff"
Android:textsize= "18SP"
Android:text= "version number: 1.0.0"
android:background= "@drawable/bg_version_btn"/>
<textview
Android:id= "@+id/companyname_tv"
Android:layout_width= "Wrap_content"
android:layout_height= "Wrap_content"
Android:layout_alignparentbottom= "true"
Android:layout_centerhorizontal= "true"
android:background= "@color/transparent"
android:text= "@string/companyname"
Android:textcolor= "@color/col8d8d8d"
android:layout_marginbottom= "@dimen/font_size_40"
Android:textsize= "14sp"/>
<textview
Android:id= "@+id/email_tv"
Android:layout_width= "Wrap_content"
android:layout_height= "Wrap_content"
Android:layout_alignparentbottom= "true"
Android:layout_centerhorizontal= "true"
android:layout_marginbottom= "@dimen/dp_22"
android:text= "Email: [Email protected]"
Android:textcolor= "@color/cola0a0a0"
/>
</RelativeLayout>
Generate code such as the following:
Content View Elements
Private ImageView Mlogo;
Private Button mversion_btn;
Private TextView Mcompanyname_tv;
Private TextView Memail_tv;
End of Content View Elements
private void Bindviews () {
Mlogo = (ImageView) Findviewbyid (R.id.logo);
MVERSION_BTN = (Button) Findviewbyid (R.ID.VERSION_BTN);
MCOMPANYNAME_TV = (TextView) Findviewbyid (R.ID.COMPANYNAME_TV);
MEMAIL_TV = (TextView) Findviewbyid (R.ID.EMAIL_TV);
}
Android Layout Binder (an online tool for creating Java code with view Find in XML)