2014-05-23 7 views
0

[여기에 이미지 설명을 입력하십시오] [1] 각 목록 항목에 대한 사용자 지정 목록보기 및 xml 파일을 사용하고 있지만 내 requirment 당 출력을 제공하지 않습니다 내 목록 항목 xml 파일은 다음과 같습니다. 다음레이아웃이 제대로 표시되지 않습니다

<?xml version="1.0" encoding="utf-8"?> 
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android" 
      android:layout_width="fill_parent" 
      android:height="150dp" 
      android:background="@drawable/bar_bg_thin" 
      android:paddingTop="0dip" android:layout_gravity="top" 
     > 
     <TableRow android:layout_height="match_parent"> 
      <LinearLayout 
        android:layout_width="match_parent" 
        android:layout_height="match_parent" 
        android:paddingLeft="10dp" 
        android:paddingTop="5dp" 
        android:paddingBottom="5dp" 
        > 
       <ImageView 
       android:layout_gravity="left|top" 
        android:scaleType="centerCrop" 
        android:id="@+id/image" 
        android:src="@drawable/stub" 
        android:layout_width="100dp" 
        android:layout_height="fill_parent" 
        /> 
       </LinearLayout> 
    <TableLayout 
      android:layout_width="fill_parent" 
      android:layout_height="wrap_content" 
      android:paddingTop="0dip" android:layout_gravity="top" 
      > 
      <TableRow>  
       <TextView 
        android:id="@+id/text" 
        android:layout_height="wrap_content" 
        android:layout_width="wrap_content" 
        android:layout_weight="1" android:layout_gravity="left|center_vertical" 
        android:textSize="14sp" 
        android:layout_marginLeft="10dip" 
        android:layout_marginTop="2dip" 
        android:textColor="#000000" 
        android:layout_span="1" 
        /> 
       </TableRow> 
       <TableRow>   
       <TextView 
        android:text="" 
        android:id="@+id/text1" 
        android:layout_height="wrap_content" 
        android:layout_width="wrap_content" 
        android:layout_weight="1" 
        android:layout_gravity="left|center_vertical" 
        android:textSize="11sp" 
        android:textColor="#000000" 
        android:layout_marginLeft="10dip" 
        android:layout_marginTop="4dip" 
        android:gravity="left"/> 
       </TableRow> 
      </TableLayout> 


     </TableRow> 
</TableLayout> 

그것은 내가 전체보기없는 반에서 이미지 표시를 원하는 나는 또한

내가 원하는이 목록 항목의 높이를 높이려는 내가 이미지를 서버에서 실행을로드하고 자사의 전체보기에 이미지를 표시하지 않습니다 이미지를 전체 크기로 표시하고 목록보기의 각 항목의 크기를 늘리려는 경우

+0

당신이 –

+0

나에게 UR 전자 메일을주고 원하는 레이아웃의 스크린 샷을주세요 나는 내가 당신의 스크린 샷을 보낸 나 이미지 – user3269550

+0

을 업로드 허용하지 않습니다 여기에 유에게 이미지를 보내드립니다 내 레이아웃 – user3269550

답변

0

이 시도,

<?xml version="1.0" encoding="utf-8"?> 
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:layout_width="fill_parent" 
    android:layout_height="150dp" 
    android:layout_gravity="top" 
    android:paddingTop="0dip" > 

    <TableRow 
     android:layout_width="match_parent" 
     android:layout_height="match_parent" 
     android:background="@android:color/holo_blue_light" > 

     <LinearLayout 
      android:layout_width="match_parent" 
      android:layout_height="match_parent" 
      android:paddingBottom="5dp" 
      android:paddingLeft="10dp" 
      android:paddingTop="5dp" > 

      <ImageView 
       android:id="@+id/image" 
       android:layout_width="100dp" 
       android:layout_height="match_parent" 
       android:layout_gravity="left|top" 
       android:scaleType="fitXY" 
       android:src="@drawable/ic_launcher" /> 
     </LinearLayout> 

     <TableLayout 
      android:layout_width="fill_parent" 
      android:layout_height="wrap_content" 
      android:layout_gravity="top" 
      android:paddingTop="0dip" > 

      <TableRow> 

       <TextView 
        android:id="@+id/text" 
        android:layout_width="wrap_content" 
        android:layout_height="wrap_content" 
        android:layout_gravity="left|center_vertical" 
        android:layout_marginLeft="10dip" 
        android:layout_marginTop="2dip" 
        android:layout_span="1" 
        android:layout_weight="1" 
        android:textColor="#000000" 
        android:textSize="14sp" /> 
      </TableRow> 

      <TableRow> 

       <TextView 
        android:id="@+id/text1" 
        android:layout_width="wrap_content" 
        android:layout_height="wrap_content" 
        android:layout_gravity="left|center_vertical" 
        android:layout_marginLeft="10dip" 
        android:layout_marginTop="4dip" 
        android:layout_weight="1" 
        android:gravity="left" 
        android:text="" 
        android:textColor="#000000" 
        android:textSize="11sp" /> 
      </TableRow> 
     </TableLayout> 
    </TableRow> 

</TableLayout> 
+0

변경 사항이 작동하지만 최대 크기로 이미지를 표시하고 – user3269550

+0

의 크기가 증가하지 않습니다. –

+0

android : layout_width ="100dp "를 제거하고 android : layout_width ="wrap_content "를 표시하려면 행의 크기를 늘리지 않아도 행 –

관련 문제