Hello I want to make a click listener in a sherlockfragment but every time I click it, it displays "view.class source not found" it doesn't matter what action I do I want to use it to start an intent to change an activity
here is my code:
public class SafanTab extends SherlockFragment {
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
return inflater.inflate(R.layout.safantab, container, false);
}
public void onOverClick(View view) {
Intent myIntent = new Intent(view.getContext(), OverSafan.class);
startActivityForResult(myIntent, 0);
}
public void nProductenClick(View view) {
Intent myIntent = new Intent(view.getContext(), Over_Safan.class);
startActivityForResult(myIntent, 0);
}
public void onTwitterClick(View view) {
Intent myIntent = new Intent(view.getContext(), Over_Safan.class);
startActivityForResult(myIntent, 0);
}
}
I define the listener to the button in the layout xml:
android:onClick="OnOverClick"
I tried it a long time and also searched the internet for "View.class source not found" but can't find anything to solve my problem. As you see in the question I'm using ActionBarSherlock.