---
title: "button layout for android"
author: "Aga"
date: "2009-12-16T17:55:20Z"
tags: []
categories: ["非技术"]
slug: "button-layout-for-android"
draft: false
lastmod: "2009-12-17T09:01:37Z"
id: 549952
url: "https://aga.iteye.com/blog/549952"
---

```xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:orientation="vertical"
	xmlns:android="http://schemas.android.com/apk/res/android"
	android:layout_width="fill_parent" android:layout_height="fill_parent">
	<LinearLayout android:id="@+id/list" android:layout_width="fill_parent"
		android:layout_height="wrap_content" android:layout_weight="1" />

	<LinearLayout android:layout_width="fill_parent"
		android:layout_height="wrap_content">
		<View android:layout_width="fill_parent" android:layout_height="fill_parent"
			android:visibility="invisible" android:layout_weight="1" />
		<LinearLayout android:id="@+id/btnBarContainer"
			android:layout_width="wrap_content" android:layout_height="wrap_content">
			<Button android:layout_width="wrap_content"
				android:layout_height="wrap_content" android:text="Hello1" />
			<Button android:layout_width="wrap_content"
				android:layout_height="wrap_content" android:text="Hello2" />
			<Button android:layout_width="wrap_content"
				android:layout_height="wrap_content" android:text="Hello3" />
			<Button android:layout_width="wrap_content"
				android:layout_height="wrap_content" android:text="Hello3" />
		</LinearLayout>
		<View android:layout_width="fill_parent" android:layout_height="fill_parent"
			android:visibility="invisible" android:layout_weight="1" />
	</LinearLayout>
</LinearLayout>
```