ImgViewTouch - A 라는 클래스 (커스텀 이미지 뷰임, 이미지 뷰를 상속 받음)
PFrameConfig - B 라는 액티비티 (A의 이미지뷰를 사용할것임)
B의 onCreate 안에
ImgViewTouch ViewPicture = (ImgViewTouch)findViewById(R.id.image_picture);
↑ (A클래스) 변수 이미지뷰 XML
──────────────────────────────────────────────────
하지만 뭐가 잘못되었는지 이런 에러가 뜹니다. 저 라인때문에 에러가 뜹니다.
ERROR/AndroidRuntime(24747): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.beadgrip.primierframe/com.beadgrip.primierframe.PFrameConfig}: java.lang.ClassCastException: android.widget.ImageView
제가 이미지뷰 지정하는걸 잘못했나요??
감사합니다. 해당 부분 레이아웃 입니다.
왠지 A 클래스쪽에 attributeset 메소드값 날릴때 뭔가 잘못되는거 같은 느낌은 드는데요...ㅠㅠ
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#333333"
>
<TextView
android:id="@+id/text_preview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="10dip"
android:layout_gravity="center"
android:text="미리보기"
/>
<ImageView
android:id="@+id/image_frame"
android:layout_width="148dip"
android:layout_height="188dip"
android:layout_gravity="center"
android:scaleType="fitXY"
/>
<!-- picture image Layout -->
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<ImageView
android:id="@+id/image_picture"
android:layout_width="148dip"
android:layout_height="148dip"
android:layout_gravity="center"
android:scaleType="fitXY"
/>
</FrameLayout>
</FrameLayout>
</LinearLayout>




레이아웃 xml을 봐야 알겠네요