<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<syc.solution.hellobus.customView.ZoneMakeWithCircle
android:id="@+id/zoneMkCircle"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
</syc.solution.hellobus.customView.ZoneMakeWithCircle>
</RelativeLayout>
이렇게 사용하니 java.lang.ClassCastExcepion: android.widget.LinearLayout$LayoutParams
가 뜨는데 Params를 어떻게 해야할지 모르겟습니다 ㅠ
도와주세요 ㅠ
m_zoneGuider.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT));
이렇게 했습니다 ㅠ
m_zoneGuider 이게 ZoneMakeWithCircle 클래스 객체인가요?
아니면 RelativeLayout인가요?
분명한것은 자신의 상위 레이아웃의 layoutparams를 사용해야 한다는것입니다.
예를 들어 상위 레이아웃이 RelativeLayout이라면 new RelativeLayout.LayoutParams 가 되겠죠....
PanelZoneSaveCircle extends PanelBase의
init메서드 안에
LayoutInflater inflt = LayoutInflater.from(m_context);
inflt.inflate(R.layout.layout_zone_save_circle, this);
m_zoneGuider.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
가 있구
PanelZoneSaveCircle 가 상속받은 PanelBase는
public abstract class PanelBase extends LinearLayout 를 상속합니다 ㅠ




저건 레이아웃이 말썽이 아니고 저 커스텀 뷰가 말썽인거 같은데요...
커스텀뷰에 layoutparams를 사용하는 부분이 있는데 그걸 잘못쓴듯합니다.
그게 아니라면 저 RelativeLayout을 inflate해서 다른 Layout에 배치하는 과정에서 layoutparams를 잘못썼거나요....