Back to project page jive-android-core-sdk-example.
The source code is released under:
Apache License
If you think the Android project jive-android-core-sdk-example listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.jivesoftware.example.teams; // w w w . java2 s .c om import android.app.Activity; import com.jivesoftware.example.R; import com.jivesoftware.example.github.dao.Team; import com.jivesoftware.example.listenable.IValueListener; import com.jivesoftware.example.teams.events.TeamPressed; import com.jivesoftware.example.utils.IntentUtils; import static com.jivesoftware.example.teams.TeamsView.Type.TEAM_PRESSED; /** * Created by mark.schisler on 9/22/14. */ public class TeamsPresenter { public static void create(final Activity activity, final TeamsModel model, final TeamsView view) { model.listenable.setListener(new IValueListener<Team[]>() { @Override public void onPost(Team[] teams) { view.setTeams(teams); } }, TeamsModel.Type.TEAM_REFRESH_SUCCESS); view.listenable.setListener(new IValueListener<TeamPressed>() { @Override public void onPost(TeamPressed event) { IntentUtils.startTeamActivity(activity, event.team); } }, TEAM_PRESSED); model.refresh(); activity.getActionBar().setTitle(activity.getString(R.string.teams)); activity.setContentView(view); } }