Android Open Source - TuxPuz Image Puzzle






From Project

Back to project page TuxPuz.

License

The source code is released under:

GNU General Public License

If you think the Android project TuxPuz 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.pkh.tuxpuz;
//from w  w w .jav  a  2  s.co m
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.Window;
import android.widget.Button;
import android.widget.RadioGroup;
import android.widget.RadioGroup.OnCheckedChangeListener;
import android.widget.TextView;

public class ImagePuzzle extends Activity {

  RadioGroup myRadioGroup;
  TextView myTextView;
  Button goButton;
  
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        setContentView(R.layout.image_puzzle);
        
        myRadioGroup  =(RadioGroup) findViewById(R.id.myRadioGroup);
        myTextView    =(TextView) findViewById(R.id.selected);
        goButton    =(Button) findViewById(R.id.go_btn);
        
        myRadioGroup.setOnCheckedChangeListener(new OnCheckedChangeListener() {
      
      @Override
      public void onCheckedChanged(RadioGroup group, int checkedId) {
        // TODO Auto-generated method stub
        if(checkedId==R.id.radio_btn_3x3){
          myTextView.setText("3x3 selected");
        }
        if(checkedId==R.id.radio_btn_4x4){
          myTextView.setText("4x4 selected");        
        }
        if(checkedId==R.id.radio_btn_5x5){
          myTextView.setText("5x5 selected");
        }
        if(checkedId==R.id.radio_btn_6x6){
          myTextView.setText("6x6 selected");
        }
      }
    });
        
        goButton.setOnClickListener(new OnClickListener() {
      
      @Override
      public void onClick(View v) {
        // TODO Auto-generated method stub
        int checkedid=myRadioGroup.getCheckedRadioButtonId();
        if(checkedid==R.id.radio_btn_3x3){
          Intent intent=new Intent(getApplicationContext(), Puzzle_3X3.class);
          startActivity(intent);
        }
        if(checkedid==R.id.radio_btn_4x4){
          myTextView.setText("4x4 selected btn");    
          Intent intent=new Intent(getApplicationContext(), Puzzle_4x4.class);
          startActivity(intent);
        }
        if(checkedid==R.id.radio_btn_5x5){
          myTextView.setText("5x5 selected btn");
          Intent intent=new Intent(getApplicationContext(), Puzzle_3x3_medium.class);
          startActivity(intent);
        }
        if(checkedid==R.id.radio_btn_6x6){
          myTextView.setText("6x6 selected btn");
          //Intent intent=new Intent(getApplicationContext(),Puzzle_4x4_medium.class);
          Intent intent=new Intent(getApplicationContext(),GeekSelector.class);
          startActivity(intent);
        }
      }
    });
        
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.image_puzzle, menu);
        return true;
    }
}




Java Source Code List

com.CustomizedClasses.pkh.CustomDialogSucces.java
com.CustomizedClasses.pkh.CustomizeArrayList.java
com.CustomizedClasses.pkh.ShuffleClass.java
com.Database.pkh.PuzzleDatabase.java
com.fragment.pkh.Frag_example.java
com.fragment.pkh.MenuFragment.java
com.helperclass_medium.pkh.GestureSwipe_medium.java
com.helperclass_medium.pkh.SpriteSheet.java
com.helperclasses.pkh.GestureSwipe_easy.java
com.helperclasses.pkh.SpriteSheet.java
com.pkh.tuxpuz.AnimProjt.java
com.pkh.tuxpuz.FacebookPage.java
com.pkh.tuxpuz.FragmentActivity.java
com.pkh.tuxpuz.GeekSelector.java
com.pkh.tuxpuz.HelpView.java
com.pkh.tuxpuz.ImagePuzzle.java
com.pkh.tuxpuz.MenuScreen.java
com.pkh.tuxpuz.Puzzle_3X3.java
com.pkh.tuxpuz.Puzzle_3x3_medium.java
com.pkh.tuxpuz.Puzzle_4x4.java
com.pkh.tuxpuz.Puzzle_4x4_medium.java
com.pkh.tuxpuz.SelectionClass.java
com.pkh.tuxpuz.SpecialTuxLevel.java
com.pkh.tuxpuz.SplashScreen.java