Today, I create a extension successfully but when i open the app . it gives me this error.
What I am trying to do
i am trying to create this layout programatically
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<aryan.gupta.DesignView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/page1">
</aryan.gupta.DesignView>
</LinearLayout>
here is my java code
LinearLayout ll = new LinearLayout(context);
ll.setOrientation(LinearLayout.VERTICAL);
ll.setLayoutParams(new LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));
initprocess = (View) ll;
designView = (DesignView) initprocess;
ll.addView(designView);
Question
why i am getting this error - Linear Layout cannot be cast to Class
Hope someone help me soon