制作登录界面的布局时候,可以使用 android:stretchColumns="0,3"

  1. <TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
  2. xmlns:tools="http://schemas.android.com/tools"
  3. android:layout_width="match_parent"
  4. android:layout_height="match_parent"
  5. android:gravity="center_vertical"
  6. android:stretchColumns="0,3"
  7. >
  8. <TableRow
  9. android:layout_width="wrap_content"
  10. android:layout_height="wrap_content"
  11. >
  12. <TextView/>
  13. <TextView
  14. android:textSize="24px"
  15. android:text="@string/hello_world"
  16. android:layout_width="wrap_content"
  17. android:layout_height="wrap_content"/>
  18. <EditText
  19. android:layout_width="wrap_content"
  20. android:minWidth="145dp"
  21. android:layout_height="wrap_content"/>
  22. <TextView/>
  23. </TableRow>
  24. <TableRow
  25. android:layout_width="wrap_content"
  26. android:layout_height="wrap_content"
  27. >
  28. <TextView/>
  29. <TextView
  30. android:textSize="24px"
  31. android:text="@string/hello_world"
  32. android:layout_width="wrap_content"
  33. android:layout_height="wrap_content"/>
  34. <EditText
  35. android:layout_width="wrap_content"
  36. android:minWidth="145dp"
  37. android:layout_height="wrap_content"/>
  38. <TextView/>
  39. </TableRow>
  40. <TableRow
  41. android:layout_width="wrap_content"
  42. android:layout_height="wrap_content"
  43. >
  44. <TextView/>
  45. <TextView
  46. android:textSize="24px"
  47. android:text="@string/hello_world"
  48. android:layout_width="wrap_content"
  49. android:layout_height="wrap_content"/>
  50. <EditText
  51. android:layout_width="wrap_content"
  52. android:minWidth="145dp"
  53. android:layout_height="wrap_content"/>
  54. <TextView/>
  55. </TableRow>
  56. </TableLayout>

android:stretchColumns="0,3"

拉伸第一个和第4个 这个属性在tablelayout布局里使用

制作登录界面的布局时候,可以使用

来自为知笔记(Wiz)

时间: 2024-08-29 23:41:00

制作登录界面的布局时候,可以使用 android:stretchColumns="0,3"的相关文章

【Android】利用表格布局,Android中xml文件与java的交互制作登录界面

登录界面是图形编程.网页编程的一个经典而又基础的程序. 在安卓中,如图所示一个基本登录界面: 点击取消按钮就关闭这个程序,点击登录按钮则显示用户输入的用户名与密码. 一.基本布局 这个程序利用到安卓中的表格布局. 先打开res/values/strings.xml中定义几个字符串.之所以不直接把字符串直接写在activity_main.xml的组件中,是因为免得Eclipse出现警告.这个文件的代码如下: <?xml version="1.0" encoding="ut

引入Bootstrap制作登录界面

<!DOCTYPE html> <html lang="zh-CN"> <head>     <meta charset="utf-8">     <meta http-equiv="X-UA-Compatible" content="IE=edge">     <meta name="viewport" content="widt

制作登录界面,登录成功后把用户名放在session里,在第3个页面读取session显示用户名

<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <

React Native之登录界面的布局

版权声明:本文为博主原创文章,未经博主允许不得转载. 代码注释比较详细 /** * Sample React Native App * https://github.com/facebook/react-native * @flow */ import React, {Component} from 'react'; import { AppRegistry, StyleSheet, Text, View, TextInput, Platform, TouchableOpacity, } fro

Android开发实例之miniTwitter登录界面的实现

原文: http://www.jizhuomi.com/android/example/134.html 本文要演示的Android开发实例是如何完成一个Android中的miniTwitter登录界面,下面将分步骤讲解怎样实现图中的界面效果,让大家都能轻松的做出美观的登录界面. miniTwitter登录界面效果图 先贴上最终要完成的效果图: miniTwitter登录界面的布局分析 首先由界面图分析布局,基本可以分为三个部分,下面分别讲解每个部分. 第一部分是一个带渐变色背景的LinearL

MVC+EasyUI+三层新闻网站建立(二后台登录界面的搭建)

首先我们在Controllers里面新添加一个控制器就叫LoginController,右键点击Controllers添加控制器就可以了(注意后面一定是Controller结尾,这是一种约定) 其次:右键点击index建立Index视图.(不选择使用母版页) 现在我们就可以在Index视图中设计我们的登录页面了. 这里需要我们引入几个Css样式和JS文件 简单的进行登录界面的布局 <html> <head> <meta name="viewport" co

Android 6.0 Overview Screen实现原理

Android 4.0中添加了一个很有用的特性,那就是overView Screen功能,也就是最近任务预览功能.这个功能提供了一个列表试图,方便用户简单快捷地了解到最近使用的app或者最近进行的任务.这个功能和iOS的最近任务在界面上很相似.在android 5.0中,这个任务得到了进一步的加强,在android 5.0之前overView Screen中显示的任务快照是不可以配置的,但是在android 5.0中是可以配置的,开发者可以指定那些activity以什么样的形式,什么UI风格显示

[转]Android:布局实例之模仿QQ登录界面

Android:布局实例之模仿QQ登录界面 预览图: 准备: 1.找到模仿对象 QQ登陆界面UI下载>>>>> 2.导入工程 3.查看布局结构和使用控件 其对应效果图分布为 4.分析样式选择器 下拉箭头2种样式:点击和默认状态 文本框2种样式:聚焦和默认状态 复选框3种样式:选择.不选择和鼠标点着不放 左下角按钮2种样式:点击和默认 登录按钮2样式:点击和默认 ============================================帖代码===========

Android:布局实例之模仿京东登录界面

预览图及布局结构参考: 布局: 1 <?xml version="1.0" encoding="utf-8"?> 2 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 3 android:layout_width="match_parent" 4 android:layout_height="matc