use of se.oort.diplicity.apigen.PhaseResult in project android-diplicity by zond.
the class GameActivity method showPhaseResults.
public void showPhaseResults() {
setVisibility(View.GONE, R.id.nmr_members, R.id.nmr_members_label, R.id.active_members, R.id.active_members_label, R.id.ready_members, R.id.ready_members_label);
hideAllExcept(R.id.phase_results_view);
final ScrollView phaseResultsView = (ScrollView) findViewById(R.id.phase_results_view);
phaseResultsView.setOnTouchListener(new View.OnTouchListener() {
@Override
public boolean onTouch(View view, MotionEvent motionEvent) {
flickFrameLayout.onTouchEvent(motionEvent);
phaseResultsView.onTouchEvent(motionEvent);
return true;
}
});
if (phaseMeta.Resolved) {
handleReq(phaseResultService.PhaseResultLoad(game.ID, phaseMeta.PhaseOrdinal.toString()), new Sendable<SingleContainer<PhaseResult>>() {
@Override
public void send(SingleContainer<PhaseResult> phaseResultSingleContainer) {
MemberListPopulater populater = new MemberListPopulater();
if (phaseResultSingleContainer.Properties.NMRUsers != null) {
populater.populate(R.id.nmr_members, phaseResultSingleContainer.Properties.NMRUsers);
setVisibility(View.VISIBLE, R.id.nmr_members, R.id.nmr_members_label);
}
if (phaseResultSingleContainer.Properties.ActiveUsers != null) {
populater.populate(R.id.active_members, phaseResultSingleContainer.Properties.ActiveUsers);
setVisibility(View.VISIBLE, R.id.active_members, R.id.active_members_label);
}
if (phaseResultSingleContainer.Properties.ReadyUsers != null) {
populater.populate(R.id.ready_members, phaseResultSingleContainer.Properties.ReadyUsers);
setVisibility(View.VISIBLE, R.id.ready_members, R.id.ready_members_label);
}
}
}, new ErrorHandler(404, new Sendable<HttpException>() {
@Override
public void send(HttpException e) {
}
}), getResources().getString(R.string.loading_phase_result));
}
}
Aggregations