LinearLaout 标签是 一种接口组件的编排方式
android:orientation="vertical"
android;layout_width="fill_parent"
android;layout_height="fill_parent"
>
android:orientation="方式"
这个方式有两种:"vertical" 垂直 方式 ...
分类:
其他好文 时间:
2014-09-25 14:33:49
阅读次数:
740
1,标签
标签闪亮登场了。当LayoutInflater遇到这个标签时,它会跳过它,并将内的元素添加到的父元素里。迷惑了吗?让我们用来替换FrameLayout,并重写之前的XML布局:
android:layout_width="fill_parent"
android:layout_height="fill_parent"
...
分类:
移动开发 时间:
2014-09-22 15:55:32
阅读次数:
293
我们在自定义android组件的时候,除了用Java构建出组件的样子外,有时候还需要去申明一些“属性”提供给项目使用,那么什么是组件的属性呢?
例如在清单文件中,创建一个TextView的时候,这是需要制定TextView的android:layout_width="wrap_content" android:layout_height="wrap_content"等等这些都是组件的属性,TextView是android系统为我们提供好的组件,它的属性亦是android系统为我们提供了。...
分类:
移动开发 时间:
2014-09-18 13:18:44
阅读次数:
233
首先看一个android项目中各个包的作用
下面看几个常用的控件:
1、 TextView
显示文本框控件
2、 EditText
输入文本框
TextView控件常用属性:
id----控件的id
layout_width----控件的宽度
layout_height----控件的高度
text----文本内容
textSize----文本大小
textColor--...
分类:
移动开发 时间:
2014-09-18 09:50:03
阅读次数:
228
java.lang.RuntimeException: Binary XML file line #7: You must supply a layout_height attribute.这个错误有可能是你指定了高度,但是在对应的dpi下没有声明这个dimen高度导致的错误。这个,你在xhdpi下...
分类:
编程语言 时间:
2014-09-17 10:04:21
阅读次数:
310
1,Android FrameLayout的android:foreground属性可以设置单击时的前景色
<FrameLayout
android:id="@+id/poster_contanier"
android:layout_width="match_parent"
android:layout_height="match_pare...
分类:
移动开发 时间:
2014-09-16 12:42:40
阅读次数:
243
竖向ScrollView中嵌套横向ScrollView,横向ScrollView嵌套ListView。具体代码见附件。<ScrollViewandroid:layout_width="match_parent"android:layout_height="match_parent"><RelativeLayoutandroid:layout_width="match_parent"android:layout_height="wrap_content..
分类:
其他好文 时间:
2014-09-13 03:02:25
阅读次数:
358
首先需要一个Layout界面:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="ver...
分类:
移动开发 时间:
2014-09-10 17:50:10
阅读次数:
197
activity_main.xml<?xmlversion="1.0"encoding="utf-8"?><TableLayoutxmlns:android="http://schemas.android.com/apk/res/android"android:layout_width="match_parent"android:layout_height="match_parent"><TableLayout><TextViewandroid:id="@+id/te..
分类:
移动开发 时间:
2014-09-09 13:48:19
阅读次数:
327
今天在解决安卓应用兼容性问题,问题是由于使用LinearLayout的weight引起的,下面我使用一个Demo简述一下问题以及解决方法。 样例1:使用weight的是布局文件,包含TextView<LinearLayout
android:layout_width="0dip"
android:layout_height="wrap_content"
...
分类:
其他好文 时间:
2014-09-06 23:50:54
阅读次数:
447