Search in sources :

Example 1 with MemberTable

use of se.oort.diplicity.MemberTable in project android-diplicity by zond.

the class GameActivity method showPhaseStates.

public void showPhaseStates() {
    hideAllExcept(R.id.phase_state_view);
    final MemberTable phaseStateView = (MemberTable) findViewById(R.id.phase_state_view);
    phaseStateView.setOnTouchListener(new View.OnTouchListener() {

        @Override
        public boolean onTouch(View view, MotionEvent motionEvent) {
            flickFrameLayout.onTouchEvent(motionEvent);
            phaseStateView.onTouchEvent(motionEvent);
            return true;
        }
    });
    handleReq(phaseStateService.ListPhaseStates(game.ID, phaseMeta.PhaseOrdinal.toString()), new Sendable<MultiContainer<PhaseState>>() {

        @Override
        public void send(MultiContainer<PhaseState> phaseStateMultiContainer) {
            List<PhaseState> phaseStates = new ArrayList<PhaseState>();
            for (SingleContainer<PhaseState> phaseStateSingleContainer : phaseStateMultiContainer.Properties) {
                phaseStates.add(phaseStateSingleContainer.Properties);
            }
            phaseStateView.setPhaseStates(game, phaseMeta, phaseStates);
            phaseStateView.setMembers(GameActivity.this, game, game.Members);
        }
    }, getResources().getString(R.string.loading_phase_settings));
}
Also used : MemberTable(se.oort.diplicity.MemberTable) SingleContainer(se.oort.diplicity.apigen.SingleContainer) MultiContainer(se.oort.diplicity.apigen.MultiContainer) PhaseState(se.oort.diplicity.apigen.PhaseState) List(java.util.List) ArrayList(java.util.ArrayList) NavigationView(android.support.design.widget.NavigationView) UserView(se.oort.diplicity.UserView) View(android.view.View) AdapterView(android.widget.AdapterView) TextView(android.widget.TextView) ListView(android.widget.ListView) ScrollView(android.widget.ScrollView) MotionEvent(android.view.MotionEvent)

Aggregations

NavigationView (android.support.design.widget.NavigationView)1 MotionEvent (android.view.MotionEvent)1 View (android.view.View)1 AdapterView (android.widget.AdapterView)1 ListView (android.widget.ListView)1 ScrollView (android.widget.ScrollView)1 TextView (android.widget.TextView)1 ArrayList (java.util.ArrayList)1 List (java.util.List)1 MemberTable (se.oort.diplicity.MemberTable)1 UserView (se.oort.diplicity.UserView)1 MultiContainer (se.oort.diplicity.apigen.MultiContainer)1 PhaseState (se.oort.diplicity.apigen.PhaseState)1 SingleContainer (se.oort.diplicity.apigen.SingleContainer)1