이상한 문제가 있습니다. 나는 사용자가 다음 페이지에서 사용할 이미지를 선택할 수있는 Android 앱을 작성 중입니다. 그게 전부 좋은,하지만 난
imageView.setImageBitmap(bitmap);
을 수행 할 때 새로운 이미지가 표시하지만, 기본적으로 내가 디자인 타임에 페이지에 배치 된 버튼을 숨기는 페이지에 수직으로 중앙에있다. 레이아웃은 다음과 같습니다 : 나는 (드로어 블/사진 jeepfront @)를 setBitmap, 디폴트 사진을 호출하지 않을 경우 페이지 상단에, 잘 보여주고 내가 버튼을 볼 수 있습니다
<?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" >
<ImageView
android:id="@+id/imageView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:src="@drawable/jeepfront" />
<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/imageView"
android:layout_centerHorizontal="true"
android:layout_marginTop="46dp"
android:text="Button" />
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/button1"
android:layout_centerHorizontal="true"
android:layout_marginTop="43dp"
android:text="Picture resized/cropped with any buttons"
android:textAppearance="?android:attr/textAppearanceLarge" />
</RelativeLayout>
.
아이디어가 있으십니까? 나는 안드로이드에서 약간의 newby이지만 Java 1.0을 사용하고 있습니다.
덕분에, 데이비드
비트 맵에 대한 정보를 제공하지 않았기 때문에 너비와 높이 (배율이 조정 된 버전)가 화면 뒤의 텍스트 뷰와 함께 버튼을 숨기는 지프 프론트의 값보다 크다고 가정 할 수 있습니다. 이미지 아래에 놓습니다. – Onik