android自學(xué)筆記2-布局-創(chuàng)新互聯(lián)

1.LinearLayout

目前創(chuàng)新互聯(lián)已為成百上千家的企業(yè)提供了網(wǎng)站建設(shè)、域名、虛擬空間、網(wǎng)站運(yùn)營(yíng)、企業(yè)網(wǎng)站設(shè)計(jì)、遼陽縣網(wǎng)站維護(hù)等服務(wù),公司將堅(jiān)持客戶導(dǎo)向、應(yīng)用為本的策略,正道將秉承"和諧、參與、激情"的文化,與客戶和合作伙伴齊心協(xié)力一起成長(zhǎng),共同發(fā)展。
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="horizontal" >
    
<!--     <Button  -->
<!--         android:id="@+id/button1" -->
<!--         android:layout_width="wrap_content" -->
<!--         android:layout_height="wrap_content" -->
<!--         android:layout_gravity="top" -->
<!--         android:text="Button 1" -->
<!--         /> -->
<!--     <Button  -->
<!--         android:id="@+id/button2" -->
<!--         android:layout_width="wrap_content" -->
<!--         android:layout_height="wrap_content" -->
<!--         android:layout_gravity="center_vertical" -->
<!--         android:text="Button 2" -->
<!--         /> -->
<!--     <Button  -->
<!--         android:id="@+id/button3" -->
<!--         android:layout_width="wrap_content" -->
<!--         android:layout_height="wrap_content" -->
<!--         android:layout_gravity="bottom" -->
<!--         android:text="Button 3" -->
<!--         /> -->
    
<EditText 
    android:id="@+id/input_message"
    android:layout_width="0dp"
    android:layout_height="wrap_content"
    android:layout_weight="2"
    android:hint="Type Something" />

<Button 
    android:id="@+id/send"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    
    android:text = "Send"
    />
    
</LinearLayout>

2.RelativeLayout

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent" >

    <Button 
        android:id="@+id/button3"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerInParent="true"
        android:text="Button 3" />
        
        
    <Button 
        android:id="@+id/button1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
		android:layout_toLeftOf="@id/button3"
		android:layout_above="@id/button3"
        android:text="Button 1"
        />

    <Button 
        android:id="@+id/button2"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
		android:layout_alignLeft="@id/button3"
        android:text="Button 2"
        />
    <Button 
        android:id="@+id/button4"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
		android:layout_toLeftOf="@id/button3"
		android:layout_below="@id/button3"
        android:text="Button 4" />    
    
<Button 
        android:id="@+id/button5"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
		android:layout_toRightOf="@id/button3"
		android:layout_below="@id/button3"
        android:text="Button 5" />    
</RelativeLayout>

3.FrameLayout

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent" >

    <Button 
        android:id="@+id/button3"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerInParent="true"
        android:text="Button 3" />
        
 <ImageView 
     android:id="@+id/p_w_picpathview"
     android:layout_width="wrap_content"
     android:layout_height="wrap_content"
     android:src="@drawable/ic_launcher"
     />
    
</FrameLayout>

4.TableLayout

<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent" 
    android:stretchColumns="1"
    >
    
    


    <TableRow >
        <TextView 
            android:layout_height="wrap_content"
            android:text="Account:"
            />
 		<EditText 
 		    android:id="@+id/account"
 		    android:layout_height="wrap_content"
			android:hint="input your account"
 		    /> 
 		    
 		
    </TableRow>
   
    <TableRow >
        <TextView 
            android:layout_height="wrap_content"
            android:text="Password:"
            />
 		<EditText 
 		    android:hint="@+id/password"
 		    android:layout_height="wrap_content"
 		    android:inputType="textPassword"
 		    />       
    </TableRow> 

    
    <TableRow>
        <Button 
            android:id="@+id/button"
            android:layout_height="wrap_content"
            android:layout_span = "2"
            android:text="Login"
            />
        
    </TableRow>
    
    
    
    
</TableLayout>

android 自學(xué)筆記2-布局

另外有需要云服務(wù)器可以了解下創(chuàng)新互聯(lián)scvps.cn,海內(nèi)外云服務(wù)器15元起步,三天無理由+7*72小時(shí)售后在線,公司持有idc許可證,提供“云服務(wù)器、裸金屬服務(wù)器、高防服務(wù)器、香港服務(wù)器、美國(guó)服務(wù)器、虛擬主機(jī)、免備案服務(wù)器”等云主機(jī)租用服務(wù)以及企業(yè)上云的綜合解決方案,具有“安全穩(wěn)定、簡(jiǎn)單易用、服務(wù)可用性高、性價(jià)比高”等特點(diǎn)與優(yōu)勢(shì),專為企業(yè)上云打造定制,能夠滿足用戶豐富、多元化的應(yīng)用場(chǎng)景需求。

文章題目:android自學(xué)筆記2-布局-創(chuàng)新互聯(lián)
轉(zhuǎn)載注明:http://muchs.cn/article10/ddcjdo.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供企業(yè)網(wǎng)站制作、域名注冊(cè)、營(yíng)銷型網(wǎng)站建設(shè)、軟件開發(fā)、品牌網(wǎng)站制作小程序開發(fā)

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)

綿陽服務(wù)器托管