2013-03-14 2 views
0

실제로 나는 이미지 묶음을 가지고 있으며 목록보기에 표시되도록 내 이미지를 내 사용자 지정 배열 어댑터에 전달하고 있습니다. 목록보기에서 이미지를 멋지게 보여줍니다. 하지만 내가 원하는 것은 한 번에 하나의 이미지가 전체 화면으로 목록에 표시되도록하는 것입니다. (100 %) 행 전체 화면 활동을 표시하고 싶습니다. 나는 2 일 동안 그것을 낭비했고, 여전히 해결책을 얻지 못한다.목록 항목을 단일 액티비티로 전체 화면으로 설정하는 방법은 무엇입니까?

Relative 레이아웃 (id = subparent)에서 android : layout_height = "wrap_content"를 제공 할 때 android : layout_height = "430dp"를 주면 겹쳐서 내가 원하는 것을 얻지 못할 것입니다. 필요. 하지만 그 장치를 실행할 장치를 모르기 때문에 그렇게 할 수는 없습니까?

내 XML 파일은 다음과 같습니다 :

<?xml version="1.0" encoding="utf-8"?> 
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    > 

    <RelativeLayout 
     android:id="@+id/subparent" 
     android:layout_width="fill_parent" 
     android:layout_height="wrap_content" 
     android:layout_alignParentBottom="true" 
     android:layout_alignParentTop="true" > 

     <ImageView 
      android:id="@+id/imageView1" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      android:layout_centerInParent="true" 
      android:src="@drawable/img2" /> 

     <FrameLayout 
      android:id="@+id/flbotom" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      android:background="@drawable/bottom_nav" 
      android:layout_alignParentBottom="true"> 
     </FrameLayout> 

    </RelativeLayout> 

</RelativeLayout> 
+0

"fill_parent"를 사용해 보셨습니까? – KunalK

+0

예 fill_parent, wrap_content, match_parent를 모두 사용했지만 중복 된 프리젠 테이션을 제공합니다. –

+0

루트 'RelativeLayout'에 정적 높이를주고 자식 요소에'match_parent'를 설정해야합니다. 그렇지 않으면 전체 화면에서 단일 행을 갖기가 어렵습니다. – Naveen

답변

0

는 단순히 가짜 전망을 넣어 이것에 대한 해결책을 발견했다.

+0

이 작업 솔루션을 제공 할 수 있습니까? – bShah

+0

두 가지 방법이 있습니다. 1) 전체 화면을 채우는 방식으로 하나의 목록 항목에 가짜보기를 넣을 수 있습니다. 2) 항목을 고정 높이로 설정할 수 있습니다. 이 방법으로 장치 화면 해상도와 관련하여 차원 폴더에서 각 목록 항목의 높이 값을 설정해야합니다. 480x800, 540x960, 720x1280, .. 등 –