Project

General

Profile

« Previous | Next » 

Revision 10373dc7

Added by Leszek Koltunski over 2 years ago

Progress downloading updates.

View differences:

src/main/java/org/distorted/screens/RubikScreenPlay.java
35 35
import android.widget.LinearLayout;
36 36
import android.widget.PopupWindow;
37 37
import android.widget.RelativeLayout;
38
import android.widget.TextView;
38 39

  
39 40
import org.distorted.network.RubikNetwork;
40 41
import org.distorted.network.RubikUpdates;
......
75 76
  private TransparentButton mPlayButton;
76 77
  private PopupWindow mObjectPopup, mMenuPopup, mPlayPopup;
77 78
  private LinearLayout mPlayLayout;
79
  private TextView mBubbleUpdates;
78 80
  private int mObjectSize, mMenuLayoutWidth, mMenuLayoutHeight, mPlayLayoutWidth;
79 81
  private int mLevelValue;
80 82
  private float mButtonSize, mMenuItemSize, mMenuTextSize;
......
360 362
        }
361 363
      });
362 364

  
365
    mBubbleUpdates = layout.findViewById(R.id.bubbleUpdates);
366
    mBubbleUpdates.setVisibility(View.INVISIBLE);
367

  
363 368
    RubikNetwork network = RubikNetwork.getInstance();
364 369
    network.signUpForUpdates(this);
365 370
    }
......
696 701

  
697 702
  public void receiveUpdate(RubikUpdates updates)
698 703
    {
699
    updates.showDebug();
704
    int num = updates.getNumberOfUpdates();
705

  
706
    if( num>0 )
707
      {
708
      String shownNum = String.valueOf(num);
709
      mBubbleUpdates.setText(shownNum);
710
      mBubbleUpdates.setVisibility(View.VISIBLE);
711
      }
700 712
    }
701 713

  
702 714
///////////////////////////////////////////////////////////////////////////////////////////////////

Also available in: Unified diff