2012-03-05 3 views
0

이미지, 텍스트 뷰 및 오른쪽에 2 개의 버튼이있는 목록보기가 있습니다. 두 번째 버튼의 가시성을 설정하면 첫 번째 이미지가로 이동됩니다. 왼쪽과 내가 그 버튼이 이것을 달성하기 위해 button.how 사라의 영역을 채우려는 imageview.but에 겹쳐,가시성이 사라지는 이미지 공간을 채우는 법

<RelativeLayout 
android:layout_width="fill_parent" 
android:layout_height="wrap_content" 
android:gravity="center_vertical" 
android:background="#ffffff"> 
<ImageView 
android:src="@drawable/icon" 
android:layout_width="wrap_content" 
android:layout_height="wrap_content" 
android:id="@+id/messageimageview"/> 
<TextView 
android:text="Some text" 
android:layout_width="wrap_content" 
android:layout_height="wrap_content" 
android:textColor="#000000" 
android:id="@+id/messagetext" 
android:layout_toRightOf="@+id/messageimageview"/> 
<Button 
android:id="@+id/type2btn" 
android:visibility="invisible" 
android:background="@drawable/delete" 
android:layout_width="wrap_content" 
android:layout_height="wrap_content" 
android:layout_alignParentRight="true" 
android:layout_below="@+id/messagetext"/> 
<Button 
android:visibility="invisible" 
android:id="@+id/type1btn" 
android:layout_width="wrap_content" 
android:background="@drawable/apply" 
android:layout_height="wrap_content" 
android:layout_toLeftOf="@+id/type2btn" 
android:layout_below="@+id/messagetext"/> 
</RelativeLayout> 
+2

가 가지고 깔끔한겠습니까 내 XML .. 알려 주시기 바랍니다 목록 항목에 대한 XML. 아마도 가시성을 보이지 않게 설정했을 것입니다. 그렇지 않으면 질문에 코드를 삽입하십시오. –

+0

나는 내 자신의 문제에 대한 해답을 얻었습니다 ... 나는 단지 두 번째 이미지에서 겹쳐지고 가시성을 가지고 작업 할 이미지를 사용했습니다. 나는 공간을 제거 했으니 까 .......... – Girish

답변

0
Use setVisibility(View.INVISIBLE); instead of setVisibility(View.GONE); 
+0

나는 그 공간을 채우기를 원합니다. – Girish

관련 문제