i am encapsulating stuff into a fragment at the moment and run into a problem that is hard to google.
Inside my fragment are some buttons with onClick attributes but they are called on the Activity rather the fragment from the android system – this makes encapsulating a bit clumsy. Is there a way to have the reflection stuff from onClick to call on the fragment? The only solution to this I see at the moment is not to use onClick in the xml and set click-listeners inside the fragment via code.
i am encapsulating stuff into a fragment at the moment and run into a
Share
I spoke to some googlers @ #adl2011 – they recognize the problem and perhaps there will be a fix of that in the future. Until then – one should use .setOnClick in the Fragment.