Skip to content

Commit

Permalink
replaced support library with androidX. versionCode 26, versionName 1…
Browse files Browse the repository at this point in the history
….1.0c
  • Loading branch information
timo-a committed Aug 4, 2019
1 parent 927da60 commit a2beae6
Show file tree
Hide file tree
Showing 37 changed files with 165 additions and 144 deletions.
1 change: 0 additions & 1 deletion sudoq-app/.idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion sudoq-app/Playaround/Playaround.iml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,5 @@
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="sudoqmodel" exported="" />
<orderEntry type="module" module-name="sudoqmodel" exported="" />
</component>
</module>
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,6 @@ public Sudoku getSudoku() {
public List<Solution> getSolutions(){
return solutions;
}
public void printDebugMsg() {
(new Generator()).printDebugMsg();
}

public Random getRandom() {
return random;
Expand Down
2 changes: 1 addition & 1 deletion sudoq-app/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
include ':sudoqmodel', ':ExperimentsOnPC', ':Playaround', ':external'
include ':sudoqmodel', ':Playaround'
include ':sudoqapp'
8 changes: 4 additions & 4 deletions sudoq-app/sudoqapp/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ android {

dependencies {
implementation project(':sudoqmodel')
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support:cardview-v7:28.0.0'
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation 'com.google.android.material:material:1.0.0'
//implementation 'androidx.cardview:cardview:1.0.0'
//implementation 'androidx.appcompat:appcompat:1.0.0'
//implementation 'androidx.recyclerview:recyclerview:1.0.0'


//compile 'com.android.support:support-v4:21.0.0'
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="24"
android:versionName="1.1.0a"
android:versionCode="26"
android:versionName="1.1.0c"
android:installLocation="auto" >

<application
Expand Down Expand Up @@ -42,7 +42,7 @@
<activity android:name=".controller.tutorial.TutorialActivity" android:label="@string/sf_tutorial_sudoku_title"/>

<provider
android:name="android.support.v4.content.FileProvider"
android:name="androidx.core.content.FileProvider"
android:authorities="de.sudoq.fileprovider"
android:grantUriPermissions="true"
android:exported="false">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package de.sudoq.controller;

import android.support.design.widget.AppBarLayout;
import android.support.design.widget.CoordinatorLayout;
import com.google.android.material.appbar.AppBarLayout;
import androidx.coordinatorlayout.widget.CoordinatorLayout;
import android.view.MotionEvent;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import androidx.appcompat.app.AppCompatActivity;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import androidx.appcompat.app.AppCompatActivity;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.ActionBar;
import android.support.v7.widget.Toolbar;
import androidx.appcompat.app.ActionBar;
import androidx.appcompat.widget.Toolbar;
import android.view.View;
import android.widget.Button;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.ActionBar;
import android.support.v7.widget.Toolbar;
import androidx.appcompat.app.ActionBar;
import androidx.appcompat.widget.Toolbar;
import android.util.Log;
import android.view.View;
import android.widget.AdapterView;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public class SplashActivity extends SudoqCompatActivity {

private final static String VERSION_TAG = "version";
private final static String NO_VERSION_YET = "0.0.0";
protected final static String NEWEST_ASSET_VERSION = "1.1.0a";
protected final static String NEWEST_ASSET_VERSION = "1.1.0b";

private static String currentVersionName = "";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
package de.sudoq.controller.menus;

import android.os.Bundle;
import android.support.v7.app.ActionBar;
import android.support.v7.widget.Toolbar;
import androidx.appcompat.app.ActionBar;
import androidx.appcompat.widget.Toolbar;
import android.widget.TextView;

import de.sudoq.R;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.os.Bundle;
import android.support.design.widget.FloatingActionButton;
import android.support.v4.content.ContextCompat;
import android.support.v4.content.FileProvider;
import android.support.v7.app.ActionBar;
import android.support.v7.widget.Toolbar;
import com.google.android.material.floatingactionbutton.FloatingActionButton;
import androidx.core.content.ContextCompat;
import androidx.core.content.FileProvider;
import androidx.appcompat.app.ActionBar;
import androidx.appcompat.widget.Toolbar;
import android.util.Log;
import android.view.Menu;
import android.view.MenuInflater;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.ActionBar;
import android.support.v7.widget.Toolbar;
import androidx.appcompat.app.ActionBar;
import androidx.appcompat.widget.Toolbar;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.ActionBar;
import android.support.v7.widget.Toolbar;
import androidx.appcompat.app.ActionBar;
import androidx.appcompat.widget.Toolbar;
import android.view.View;
import android.widget.CheckBox;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.ActionBar;
import android.support.v7.widget.Toolbar;
import androidx.appcompat.app.ActionBar;
import androidx.appcompat.widget.Toolbar;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

import android.content.res.Configuration;
import android.os.Bundle;
import android.support.v7.app.ActionBar;
import android.support.v7.widget.Toolbar;
import androidx.appcompat.app.ActionBar;
import androidx.appcompat.widget.Toolbar;
import android.util.Log;
import android.view.Menu;
import android.view.MenuInflater;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import android.app.Dialog;
import android.content.DialogInterface;
import android.os.Bundle;
import android.support.v4.app.DialogFragment;
import android.support.v7.app.AlertDialog;
import androidx.fragment.app.DialogFragment;
import androidx.appcompat.app.AlertDialog;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
Expand All @@ -16,14 +16,10 @@
import de.sudoq.R;
import de.sudoq.controller.sudoku.hints.HintFormulator;
import de.sudoq.model.actionTree.Action;
import de.sudoq.model.game.Assistances;
import de.sudoq.model.game.Game;
import de.sudoq.model.profile.Profile;
import de.sudoq.model.solverGenerator.solution.SolveDerivation;
import de.sudoq.model.solvingAssistant.SolvingAssistant;
import de.sudoq.model.sudoku.Constraint;
import de.sudoq.model.sudoku.Field;
import de.sudoq.model.sudoku.sudokuTypes.SudokuType;
import de.sudoq.view.SudokuFieldView;
import de.sudoq.view.SudokuLayout;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

import android.content.res.Configuration;
import android.os.Bundle;
import android.support.annotation.LayoutRes;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.util.Log;
import androidx.annotation.LayoutRes;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;

import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
import android.graphics.Color;
import android.os.Bundle;
import android.os.Handler;
import android.support.v4.app.DialogFragment;
import android.support.v4.app.FragmentManager;
import android.support.v7.app.ActionBar;
import android.support.v7.widget.Toolbar;
import androidx.fragment.app.DialogFragment;
import androidx.fragment.app.FragmentManager;
import androidx.appcompat.app.ActionBar;
import androidx.appcompat.widget.Toolbar;
import android.util.Log;
import android.view.Gravity;
import android.view.Menu;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package de.sudoq.controller.sudoku.hints;

import android.content.Context;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.util.Log;

import java.util.BitSet;
Expand All @@ -19,11 +21,15 @@
import de.sudoq.model.sudoku.Field;
import de.sudoq.model.sudoku.Sudoku;
import de.sudoq.model.sudoku.Utils;
import de.sudoq.model.sudoku.Utils.ConstraintShape;

/**
* Created by timo on 04.10.16.
*/
public class HintFormulator {

private static final String LOG_TAG = "HintFormulator";

public static String getText(Context context, SolveDerivation sd){
String text;
Log.d("HintForm",sd.getType().toString());
Expand Down Expand Up @@ -97,8 +103,10 @@ private static boolean aFieldIsEmpty(SudokuActivity sActivity){

private static String lastDigitText(Context context, SolveDerivation sd){
LastDigitDerivation d = (LastDigitDerivation) sd;
String shapeString = Utility.constraintShapeAccDet2string(context, d.getConstraintShape());
String shapeGender = Utility.getGender(context,d.getConstraintShape());
ConstraintShape cs = d.getConstraintShape();

String shapeString = Utility.constraintShapeAccDet2string(context, cs);
String shapeGender = Utility.getGender(context, cs);
String shapeDeterminer = Utility.gender2AccDeterminer(context, shapeGender);
String highlightSuffix = Utility.gender2AccSufix(context, shapeGender);
return context.getString(R.string.hint_lastdigit).replace("{shape}" ,shapeString)
Expand All @@ -114,11 +122,28 @@ private static String lastCandidateText(Context context, SolveDerivation sd){

private static String leftoverNoteText(Context context, SolveDerivation sd){
LeftoverNoteDerivation d = (LeftoverNoteDerivation) sd;
ConstraintShape cs = d.getConstraintShape();

String shapeString = Utility.constraintShapeAccDet2string(context, Utils.getGroupShape(d.getConstraint()));
String shapeString = Utility.constraintShapeAccDet2string(context, cs);
String shapeGender = Utility.getGender(context,cs);
String shapeDeterminer = Utility.gender2AccDeterminer(context, shapeGender);
String highlightSuffix = Utility.gender2AccSufix(context, shapeGender);


int versionNumber = -1;
try {
PackageInfo pinfo = context.getPackageManager().getPackageInfo(context.getPackageName(), 0);
versionNumber = pinfo.versionCode;

} catch (PackageManager.NameNotFoundException e) {
e.printStackTrace();
}
Log.d(LOG_TAG, "leftovernotetext is called. and versionNumber is: " + versionNumber);

return context.getString(R.string.hint_leftovernote).replace("{note}", d.getNote()+1+"")
.replace("{shape}", shapeString) ;
.replace("{shape}", shapeString)
.replace("{determiner}" ,shapeDeterminer)
.replace("{suffix}" ,highlightSuffix);
}

private static String nakedSingleText(Context context, SolveDerivation sd){
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package de.sudoq.controller.tutorial;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import androidx.fragment.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package de.sudoq.controller.tutorial;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import androidx.fragment.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package de.sudoq.controller.tutorial;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import androidx.fragment.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@
package de.sudoq.controller.tutorial;

import android.os.Bundle;
import android.support.design.widget.CoordinatorLayout;
import android.support.design.widget.TabLayout;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.support.v4.view.ViewPager;
import android.support.v7.app.ActionBar;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import androidx.coordinatorlayout.widget.CoordinatorLayout;
import com.google.android.material.tabs.TabLayout;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentPagerAdapter;
import androidx.viewpager.widget.ViewPager;
import androidx.appcompat.app.ActionBar;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import android.view.Menu;
import android.view.MotionEvent;
import android.view.View;
Expand Down
Loading

0 comments on commit a2beae6

Please sign in to comment.