我有消息blocks.I要顯示的時間message.This的右下角是我的xml:展會時間
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:id="@+id/blocks"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/mes7"
android:layout_marginRight="6dp"
android:layout_marginLeft="6dp"
android:clickable="false">
<TextView
android:id="@+id/messageBar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="left"
android:layout_marginLeft="4dp"
android:layout_marginRight="6dp"
android:gravity="left"
android:paddingLeft="5dp"
android:paddingRight="5dp"
android:paddingTop="1dp"
android:text="Test Message"
android:typeface="sans"
android:textSize="14sp"/>
<TextView
android:id="@+id/date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right|bottom"
android:layout_marginRight="5dp"
android:text="19:40"
android:textSize="10sp"/>
</LinearLayout>
</LinearLayout>
我有短信,但沒有問題,當消息延長日期不showing.Here你可以看到:
還有一件事:我想要做的左緣緣,但我不能。
我該怎麼做?
更新:我發現了問題。我認爲問題是「match_parent」,我們需要使用「 wrap_content「,但是當我們使用wrap_content時不顯示。如果我們使用」match_parent「結果:http://prntscr.com/4uqrwk – 2014-10-10 08:06:43
再次更新:這是我的錯。我使用的是佈局參數。 – 2014-10-10 10:07:21