Skip to content

Commit

Permalink
1.0.11c
Browse files Browse the repository at this point in the history
  • Loading branch information
timo-a committed Aug 10, 2017
1 parent 6a0f44d commit d038b41
Show file tree
Hide file tree
Showing 38 changed files with 638 additions and 302 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import android.app.Activity;
import de.sudoq.R;
import de.sudoq.controller.menus.MainActivity;
import de.sudoq.controller.menus.NewSudokuConfigurationActivity;
import de.sudoq.controller.menus.NewSudokuActivity;
import de.sudoq.controller.sudoku.SudokuActivity;

public class CrossActivityTests extends SudoqTestCase {
Expand All @@ -28,7 +28,7 @@ public void testSudokuStarting() {
* assert we're in the right activity
*/
solo.clickOnText(newSudoku);
solo.assertCurrentActivity("should be sudokupreferences", NewSudokuConfigurationActivity.class);
solo.assertCurrentActivity("should be sudokupreferences", NewSudokuActivity.class);
assertTrue(solo.searchText(a.getString(R.string.complexity_easy)));
assertTrue(solo.searchText(a.getString(R.string.sudoku_type_standard_9x9)));
assertTrue(solo.searchText(a.getString(R.string.sf_sudokupreferences_start)));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import de.sudoq.controller.menus.MainActivity;
import de.sudoq.controller.menus.StatisticsActivity;
import de.sudoq.controller.menus.SudokuLoadingActivity;
import de.sudoq.controller.menus.NewSudokuConfigurationActivity;
import de.sudoq.controller.menus.NewSudokuActivity;
import de.sudoq.controller.menus.preferences.PlayerPreferencesActivity;
import de.sudoq.controller.sudoku.SudokuActivity;

Expand All @@ -32,7 +32,7 @@ public void testMenus() {
assertTrue(solo.searchText(profile));

solo.clickOnText(newSudoku);
solo.assertCurrentActivity("should be sudokupreferences", NewSudokuConfigurationActivity.class);
solo.assertCurrentActivity("should be sudokupreferences", NewSudokuActivity.class);
assertTrue(solo.searchText(a.getString(R.string.complexity_easy)));
assertTrue(solo.searchText(a.getString(R.string.sudoku_type_standard_9x9)));
assertTrue(solo.searchText(a.getString(R.string.sf_sudokupreferences_start)));
Expand Down Expand Up @@ -63,7 +63,7 @@ public void testMenus() {
public void testAssistanceBeforeSudoku() {
solo.sleep(2000);
solo.clickOnText(solo.getCurrentActivity().getString(R.string.sf_mainmenu_new_sudoku));
solo.assertCurrentActivity("should be sudokupreferences", NewSudokuConfigurationActivity.class);
solo.assertCurrentActivity("should be sudokupreferences", NewSudokuActivity.class);

solo.clickOnText(solo.getCurrentActivity().getString(R.string.sf_sudokupreferences_assistances));
// solo.assertCurrentActivity("should be playerpreferences",
Expand All @@ -74,7 +74,7 @@ public void testAssistanceBeforeSudoku() {
// solo.clickOnCheckBox(checkBox.getId());
// solo.clickOnCheckBox(checkBox.getId());
solo.clickOnText(solo.getCurrentActivity().getString(R.string.profile_preference_button_save));
solo.assertCurrentActivity("should be sudokupreferences", NewSudokuConfigurationActivity.class);
solo.assertCurrentActivity("should be sudokupreferences", NewSudokuActivity.class);

solo.clickOnText(solo.getCurrentActivity().getString(R.string.sf_sudokupreferences_start));
solo.assertCurrentActivity("should be in sudoku", SudokuActivity.class);
Expand Down Expand Up @@ -105,7 +105,7 @@ public void testSudokuLoading() {
Activity a = solo.getCurrentActivity();

solo.clickOnText(a.getString(R.string.sf_mainmenu_new_sudoku));
solo.assertCurrentActivity("should be sudokupreferences", NewSudokuConfigurationActivity.class);
solo.assertCurrentActivity("should be sudokupreferences", NewSudokuActivity.class);
solo.clickOnText(solo.getCurrentActivity().getString(R.string.sf_sudokupreferences_start));
solo.assertCurrentActivity("should be in sudoku", SudokuActivity.class);
solo.goBack();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import android.app.Activity;
import de.sudoq.R;
import de.sudoq.controller.menus.NewSudokuConfigurationActivity;
import de.sudoq.controller.menus.NewSudokuActivity;
import de.sudoq.controller.sudoku.SudokuActivity;

/**
Expand All @@ -16,7 +16,7 @@ public void testStartTheGame() {
Activity a = getActivity();

solo.clickOnText(a.getString(R.string.sf_mainmenu_new_sudoku));
solo.assertCurrentActivity("should be sudokupreferences", NewSudokuConfigurationActivity.class);
solo.assertCurrentActivity("should be sudokupreferences", NewSudokuActivity.class);
assertTrue(solo.searchText(a.getString(R.string.complexity_easy)));
assertTrue(solo.searchText(a.getString(R.string.sudoku_type_standard_9x9)));
assertTrue(solo.searchText(a.getString(R.string.sf_sudokupreferences_start)));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import android.view.View;
import de.sudoq.R;
import de.sudoq.controller.menus.NewSudokuConfigurationActivity;
import de.sudoq.controller.menus.NewSudokuActivity;
import de.sudoq.controller.sudoku.SudokuActivity;
import de.sudoq.view.SudokuFieldView;

Expand All @@ -11,7 +11,7 @@ public class SudokuActivityTests extends SudoqTestCase {
// AT20
public void testSudokuSolveHelp() {
solo.clickOnText(solo.getCurrentActivity().getString(R.string.sf_mainmenu_new_sudoku));
solo.assertCurrentActivity("should be sudokupreferences", NewSudokuConfigurationActivity.class);
solo.assertCurrentActivity("should be sudokupreferences", NewSudokuActivity.class);
solo.clickOnText(solo.getCurrentActivity().getString(R.string.sf_sudokupreferences_start));
solo.assertCurrentActivity("should be in sudoku", SudokuActivity.class);

Expand All @@ -27,7 +27,7 @@ public void testSudokuSolveHelp() {
// AT 40
public void testSudokuTime() {
solo.clickOnText(solo.getCurrentActivity().getString(R.string.sf_mainmenu_new_sudoku));
solo.assertCurrentActivity("should be sudokupreferences", NewSudokuConfigurationActivity.class);
solo.assertCurrentActivity("should be sudokupreferences", NewSudokuActivity.class);
solo.clickOnText(solo.getCurrentActivity().getString(R.string.sf_sudokupreferences_start));
solo.assertCurrentActivity("should be in sudoku", SudokuActivity.class);

Expand Down Expand Up @@ -66,7 +66,7 @@ public void testSudokuTime() {
// AT80
public void testIsValidToast() {
solo.clickOnText(solo.getCurrentActivity().getString(R.string.sf_mainmenu_new_sudoku));
solo.assertCurrentActivity("should be sudokupreferences", NewSudokuConfigurationActivity.class);
solo.assertCurrentActivity("should be sudokupreferences", NewSudokuActivity.class);
solo.clickOnText(solo.getCurrentActivity().getString(R.string.sf_sudokupreferences_start));
solo.assertCurrentActivity("should be in sudoku", SudokuActivity.class);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package de.sudoq.test;

import de.sudoq.R;
import de.sudoq.controller.menus.NewSudokuConfigurationActivity;
import de.sudoq.controller.menus.NewSudokuActivity;
import de.sudoq.controller.sudoku.SudokuActivity;
import de.sudoq.model.profile.Profile;
import de.sudoq.model.sudoku.Field;
Expand All @@ -13,7 +13,7 @@ public class SudokuInteractionTest extends SudoqTestCase {
// MT30-MT80, MT100
public void testFieldSelection() {
solo.clickOnText(solo.getCurrentActivity().getString(R.string.sf_mainmenu_new_sudoku));
solo.assertCurrentActivity("should be sudokupreferences", NewSudokuConfigurationActivity.class);
solo.assertCurrentActivity("should be sudokupreferences", NewSudokuActivity.class);
solo.clickOnText(solo.getCurrentActivity().getString(R.string.sf_sudokupreferences_start));
solo.assertCurrentActivity("should be in sudoku", SudokuActivity.class);

Expand Down Expand Up @@ -85,7 +85,7 @@ public void testFieldSelection() {
// AT100
public void testUndoRedo() {
solo.clickOnText(solo.getCurrentActivity().getString(R.string.sf_mainmenu_new_sudoku));
solo.assertCurrentActivity("should be sudokupreferences", NewSudokuConfigurationActivity.class);
solo.assertCurrentActivity("should be sudokupreferences", NewSudokuActivity.class);
solo.clickOnText(solo.getCurrentActivity().getString(R.string.sf_sudokupreferences_start));
solo.assertCurrentActivity("should be in sudoku", SudokuActivity.class);

Expand Down
6 changes: 3 additions & 3 deletions sudoq-app/sudoqapp/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<!-- This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="de.sudoq"
android:versionCode="18"
android:versionName="1.0.10b"
android:versionCode="21"
android:versionName="1.0.11c"
android:installLocation="auto" >

<uses-sdk android:minSdkVersion="8" />
Expand All @@ -26,7 +26,7 @@
</activity>
<activity android:name=".controller.SudoqCompatActivity" />
<activity android:name=".controller.menus.MainActivity" />
<activity android:name=".controller.menus.NewSudokuConfigurationActivity" android:label="@string/sf_sudokupreferences_title"/>
<activity android:name=".controller.menus.NewSudokuActivity" android:label="@string/sf_sudokupreferences_title"/>
<activity android:name=".controller.menus.preferences.NewSudokuPreferencesActivity" android:label="@string/sf_sudokupreferences_title"/>
<activity android:name=".controller.menus.SudokuLoadingActivity" android:label="@string/sf_sudokuloading_title"
android:noHistory="true"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import de.sudoq.controller.SudoqCompatActivity;
import de.sudoq.controller.menus.preferences.PlayerPreferencesActivity;
import de.sudoq.controller.sudoku.SudokuActivity;
import de.sudoq.model.game.GameManager;
import de.sudoq.model.profile.Profile;

/**
Expand Down Expand Up @@ -65,8 +66,10 @@ public void onResume() {
Button continueButton = (Button) findViewById(R.id.button_mainmenu_continue);
continueButton.setEnabled(p.getCurrentGame() > Profile.NO_GAME);


GameManager gm = GameManager.getInstance();
Button loadButton = (Button) findViewById(R.id.button_mainmenu_load_sudoku);
loadButton.setEnabled(p.getCurrentGame() > Profile.NO_GAME);
loadButton.setEnabled(!gm.getGameList().isEmpty());

}

Expand All @@ -80,7 +83,7 @@ public void onResume() {
public void switchActivity(View button) {
switch (button.getId()) {
case R.id.button_mainmenu_new_sudoku:
Intent newSudokuIntent = new Intent(this, NewSudokuConfigurationActivity.class);
Intent newSudokuIntent = new Intent(this, NewSudokuActivity.class);
startActivity(newSudokuIntent);
break;

Expand All @@ -101,13 +104,4 @@ public void switchActivity(View button) {
break;
}
}

/*
* {@inheritDoc}
*/
// @Override
// public void onConfigurationChanged(Configuration newConfig) {
// super.onConfigurationChanged(newConfig);
// setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
// }
}
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@
*
* Hauptmenü -> "neues Sudoku" führt hierher
*/
public class NewSudokuConfigurationActivity extends SudoqCompatActivity {
public class NewSudokuActivity extends SudoqCompatActivity {

/** Attributes */

private static final String LOG_TAG = NewSudokuConfigurationActivity.class.getSimpleName();
private static final String LOG_TAG = NewSudokuActivity.class.getSimpleName();

private SudokuTypes sudokuType;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public class ProfileListActivity extends SudoqListActivity implements OnItemClic
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.profilelist);
setContentView(R.layout.profilelist);
this.setTitle(this.getString(R.string.action_switch_profile));

profileIds = Profile.getInstance().getProfilesIdList();
Expand Down
Loading

0 comments on commit d038b41

Please sign in to comment.