首页

android 界面布局入门级示例(LinearLayout)

java

2020-6-28

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@ id/LinearLayout1"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">
    <LinearLayout
        android:layout_width="fill_parent"
   	    android:layout_height="fill_parent"
   	    android:layout_weight="1"
   	    android:orientation="vertical">   
	<LinearLayout
	        android:layout_width="fill_parent"
	   	    android:layout_height="fill_parent"
	   	    android:layout_weight="1"
	   	    android:orientation="horizontal">   
		<LinearLayout
		        android:layout_width="fill_parent"
		   	    android:layout_height="fill_parent"
		   	    android:layout_weight="1"
		   	    android:orientation="vertical">   
		    <Button
		        android:id="@ id/button1"
		        android:layout_width="wrap_content"
		        android:layout_height="wrap_content"
		        android:text="左上按钮" />

		   

</LinearLayout> 

<LinearLayout
        android:layout_width="fill_parent"
   	    android:layout_height="fill_parent"
   	    android:layout_weight="1"
   	    
   	    android:orientation="vertical">   
	<Button
	        android:layout_width="wrap_content"
	   	    android:layout_height="wrap_content"
	   	    android:layout_gravity="right"
	   	    android:text="右上按钮"/>
	</LinearLayout> 
</LinearLayout> 


<LinearLayout
		        android:layout_width="fill_parent"
		   	    android:layout_height="fill_parent"
		   	    android:layout_weight="1"
		   	    android:gravity="center"
		   	    android:orientation="vertical">   
		    <Button
		        android:layout_width="wrap_content"
		        android:layout_height="wrap_content"
		        android:text="中心按钮" />
</LinearLayout>  


<LinearLayout
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:layout_weight="1"
    android:orientation="horizontal">
<LinearLayout 
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:layout_weight="1"
    android:gravity="left|bottom"
    android:orientation="vertical">
<Button
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="左下按钮"/> 
</LinearLayout>
	
	<LinearLayout
	    android:layout_width="fill_parent"
	    android:layout_height="fill_parent"
	    android:layout_weight="1"
	    android:gravity="right|bottom"
	    android:orientation="vertical">

		<Button
		    android:layout_width="wrap_content"
		    android:layout_height="wrap_content"
		    android:text="右下按键"/>     
			</LinearLayout>  
		</LinearLayout> 
</LinearLayout>
<LinearLayout
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:layout_weight="1"
    android:orientation="vertical">
		<Button
		    android:layout_width="fill_parent"
		    android:layout_height="fill_parent"
		    android:layout_weight="1"
		    android:text="图片"/>   
<EditText
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    />  
    </LinearLayout>
</LinearLayout>
资源下载此资源下载价格为3D币(VIP免费),请先
资源文件列表
╜τ├µ╠°╫¬/.classpath , 475
╜τ├µ╠°╫¬/.project , 843
╜τ├µ╠°╫¬/.settings/org.eclipse.jdt.core.prefs , 177
╜τ├µ╠°╫¬/AndroidManifest.xml , 859
╜τ├µ╠°╫¬/bin/AndroidManifest.xml , 859
╜τ├µ╠°╫¬/bin/classes/com/example/buju/BuildConfig.class , 341
╜τ├µ╠°╫¬/bin/classes/com/example/buju/MainActivity.class , 1115
╜τ├µ╠°╫¬/bin/classes/com/example/buju/R$attr.class , 334
╜τ├µ╠°╫¬/bin/classes/com/example/buju/R$dimen.class , 455
╜τ├µ╠°╫¬/bin/classes/com/example/buju/R$drawable.class , 401
╜τ├µ╠°╫¬/bin/classes/com/example/buju/R$id.class , 455
╜τ├µ╠°╫¬/bin/classes/com/example/buju/R$layout.class , 397
╜τ├µ╠°╫¬/bin/classes/com/example/buju/R$menu.class , 382
╜τ├µ╠°╫¬/bin/classes/com/example/buju/R$string.class , 466
╜τ├µ╠°╫¬/bin/classes/com/example/buju/R$style.class , 425
╜τ├µ╠°╫¬/bin/classes/com/example/buju/R.class , 653
╜τ├µ╠°╫¬/bin/classes.dex , 816112
╜τ├µ╠°╫¬/bin/dexedLibs/android-support-v4-acc8d938db394eb657ccbae5a2a109a3.jar , 273657
╜τ├µ╠°╫¬/bin/jarlist.cache , 119
╜τ├µ╠°╫¬/bin/res/drawable-hdpi/ic_launcher.png , 5964
╜τ├µ╠°╫¬/bin/res/drawable-mdpi/ic_launcher.png , 3112
╜τ├µ╠°╫¬/bin/res/drawable-xhdpi/ic_launcher.png , 9355
╜τ├µ╠°╫¬/bin/res/drawable-xxhdpi/ic_launcher.png , 17889
╜τ├µ╠°╫¬/bin/resources.ap_ , 41168
╜τ├µ╠°╫¬/bin/zuoye_1.apk , 319059
╜τ├µ╠°╫¬/gen/com/example/buju/BuildConfig.java , 158
╜τ├µ╠°╫¬/gen/com/example/buju/R.java , 2709
╜τ├µ╠°╫¬/ic_launcher-web.png , 51394
╜τ├µ╠°╫¬/libs/android-support-v4.jar , 758727
╜τ├µ╠°╫¬/proguard-project.txt , 781
╜τ├µ╠°╫¬/project.properties , 563
╜τ├µ╠°╫¬/res/drawable-hdpi/ic_launcher.png , 7658
╜τ├µ╠°╫¬/res/drawable-mdpi/ic_launcher.png , 3777
╜τ├µ╠°╫¬/res/drawable-xhdpi/ic_launcher.png , 12516
╜τ├µ╠°╫¬/res/drawable-xxhdpi/ic_launcher.png , 24777
╜τ├µ╠°╫¬/res/layout/activity_main.xml , 3282
╜τ├µ╠°╫¬/res/menu/main.xml , 366
╜τ├µ╠°╫¬/res/values/dimens.xml , 220
╜τ├µ╠°╫¬/res/values/strings.xml , 221
╜τ├µ╠°╫¬/res/values/styles.xml , 697
╜τ├µ╠°╫¬/res/values-v11/styles.xml , 334
╜τ├µ╠°╫¬/res/values-v14/styles.xml , 391
╜τ├µ╠°╫¬/res/values-w820dp/dimens.xml , 381
╜τ├µ╠°╫¬/src/com/example/buju/MainActivity.java , 828
没有账号? 忘记密码?

社交账号快速登录