update ui layout
[freespace.git] / weibosrc / com / weibo / view / StatusView.java
blob84a1cce11b09147233e3c165dda4de32a6f689b6
1 package com.weibo.view;
3 import android.content.Context;
4 import android.util.AttributeSet;
5 import android.util.Log;
6 import android.widget.ImageView;
7 import android.widget.LinearLayout;
8 import android.widget.TextView;
10 public class StatusView extends LinearLayout {
12 private TextView user_name;
13 private TextView post_time;
14 private ImageView face;
15 private TextView content;
16 private TextView rt_nick;
17 private TextView rt_reason;
18 private LinkImageView image;
20 public StatusView(Context context, AttributeSet attrs) {
21 super(context, attrs);
22 // TODO Auto-generated constructor stub
25 @Override
26 protected void onFinishInflate() {
27 user_name = (TextView) ((LinearLayout)getChildAt(0)).getChildAt(0);
28 post_time = (TextView) ((LinearLayout)getChildAt(0)).getChildAt(1);
29 face = (ImageView)((LinearLayout)getChildAt(1)).getChildAt(0);
30 content = (TextView) ((LinearLayout) ((LinearLayout)getChildAt(1)).getChildAt(1)).getChildAt(0);
31 rt_nick = (TextView) ((LinearLayout) ((LinearLayout) ((LinearLayout) ((LinearLayout)getChildAt(1)).getChildAt(1)).getChildAt(1)).getChildAt(1)).getChildAt(0);
32 rt_reason = (TextView) ((LinearLayout) ((LinearLayout) ((LinearLayout) ((LinearLayout)getChildAt(1)).getChildAt(1)).getChildAt(1)).getChildAt(1)).getChildAt(1);
33 image = (LinkImageView) ((LinearLayout) ((LinearLayout) ((LinearLayout)getChildAt(1)).getChildAt(1)).getChildAt(2)).getChildAt(0);
34 Log.e("StatusView","onFinishInflate");
35 super.onFinishInflate();
38 public TextView getUser_name() {
39 return user_name;
42 public void setUser_name(TextView user_name) {
43 this.user_name = user_name;
46 public TextView getPost_time() {
47 return post_time;
50 public void setPost_time(TextView post_time) {
51 this.post_time = post_time;
54 public ImageView getFace() {
55 return face;
58 public void setFace(ImageView face) {
59 this.face = face;
62 public TextView getContent() {
63 return content;
66 public void setContent(TextView content) {
67 this.content = content;
70 public TextView getRt_nick() {
71 return rt_nick;
74 public void setRt_nick(TextView rt_nick) {
75 this.rt_nick = rt_nick;
78 public TextView getRt_reason() {
79 return rt_reason;
82 public void setRt_reason(TextView rt_reason) {
83 this.rt_reason = rt_reason;
86 public LinkImageView getImage() {
87 return image;
90 public void setImage(LinkImageView image) {
91 this.image = image;