2011-06-29 5 views
-1

私はそのアプリでアプリを作成しています。私はこの画像をクリックしています。アンドロイドのリストビューの目に見えない行への方法蜂蜜の櫛

どのような提案もお薦めです。

ありがとうございます。

これは私のxmlファイルです。

<RelativeLayout 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:id="@+id/task_list_frag_list_message_layout" 
    android:background="#EBEBEB" 
    android:layout_marginBottom="10dp" 
    android:descendantFocusability ="blocksDescendants" 
    android:layout_marginTop="10dp" 
    android:layout_below="@+id/task_list_text" 
    android:layout_marginLeft="80dp" 
    > 

    <TextView 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:id="@+id/task_list_chat_persion1" 
    android:text="Mr. Test : " 
    android:textSize="18dp" 
    android:layout_marginTop="13dp" 
    android:textColor="@color/sky_blue_color" 
    /> 
    <TextView android:textColor="@color/black_color" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:id="@+id/task_list_chat_text1" 
    android:text="A send you a data file kindly get it." 
    android:textSize="18dp" 
    android:layout_marginTop="13dp" 
    android:layout_toRightOf="@+id/task_list_chat_persion1" 
    /> 

    <TextView 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:id="@+id/task_list_chat_persion2" 
    android:text="Mr. me : " 
    android:textSize="18dp" 
    android:layout_marginTop="13dp" 
    android:layout_below="@+id/task_list_chat_persion1" 
    android:textColor="@color/sky_blue_color" 
    /> 
    <TextView android:textColor="@color/black_color" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:id="@+id/task_list_chat_text2" 
    android:text="I got the data file and i have some doubt in them" 
    android:textSize="18dp" 
    android:layout_marginTop="13dp" 
    android:layout_below="@+id/task_list_chat_persion1" 
    android:layout_toRightOf="@+id/task_list_chat_persion2" 
    /> 


    </RelativeLayout> 

この2行は相対的なlatoutです。 enter image description here

+0

相対レイアウト全体を表示することはできますか? – Siten

答えて

2

私はこれが欲しいと思います... チャットの画像でonClick()イベントを追加してから、TextViewの可視性をコードで目に見えないように設定するだけです。

TextView _text= (TextView)findViewById(R.id.task_list_chat_text); 
     _text.setVisibility(TextView.INVISIBLE); 
1

リストビューで[チャット]ボタンをクリックすると、両方を削除するためにsetTest = ""を空白にする必要があります。 この問題の解決策かもしれません。

+0

レイアウト全体が見えなくなっても動作しません。 – Siten

関連する問題