Aqui está o codigo do método que escolhe qual fragment retornar. Ele se baseia no estado do chat para escolher qual fragment retornar.
-- @Override
public Fragment getItem(int position) {
switch (position) {
case 0:
return new FragmentRadio();
case 1:
switch (MyService.IRC_STATUS){
case DISCONNECTED:
return new FragmentLogin();
case CONNECTING:
return new FragmentLogin();
case CONNECTED:
return new FragmentChat();
}
}
return null;
}You received this message because you are subscribed to the Google Groups "Android Brasil - Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to androidbrasil-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.






0 comentários:
Postar um comentário