안녕하세요.

첨부한 파일을 보시면 붉은색으로 표시를 한 부분이 있습니다.

- layout
<RelativeLayout
     android:id="@+id/relativeLayout"
     android:layout_width="fill_parent"
     android:layout_height="fill_parent"
     >
     <TextView
      android:id="@+id/titlebar"
      android:text="TITLE BAR"
      android:layout_width="fill_parent"
      android:layout_height="50dp"
      android:gravity="center"
      android:layout_alignParentTop="true"
      />
     <TextView
      android:id="@+id/menubar"
      android:text="MENU BAR"
      android:layout_width="fill_parent"
      android:layout_height="50dp"
      android:gravity="center"
      android:layout_alignParentBottom="true"
      />
  <FrameLayout
      android:orientation="vertical"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:id="@+id/framelayout"
      android:layout_centerInParent="true"
      android:layout_below="@id/titlebar"
      android:layout_above="@id/menubar"
      >
      <ImageView
       android:id="@+id/backpic"
       android:layout_width="fill_parent"
       android:layout_height="fill_parent"
      />
  </FrameLayout>
 </RelativeLayout>

- java 소스
frameLayout = (FrameLayout)findViewById(R.id.framelayout);
frameLayout.setBackgroundColor(Color.WHITE);
  
  backpic = (ImageView)findViewById(R.id.backpic);
  Bitmap backbm = BitmapFactory.decodeResource(getResources(), R.drawable.testimg);
  backpic.setImageBitmap(backbm);
  backpic.setBackgroundColor(Color.DKGRAY);

제가 하려는건 이미지를 여러개 올리고 캡쳐를 하는것 입니다.
배경이미지를 넣고 그위에 작은 이미지들을 올려서 캡쳐를 하려니
일단 프레임레이아웃을 캡쳐 대상으로 하고 그위에 중앙에 이미지지뷰를 올렸습니다.
그리고 캡쳐를 하려니 프레임레이이웃이 캡쳐가 되어서 이미지 좌우 여백까지 캡쳐가 됩니다.
이미지뷰의 이미지는 종횡비를 유지해야 되어서 프레임에 꽉차게 할 수 없습니다.

어떻게 해야 할지 조그마한 방향 제시라도 부탁드립니다.
즐거운 주말 보내세요.
profile

give & take