2013-04-30 6 views
0

그래서이 내 레이아웃TextView가 표시되지 않습니다. 왜?

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
android:id="@+id/layout_root" 
android:orientation="vertical" 
android:layout_width="fill_parent" 
android:layout_height="fill_parent" 
android:padding="10dp"> 

<ImageView android:id="@+id/fullimage" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:contentDescription="@string/product_picture"> 
</ImageView> 

<TextView android:id="@+id/custom_fullimage_placename" 
    android:layout_width="fill_parent" 
    android:layout_height="50px" 
    android:textSize="16sp" 
    android:textStyle="bold" 
    android:textColor="#000000" 
    android:layout_weight="1"> 
</TextView> 
</LinearLayout> 

입니다 그리고 이것은 그림과 텍스트를 채우는 코드 : 그러나 나는 텍스트를 표시 할 수 없습니다,

AlertDialog.Builder imageDialog = new AlertDialog.Builder(this); 
    LayoutInflater inflater = (LayoutInflater) this.getSystemService(LAYOUT_INFLATER_SERVICE); 

    View layout = inflater.inflate(R.layout.custom_fullimage_dialog, 
      null); //(ViewGroup) findViewById(R.id.layout_root) 

    System.out.println(text); 
    TextView picText = (TextView) layout.findViewById(R.id.custom_fullimage_placename); 
    picText.setText(text); 

    AQuery aq = new AQuery(layout); 
    Bitmap placeholder = aq.getCachedImage(R.drawable.image_missing); 
    aq.id(R.id.fullimage).image(imageUrl, true, true, 0, R.drawable.image_missing, placeholder, AQuery.FADE_IN_NETWORK, 0); 

    .... 

이미지가 잘 표시됩니다 왜 그런지 모르겠다.

아이디어가 있으십니까?

편집 : 나는 문제들 덕분에 해결

... 나는 이미지에 한계 (300dp하는 폭과 높이를 설정 ..)는 경고 대화 상자 내부에 있기 때문에 어쩌면 그것은 단지이 방식으로 작동을 고정 준 ...

+0

배경이 검은 색입니까? 텍스트 색상을 변경하고 볼 수 있습니다. 짐작. –

+0

자사의 텍스트 색상 .. 그리고 나는 아직 빨간색 아무것도 넣어 – Teshte

+0

android : layout_weight = "1"을 텍스트 뷰에서 제거하십시오 –

답변

0

실제로 텍스트 값을 설정하는 위치가 표시되지 않습니다. 'println'출력에 예상 값이 표시됩니까?

+0

예 ... 로그에 표시된 텍스트의 값이 있습니다. – Teshte

0

실제로 검정색 인 텍스트 뷰 색상을 그냥 짐작하시오.

+0

이 빨간색으로 바뀌 었습니다 ... 아무것도 표시되지 않았습니다. – Teshte

+0

R.layout.layout_root가 아닌 R.layout.custom_fullimage_dialog에서 뷰가 나오는 이유는 무엇입니까? 너 시험 해봤 니? – cgalvao1993

+0

나는 전환을 시도했다. 그러나 그 다음 나는 더 복잡한 실패를 얻는다. 코드가 지금, 적어도 나는 무언가를 가지고있다. – Teshte

관련 문제