2010-08-23 6 views
0

친구의, 내 갤러리보기의 두 끝 부분에 이미지 (뒤로 및 앞으로 이미지)를 놓는 데 도움이 필요합니다. 갤러리를 가로로 스크롤 할 수있는 목록 메뉴가 있습니다. , 그리고이 갤러리는 RelativeLayout에 있습니다. 스크롤없이 갤러리의 두 끝에서 어떻게 이미지를 얻을 수 있습니까?갤러리보기 (오른쪽 및 왼쪽)의 끝에 이미지를 설정하는 방법

미리 감사드립니다.

답변

1

답변은 질문 자체입니다. 양쪽에 imageview을 붙이십시오. 샘플 레이아웃은

<LinearLayout> 
    <ImageView....../> 
    <Gallery .../> 
    <ImageView .../> 
</LinearLayout> 

는 희망이 도움이 아래처럼 보인다.

<LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal"> 
    <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" /> 
    <Gallery android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1"/> 
    <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" /> 
</LinearLayout> 

안드로이드 :에 layout_weight = "1"여기에 매우 중요하다에

+0

+1, 답변 해 주셔서 감사합니다. – MGSenthil

3

나는 프라 빈의 대답을 조금 수정합니다.

+0

답변 해 주셔서 감사합니다. – MGSenthil

관련 문제