Android Open Source - blokish End Game Dialog






From Project

Back to project page blokish.

License

The source code is released under:

GNU General Public License

If you think the Android project blokish listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package org.scoutant.blokish;
//from   ww  w  . j  a  v a  2  s . c  o m
import android.app.Dialog;
import android.content.Context;
import android.view.View;
import android.view.ViewGroup.LayoutParams;
import android.widget.Button;
import android.widget.TextView;

public class EndGameDialog extends Dialog {
  public EndGameDialog(final Context context, boolean redwins, String message, final int level, final int score) {
    super(context);
    setContentView( R.layout.endgame);
    // Cf layout issue http://groups.google.com/group/android-developers/browse_thread/thread/f0bb813f643604ec?pli=1
    getWindow().setLayout( LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT);
    TextView tv = (TextView) findViewById(R.id.message);
    tv.setText( message);
    Button b = (Button) findViewById(R.id.ok);
    b.setOnClickListener( new android.view.View.OnClickListener(){
      public void onClick(View v) {
        EndGameDialog.this.dismiss();
      }
    });
    findViewById(R.id.icons).setVisibility( redwins ? View.VISIBLE : View.GONE);
  }
}




Java Source Code List

org.scoutant.blokish.AppRater.java
org.scoutant.blokish.BusyIndicator.java
org.scoutant.blokish.ButtonsView.java
org.scoutant.blokish.EndGameDialog.java
org.scoutant.blokish.GameView.java
org.scoutant.blokish.Help.java
org.scoutant.blokish.PieceUI.java
org.scoutant.blokish.RateDialog.java
org.scoutant.blokish.Settings.java
org.scoutant.blokish.SplashScreen.java
org.scoutant.blokish.UI.java
org.scoutant.blokish.model.AI.java
org.scoutant.blokish.model.Board.java
org.scoutant.blokish.model.Game.java
org.scoutant.blokish.model.Move.java
org.scoutant.blokish.model.Piece.java
org.scoutant.blokish.model.Square.java