Skip to main content

Posts

Showing posts with the label onclick

Class cast exception

This Exception mainly occur because when we create an action on click of a button or an action to be performed on start of an activity ,but we forget the write the code in the activity for which we wrote intent to go. for example in  a main.xml file we have 7 buttons. <ScrollView  xmlns:android="http://schemas.android.com/apk/res/android"     android:layout_width="fill_parent"         android:layout_height="fill_parent"         >     <LinearLayout         android:layout_width="fill_parent"         android:layout_height="fill_parent"         android:orientation="vertical"         android:padding="30dp" >         <TextView             android:id="@+id/textView1"             android:layout_width="wrap_content"       ...