Android Open Source - Sudoku-Solver Main Activity






From Project

Back to project page Sudoku-Solver.

License

The source code is released under:

Apache License

If you think the Android project Sudoku-Solver 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 com.awhittle.sudokusolver;
/*from  www .j a v a  2s .c o m*/
import android.os.Bundle;
import android.view.View;
import android.app.Activity;
import android.content.Intent;


public class MainActivity extends Activity {

  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
  }
  
  public void gotoClear(View v){
    Intent intent = new Intent(this, ClearActivity.class);
    startActivity(intent);
  }
  
  public void gotoSolve(View v){
    Intent intent = new Intent(this, SolveActivity.class);
    startActivity(intent);
  }
  
  public void gotoDisplay(View v){
    Intent intent = new Intent(this, DisplayActivity.class);
    startActivity(intent);
  }
  
  
  public void gotoS1(View v){
    Grid.setRowCol(0, 0);
    Intent intent = new Intent(this, SectorActivity.class);
    startActivity(intent);
  }
  
  public void gotoS2(View v){
    Grid.setRowCol(0, 3);
    Intent intent = new Intent(this, SectorActivity.class);
    startActivity(intent);
  }
  
  public void gotoS3(View v){
    Grid.setRowCol(0, 6);
    Intent intent = new Intent(this, SectorActivity.class);
    startActivity(intent);
  }
  
  public void gotoS4(View v){
    Grid.setRowCol(3, 0);
    Intent intent = new Intent(this, SectorActivity.class);
    startActivity(intent);
  }
  
  public void gotoS5(View v){
    Grid.setRowCol(3, 3);
    Intent intent = new Intent(this, SectorActivity.class);
    startActivity(intent);
  }
  
  public void gotoS6(View v){
    Grid.setRowCol(3, 6);
    Intent intent = new Intent(this, SectorActivity.class);
    startActivity(intent);
  }
  
  public void gotoS7(View v){
    Grid.setRowCol(6, 0);
    Intent intent = new Intent(this, SectorActivity.class);
    startActivity(intent);
  }
  
  public void gotoS8(View v){
    Grid.setRowCol(6, 3);
    Intent intent = new Intent(this, SectorActivity.class);
    startActivity(intent);
  }
  
  public void gotoS9(View v){
    Grid.setRowCol(6, 6);
    Intent intent = new Intent(this, SectorActivity.class);
    startActivity(intent);
  }
}




Java Source Code List

com.awhittle.sudokusolver.ClearActivity.java
com.awhittle.sudokusolver.DisplayActivity.java
com.awhittle.sudokusolver.EditActivity.java
com.awhittle.sudokusolver.Grid.java
com.awhittle.sudokusolver.MainActivity.java
com.awhittle.sudokusolver.SectorActivity.java
com.awhittle.sudokusolver.SolveActivity.java
com.awhittle.sudokusolver.Solve.java