Ejemplo n.º 1
0
 /** Inits the piece layout. */
 private void initPieceLayout() {
   Display display = getWindowManager().getDefaultDisplay();
   int width = display.getWidth();
   int height = display.getHeight();
   Debug.i("Screen size: " + width + "x" + height);
   checkScreen(width);
 }
Ejemplo n.º 2
0
 @Override
 public void handleMessage(Message msg) {
   Debug.e("Text " + mInfoTextView.getVisibility() + " " + mInfoTextView.getText());
   super.handleMessage(msg);
   switch (msg.what) {
     case Data.WHAT_THINKING:
       mInfoTextView.setText(getResources().getString(R.string.info_thinking));
       break;
     case Data.WHAT_SOUND:
       playSound(msg.arg1);
       if (msg.obj != null) {
         mInfoTextView.setText((String) msg.obj);
       }
     case Data.WHAT_OTHER:
       mInfoTextView.setText((String) msg.obj);
       break;
   }
 }