2011-12-23 2 views
1

사라 먼저 이미지 뷰에서 ListViewActivity있는 ListViewItem 레이아웃

<?xml version="1.0" encoding="utf-8"?> 
<LinearLayout 
    xmlns:android="http://schemas.android.com/apk/res/android" 
    android:orientation="horizontal" 
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    android:gravity="center_vertical" 
    android:background="@drawable/list_single" > 

    <TextView 
     android:id="@+id/listUp_RecipeInstructionNumberTextBoxId" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:textColor="@color/header_orange" 
     android:text="1" 
     android:textSize="30dip" /> 

    <TextView 
     android:id="@+id/listUp_RecipeInstructioTextTextBoxId" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:layout_marginLeft="15dp" 
     android:text="This is the instruction info" 
     android:textSize="14dip" /> 

    <ImageView 
     android:layout_height="56dp" 
     android:layout_width="63dp" 
     android:id="@+id/listUp_RecipeInstructionImageViewId" 
     android:layout_marginLeft="15dp" 
     android:layout_weight="1" /> 

</LinearLayout> 

에있는 ListViewItem에 사용되는 내 레이아웃 가시성에 =입니다. 그런 다음 사용자는 카메라를 사용하여 사진을 찍고 ImageView 가시성은 VISIBILE이며 촬영 한 사진을 사용하도록 ImageView를 업데이트합니다.

TextView가 비어있는 경우 - 해당 텍스트는 corrent 크기로 표시됩니다. 그러나 ListViewItem의 끝에 도달하는 텍스트 (긴 텍스트와 처음에는 ImageView가 Visibilite Gone에 있음)를 가져 와서 사진을 찍으면 잘못된 크기로 표시됩니다. 훨씬 작음

어떻게 해결할 수 있습니까?

+0

직면 한 문제의 스크린 샷을 게시하십시오. 당신의 설명은별로 좋지 않습니다. –

+0

기기에서 캡쳐 화면을받을 수 있습니까? – Yoav

+0

에뮬레이터를 사용하고 스크린 샷 찍기 –

답변

1

큰 textview의 경우이 android:layout_weight="1"을 사용하고 imageView의 가중치를 제거하십시오.

+0

감사합니다. 그것은 잘 작동 :) :) :) :) :) – Yoav

관련 문제