TableLayout比较常用,设计简洁.

xxxxxActivity.java:

package com.fp.xxx

import android.app.Activity;

import android.content.Intent;

import android.os.Bundle;

import android.view.View;

public class xxxxxActivity extends Activity implements View.OnClickListener

{

@Override

public void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);

setContentView(R.layout.wirelesscity_main);

findViewById(R.id.xxxxx).setOnClickListener(this);

}

public void onClick(View v) {

switch(v.getId()) {

case R.id.wcm_jglz:

....

break;

}

}

layout/xxxxx.xml:

<?xml version="1.0" encoding="utf-8"?>

<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"

android:id="@+id/wc_main"

android:layout_width="fill_parent"

android:layout_height="fill_parent"

android:stretchColumns="1"

android:background="#FFF">

<TableRow>

<Button android:id="@+id/wcm_jglz"

android:background="@drawable/xxxxxxxx"

android:layout_width="fill_parent"

android:layout_height="wrap_content"

style="@style/xxxxxxx"

android:text="xxxxxxx"/>

</TableRow>

<TableRow>

......

</TableRow>

<TableRow>

......

</TableRow>

<TableRow>

......

</TableRow>

</TableLayout>

转载注明出处: http://blog.csdn.net/ccwwff/archive/2010/08/20/5826560.aspx

更多相关文章

  1. Linux hostname主机名配置文件/etc/hosts详解 详细出处参考:http:
  2. TP-link 无线路由器WDS设置方法图解_无线桥接设置 详细出处参考:h
  3. android listview优化几种写法 详细出处参考:http://www.jb51.ne

随机推荐

  1. Android界面刷新
  2. 禁用Android系统Home键
  3. android 开发者选项
  4. 001——Binder 机制详解—Binder IPC 程
  5. [置顶] 我的Android进阶之旅------>Andro
  6. native.js获取手机硬件基本信息实例代码a
  7. 将ffmpeg移植到Android
  8. @suppresslint 标注忽略指定的警告(Handl
  9. android 开发中遇到未知问题的记录
  10. udacity android 学习笔记: lesson 4 par