[Solved] findViewById returns null and also : where to define my onClick?

the Problem is here: RadioButton rb = (RadioButton) findViewById(R.id.radio32); You should show which view you are getting the RadioButton, it should be something like this: View v = inflater.inflate(R.layout.your_layout, container, false); RadioButton rb = (RadioButton) v.findViewById(R.id.radio32); 1 solved findViewById returns null and also : where to define my onClick?

[Solved] Listener doesn’t work..It seems the Listener is 0

Extension of my comment above: You need to register the mListener somehow. A pattern to do this is: public class MyHandler { private LoginListener mListener; public MyHandler(LoginListener listener) { mListener = listener; } // … etc… } Where LoginListener is: public interface LoginListener { public void onLoginSuccess(); } And your activity has: public MyActivity implements … Read more