Android ListView详解(2)
<TextView
android:layout_width="60px"
android:layout_height="wrap_content"
android:id="@+id/personid"
/>
<TextView
android:layout_width="150px"
android:layout_height="wrap_content"
android:layout_alignTop="@id/personid"
android:layout_toRightOf="@id/personid"
android:id="@+id/personname"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignTop="@id/personname"
android:layout_toRightOf="@id/personname"
android:id="@+id/personage"
/>
</RelativeLayout>
用到的实体bean为Person,代码如下
Java代码
package com.lamp.domain;
public class Person {
private Integer personid = null;
private String name = null;
private Integer age = null;
public Person() {
}
public Person(String name,Integer age){
this.name = name;
this.age = age;
}
public Integer getPersonid() {
return personid;
}
public void setPersonid(Integer personid) {
this.personid = personid;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Integer getAge() {
return age;
}
public void setAge(Integer age) {
this.age = age;
}
@Override
相关新闻>>
- 发表评论
-
- 最新评论 更多>>