2012-11-14 25 views
1

我要为各个tweets自定义XML布局。我想尽可能地将它建立在推文的标准布局之上。有谁知道我在哪里可以找到这种布局。我不想在这里重新发明轮子,只是用标准方式表示推文。用于Tweet的XML布局

+0

看看这个类似的帖子 的http://计算器。 com/questions/4552968/how-to-make-listview-like-listview-twitter –

+0

看着那个,但它不是我正在寻找的。我真的很想或多或少地匹配单个推文的标准Twitter客户端布局。这个问题是100%关于单个推文的布局。包括最近在右上角的等等。推文的不同部分的推文的字体等。 – NextDroid

回答

0

你可能想看看listview

+0

是的listview将是这个的一部分。我所追求的是个人推特的确切布局。 – NextDroid

0

twitter_list_row.xml

<TextView 
    android:id="@+id/username" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:layout_alignParentLeft="true" 
    android:textColor="#00FF00" 
    android:textSize="12sp" /> 

<TextView 
    android:id="@+id/line" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:layout_marginLeft="2dp" 
    android:layout_toRightOf="@id/username" 
    android:text="@string/line" 
    android:textColor="#777777" /> 

<TextView 
    android:id="@+id/ago" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:layout_marginLeft="2dp" 
    android:layout_toRightOf="@id/line" 
    android:textColor="#777777" 
    android:textSize="12sp" /> 

<TextView 
    android:id="@+id/at_line" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:layout_marginLeft="2dp" 
    android:layout_toRightOf="@id/ago" 
    android:text="@string/line" 
    android:textColor="#777777" /> 

<TextView 
    android:id="@+id/at_username" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:layout_marginLeft="2dp" 
    android:layout_toRightOf="@+id/at_line" 
    android:textColor="#777777" 
    android:textSize="12sp" /> 

<TextView 
    android:id="@+id/message" 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content" 
    android:layout_alignParentLeft="true" 
    android:layout_below="@+id/username" 
    android:autoLink="web" 
    android:textColor="@color/header_text" 
    android:textColorLink="#00FF00" /> 

+0

看起来像是缺少imageview和包含的布局。 – NextDroid

+0

这至少需要合并标签才能工作 – NextDroid