Migrated to AndroidX. Performance improvements. Adaptive Icon added.
Fixes #51, Fixes #38, Fixes #8
|
@ -1,8 +1,7 @@
|
|||
apply plugin: 'com.android.application'
|
||||
|
||||
android {
|
||||
compileSdkVersion 25
|
||||
buildToolsVersion '26.0.3'
|
||||
compileSdkVersion 29
|
||||
|
||||
testOptions {
|
||||
unitTests.returnDefaultValues = true
|
||||
|
@ -11,9 +10,10 @@ android {
|
|||
defaultConfig {
|
||||
applicationId "org.secuso.privacyfriendlysudoku"
|
||||
minSdkVersion 16
|
||||
targetSdkVersion 25
|
||||
targetSdkVersion 29
|
||||
versionCode 6
|
||||
versionName "2.1.2"
|
||||
vectorDrawables.useSupportLibrary = true
|
||||
}
|
||||
buildTypes {
|
||||
release {
|
||||
|
@ -22,19 +22,19 @@ android {
|
|||
}
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_7
|
||||
targetCompatibility JavaVersion.VERSION_1_7
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile fileTree(include: ['*.jar'], dir: 'libs')
|
||||
testCompile 'junit:junit:4.12'
|
||||
compile 'com.android.support:support-compat:25.3.1'
|
||||
compile 'com.android.support:support-v4:25.3.1'
|
||||
compile 'com.android.support:support-v13:25.3.1'
|
||||
compile 'com.android.support:appcompat-v7:25.3.1'
|
||||
compile 'com.android.support:design:25.3.1'
|
||||
compile 'com.android.support:support-core-ui:25.3.1'
|
||||
compile 'com.android.support:support-core-utils:25.3.1'
|
||||
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
||||
testImplementation 'junit:junit:4.12'
|
||||
implementation 'androidx.core:core:1.2.0'
|
||||
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
||||
implementation 'androidx.legacy:legacy-support-v13:1.0.0'
|
||||
implementation 'androidx.appcompat:appcompat:1.1.0'
|
||||
implementation 'com.google.android.material:material:1.1.0'
|
||||
implementation 'androidx.legacy:legacy-support-core-ui:1.0.0'
|
||||
implementation 'androidx.legacy:legacy-support-core-utils:1.0.0'
|
||||
}
|
||||
|
|
|
@ -2,12 +2,15 @@
|
|||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="org.secuso.privacyfriendlysudoku.ui.view">
|
||||
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/AppTheme">
|
||||
android:theme="@style/AppTheme"
|
||||
android:name="org.secuso.privacyfriendlysudoku.SudokuApp">
|
||||
<activity
|
||||
android:name="org.secuso.privacyfriendlysudoku.ui.SplashActivity"
|
||||
android:theme="@style/SplashTheme">
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
package org.secuso.privacyfriendlysudoku;
|
||||
|
||||
import android.app.Application;
|
||||
import android.app.NotificationChannel;
|
||||
import android.app.NotificationChannelGroup;
|
||||
import android.app.NotificationManager;
|
||||
import android.content.Context;
|
||||
import android.os.Build;
|
||||
|
||||
import androidx.appcompat.app.AppCompatDelegate;
|
||||
|
||||
public class SudokuApp extends Application {
|
||||
|
||||
public static final String CHANNEL_ID = "sudoku.0";
|
||||
|
||||
@Override
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
AppCompatDelegate.setCompatVectorFromResourcesEnabled(true);
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
// channels
|
||||
NotificationChannel channel = new NotificationChannel(CHANNEL_ID, "Default", NotificationManager.IMPORTANCE_LOW);
|
||||
|
||||
NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
|
||||
if (notificationManager != null) {
|
||||
notificationManager.createNotificationChannel(channel);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -2,32 +2,25 @@ package org.secuso.privacyfriendlysudoku.controller;
|
|||
|
||||
import android.app.IntentService;
|
||||
import android.app.PendingIntent;
|
||||
import android.app.Service;
|
||||
import android.content.Intent;
|
||||
import android.os.Handler;
|
||||
import android.os.IBinder;
|
||||
import android.os.Looper;
|
||||
import android.support.annotation.IntDef;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v4.content.ContextCompat;
|
||||
import android.support.v7.app.NotificationCompat;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.core.app.NotificationCompat;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import android.util.Log;
|
||||
import android.util.Pair;
|
||||
|
||||
import org.secuso.privacyfriendlysudoku.SudokuApp;
|
||||
import org.secuso.privacyfriendlysudoku.controller.database.DatabaseHelper;
|
||||
import org.secuso.privacyfriendlysudoku.controller.database.model.Level;
|
||||
import org.secuso.privacyfriendlysudoku.controller.qqwing.Action;
|
||||
import org.secuso.privacyfriendlysudoku.controller.qqwing.PrintStyle;
|
||||
import org.secuso.privacyfriendlysudoku.controller.qqwing.QQWing;
|
||||
import org.secuso.privacyfriendlysudoku.controller.qqwing.Symmetry;
|
||||
import org.secuso.privacyfriendlysudoku.game.GameBoard;
|
||||
import org.secuso.privacyfriendlysudoku.game.GameDifficulty;
|
||||
import org.secuso.privacyfriendlysudoku.game.GameType;
|
||||
import org.secuso.privacyfriendlysudoku.ui.MainActivity;
|
||||
import org.secuso.privacyfriendlysudoku.ui.view.R;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.IllegalFormatCodePointException;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
|
@ -255,7 +248,7 @@ public class GeneratorService extends IntentService {
|
|||
}
|
||||
|
||||
private void showNotification(GameType gameType, GameDifficulty gameDifficulty) {
|
||||
NotificationCompat.Builder builder = new NotificationCompat.Builder(this);
|
||||
NotificationCompat.Builder builder = new NotificationCompat.Builder(this, SudokuApp.CHANNEL_ID);
|
||||
builder.setContentTitle(getString(R.string.app_name));
|
||||
builder.setContentText(getString(R.string.generating));
|
||||
builder.setSubText(getString(gameType.getStringResID()) + ", " + getString(gameDifficulty.getStringResID()));
|
||||
|
|
|
@ -39,7 +39,7 @@ public class DatabaseHelper extends SQLiteOpenHelper {
|
|||
onUpgrade(db, oldVersion, newVersion);
|
||||
}
|
||||
|
||||
public List<Level> getLevels(GameDifficulty difficulty, GameType gameType) {
|
||||
public synchronized List<Level> getLevels(GameDifficulty difficulty, GameType gameType) {
|
||||
if(difficulty == null || gameType == null) {
|
||||
throw new IllegalArgumentException("Arguments may not be null");
|
||||
}
|
||||
|
@ -72,7 +72,7 @@ public class DatabaseHelper extends SQLiteOpenHelper {
|
|||
return levelList;
|
||||
}
|
||||
|
||||
public Level getLevel(GameDifficulty difficulty, GameType gameType) {
|
||||
public synchronized Level getLevel(GameDifficulty difficulty, GameType gameType) {
|
||||
List<Level> levelList = getLevels(difficulty, gameType);
|
||||
if(levelList.size() == 0) {
|
||||
throw new IllegalArgumentException("There is no level");
|
||||
|
@ -80,7 +80,7 @@ public class DatabaseHelper extends SQLiteOpenHelper {
|
|||
return levelList.get(0);
|
||||
}
|
||||
|
||||
public void deleteLevel(int id) {
|
||||
public synchronized void deleteLevel(int id) {
|
||||
SQLiteDatabase database = getWritableDatabase();
|
||||
|
||||
String selection = LevelColumns._ID + " = ?";
|
||||
|
@ -89,7 +89,7 @@ public class DatabaseHelper extends SQLiteOpenHelper {
|
|||
database.delete(LevelColumns.TABLE_NAME, selection, selectionArgs);
|
||||
}
|
||||
|
||||
public long addLevel(Level level) {
|
||||
public synchronized long addLevel(Level level) {
|
||||
SQLiteDatabase database = getWritableDatabase();
|
||||
return database.insert(LevelColumns.TABLE_NAME, null, LevelColumns.getValues(level));
|
||||
}
|
||||
|
|
|
@ -2,14 +2,11 @@ package org.secuso.privacyfriendlysudoku.game;
|
|||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import android.support.annotation.NonNull;
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.ListIterator;
|
||||
|
||||
import org.secuso.privacyfriendlysudoku.game.listener.IModelChangedListener;
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ package org.secuso.privacyfriendlysudoku.game;
|
|||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import android.support.annotation.StringRes;
|
||||
import androidx.annotation.StringRes;
|
||||
|
||||
import java.util.LinkedList;
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ package org.secuso.privacyfriendlysudoku.ui;
|
|||
|
||||
import android.graphics.Color;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import android.os.Bundle;
|
||||
import android.text.method.LinkMovementMethod;
|
||||
import android.view.MenuItem;
|
||||
|
@ -22,7 +22,7 @@ public class AboutActivity extends BaseActivity {
|
|||
((TextView)findViewById(R.id.githubURL)).setMovementMethod(LinkMovementMethod.getInstance());
|
||||
((TextView)findViewById(R.id.textFieldVersionName)).setText(BuildConfig.VERSION_NAME);
|
||||
|
||||
android.support.v7.app.ActionBar actionBar = getSupportActionBar();
|
||||
androidx.appcompat.app.ActionBar actionBar = getSupportActionBar();
|
||||
actionBar.setTitle(R.string.menu_about);
|
||||
actionBar.setDisplayHomeAsUpEnabled(true);
|
||||
actionBar.setBackgroundDrawable(new ColorDrawable(Color.parseColor("#024265")));
|
||||
|
|
|
@ -3,11 +3,11 @@ package org.secuso.privacyfriendlysudoku.ui;
|
|||
import android.content.res.Configuration;
|
||||
import android.os.Bundle;
|
||||
import android.preference.PreferenceActivity;
|
||||
import android.support.annotation.LayoutRes;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v7.app.ActionBar;
|
||||
import android.support.v7.app.AppCompatDelegate;
|
||||
import android.support.v7.widget.Toolbar;
|
||||
import androidx.annotation.LayoutRes;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.ActionBar;
|
||||
import androidx.appcompat.app.AppCompatDelegate;
|
||||
import androidx.appcompat.widget.Toolbar;
|
||||
import android.view.MenuInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
|
|
@ -2,8 +2,8 @@ package org.secuso.privacyfriendlysudoku.ui;
|
|||
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import android.view.View;
|
||||
|
||||
import org.secuso.privacyfriendlysudoku.ui.view.R;
|
||||
|
|
|
@ -12,12 +12,12 @@ import android.graphics.Point;
|
|||
import android.os.Bundle;
|
||||
import android.preference.PreferenceActivity;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.support.design.widget.NavigationView;
|
||||
import android.support.v4.view.GravityCompat;
|
||||
import android.support.v4.widget.DrawerLayout;
|
||||
import android.support.v7.app.ActionBarDrawerToggle;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.support.v7.widget.Toolbar;
|
||||
import com.google.android.material.navigation.NavigationView;
|
||||
import androidx.core.view.GravityCompat;
|
||||
import androidx.drawerlayout.widget.DrawerLayout;
|
||||
import androidx.appcompat.app.ActionBarDrawerToggle;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.appcompat.widget.Toolbar;
|
||||
import android.view.Gravity;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
|
@ -27,7 +27,6 @@ import android.widget.Button;
|
|||
import android.widget.LinearLayout;
|
||||
import android.widget.RatingBar;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import org.secuso.privacyfriendlysudoku.controller.GameController;
|
||||
import org.secuso.privacyfriendlysudoku.controller.GameStateManager;
|
||||
|
@ -46,10 +45,8 @@ import org.secuso.privacyfriendlysudoku.ui.view.SudokuKeyboardLayout;
|
|||
import org.secuso.privacyfriendlysudoku.ui.view.SudokuSpecialButtonLayout;
|
||||
import org.secuso.privacyfriendlysudoku.ui.view.WinDialog;
|
||||
|
||||
import java.util.IllegalFormatCodePointException;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.RunnableFuture;
|
||||
|
||||
public class GameActivity extends BaseActivity implements NavigationView.OnNavigationItemSelectedListener, IGameSolvedListener ,ITimerListener, IHintDialogFragmentListener, IResetDialogFragmentListener {
|
||||
|
||||
|
|
|
@ -2,29 +2,18 @@ package org.secuso.privacyfriendlysudoku.ui;
|
|||
|
||||
|
||||
import android.annotation.TargetApi;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.res.Configuration;
|
||||
import android.media.Ringtone;
|
||||
import android.media.RingtoneManager;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.preference.ListPreference;
|
||||
import android.preference.Preference;
|
||||
import android.preference.PreferenceActivity;
|
||||
import android.support.v7.app.ActionBar;
|
||||
import androidx.appcompat.app.ActionBar;
|
||||
import android.preference.PreferenceFragment;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.preference.RingtonePreference;
|
||||
import android.text.TextUtils;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
|
||||
import org.secuso.privacyfriendlysudoku.ui.view.R;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* A {@link PreferenceActivity} that presents a set of application settings. On
|
||||
* handset devices, settings are presented as a single list. On tablets,
|
||||
|
|
|
@ -45,7 +45,7 @@ public class LoadGameActivity extends BaseActivity implements IDeleteDialogFragm
|
|||
|
||||
setContentView(R.layout.activity_load_game);
|
||||
|
||||
android.support.v7.app.ActionBar actionBar = getSupportActionBar();
|
||||
androidx.appcompat.app.ActionBar actionBar = getSupportActionBar();
|
||||
actionBar.setTitle(R.string.menu_continue_game);
|
||||
actionBar.setDisplayHomeAsUpEnabled(true);
|
||||
|
||||
|
|
|
@ -1,25 +1,20 @@
|
|||
package org.secuso.privacyfriendlysudoku.ui;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.Dialog;
|
||||
import android.app.DialogFragment;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.os.Bundle;
|
||||
import android.preference.PreferenceActivity;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.support.design.widget.NavigationView;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.support.v4.app.FragmentManager;
|
||||
import android.support.v4.app.FragmentPagerAdapter;
|
||||
import android.support.v4.view.GravityCompat;
|
||||
import android.support.v4.view.ViewPager;
|
||||
import android.support.v4.widget.DrawerLayout;
|
||||
import android.support.v7.app.ActionBarDrawerToggle;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.support.v7.widget.Toolbar;
|
||||
import com.google.android.material.navigation.NavigationView;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
import androidx.fragment.app.FragmentPagerAdapter;
|
||||
import androidx.core.view.GravityCompat;
|
||||
import androidx.viewpager.widget.ViewPager;
|
||||
import androidx.drawerlayout.widget.DrawerLayout;
|
||||
import androidx.appcompat.app.ActionBarDrawerToggle;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.appcompat.widget.Toolbar;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
|
@ -37,7 +32,6 @@ import org.secuso.privacyfriendlysudoku.game.GameDifficulty;
|
|||
import org.secuso.privacyfriendlysudoku.game.GameType;
|
||||
import org.secuso.privacyfriendlysudoku.ui.view.R;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ import android.os.Bundle;
|
|||
import android.preference.ListPreference;
|
||||
import android.preference.Preference;
|
||||
import android.preference.PreferenceActivity;
|
||||
import android.support.v7.app.ActionBar;
|
||||
import androidx.appcompat.app.ActionBar;
|
||||
import android.preference.PreferenceFragment;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.view.MenuItem;
|
||||
|
|
|
@ -2,7 +2,7 @@ package org.secuso.privacyfriendlysudoku.ui;
|
|||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
/**
|
||||
* Created by yonjuni on 22.10.16.
|
||||
|
|
|
@ -4,12 +4,16 @@ import android.content.Context;
|
|||
import android.graphics.Color;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.os.Bundle;
|
||||
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.widget.Toolbar;
|
||||
import com.google.android.material.tabs.TabLayout;
|
||||
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
import androidx.fragment.app.FragmentPagerAdapter;
|
||||
import androidx.fragment.app.FragmentStatePagerAdapter;
|
||||
import androidx.viewpager.widget.PagerAdapter;
|
||||
import androidx.viewpager.widget.ViewPager;
|
||||
import androidx.appcompat.widget.Toolbar;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
|
@ -30,12 +34,12 @@ import java.util.List;
|
|||
public class StatsActivity extends BaseActivity {
|
||||
|
||||
/**
|
||||
* The {@link android.support.v4.view.PagerAdapter} that will provide
|
||||
* The {@link PagerAdapter} that will provide
|
||||
* fragments for each of the sections. We use a
|
||||
* {@link FragmentPagerAdapter} derivative, which will keep every
|
||||
* loaded fragment in memory. If this becomes too memory intensive, it
|
||||
* may be best to switch to a
|
||||
* {@link android.support.v4.app.FragmentStatePagerAdapter}.
|
||||
* {@link FragmentStatePagerAdapter}.
|
||||
*/
|
||||
private SectionsPagerAdapter mSectionsPagerAdapter;
|
||||
|
||||
|
@ -52,10 +56,10 @@ public class StatsActivity extends BaseActivity {
|
|||
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
|
||||
setSupportActionBar(toolbar);
|
||||
|
||||
android.support.v7.app.ActionBar actionBar = getSupportActionBar();
|
||||
androidx.appcompat.app.ActionBar actionBar = getSupportActionBar();
|
||||
actionBar.setTitle(R.string.menu_highscore);
|
||||
actionBar.setDisplayHomeAsUpEnabled(true);
|
||||
actionBar.setBackgroundDrawable(new ColorDrawable(Color.parseColor("#024265")));
|
||||
//actionBar.setBackgroundDrawable(new ColorDrawable(ContextCompat.getColor(this, R.color.colorPrimary)));
|
||||
|
||||
// Create the adapter that will return a fragment for each of the three
|
||||
// primary sections of the activity.
|
||||
|
|
|
@ -5,9 +5,9 @@ import android.content.Intent;
|
|||
import android.graphics.Color;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.view.PagerAdapter;
|
||||
import android.support.v4.view.ViewPager;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import androidx.viewpager.widget.PagerAdapter;
|
||||
import androidx.viewpager.widget.ViewPager;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import android.text.Html;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package org.secuso.privacyfriendlysudoku.ui.view;
|
||||
|
||||
import android.support.annotation.DrawableRes;
|
||||
import androidx.annotation.DrawableRes;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
|
|
@ -53,6 +53,21 @@ public class SudokuCellView extends View {
|
|||
mRow = gameCell.getRow();
|
||||
mCol = gameCell.getCol();
|
||||
this.size = size;
|
||||
|
||||
initLayoutParams();
|
||||
}
|
||||
|
||||
private void initLayoutParams() {
|
||||
if(this.params == null) {
|
||||
params = new RelativeLayout.LayoutParams(mWidth, mHeight);
|
||||
}
|
||||
|
||||
// Set Layout
|
||||
params.width = mWidth;
|
||||
params.height = mHeight;
|
||||
params.topMargin = mRow*mHeight;
|
||||
params.leftMargin = mCol*mWidth;
|
||||
this.setLayoutParams(params);
|
||||
}
|
||||
|
||||
public void setSymbols(Symbol s) {
|
||||
|
@ -74,21 +89,17 @@ public class SudokuCellView extends View {
|
|||
return true;
|
||||
}*/
|
||||
|
||||
@Override
|
||||
protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
|
||||
super.onLayout(changed, left, top, right, bottom);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDraw(Canvas canvas) {
|
||||
super.onDraw(canvas);
|
||||
|
||||
if(this.params == null) {
|
||||
params = new RelativeLayout.LayoutParams(mWidth, mHeight);
|
||||
}
|
||||
|
||||
// Set Layout
|
||||
params.width = mWidth;
|
||||
params.height = mHeight;
|
||||
params.topMargin = mRow*mHeight;
|
||||
params.leftMargin = mCol*mWidth;
|
||||
this.setLayoutParams(params);
|
||||
|
||||
// Draw single Field
|
||||
drawInfo(canvas);
|
||||
}
|
||||
|
|
|
@ -5,7 +5,6 @@ import android.content.SharedPreferences;
|
|||
import android.graphics.Canvas;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.Paint;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
|
@ -134,7 +133,6 @@ public class SudokuFieldLayout extends RelativeLayout implements IHighlightChang
|
|||
@Override
|
||||
protected void onLayout(boolean changed, int l, int t, int r, int b) {
|
||||
super.onLayout(changed,l,t,r,b);
|
||||
|
||||
isWidthLimiting = r-l == Math.min(r-l, b-t);
|
||||
|
||||
if(changed && gameController != null) {
|
||||
|
|
36
app/src/main/res/drawable/ic_launcher_foreground.xml
Normal file
|
@ -0,0 +1,36 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="512dp"
|
||||
android:height="512dp"
|
||||
android:viewportWidth="512"
|
||||
android:viewportHeight="512">
|
||||
<path
|
||||
android:pathData="M174.65,41.63h13.43v429.87h-13.43z"
|
||||
android:fillColor="#fff"/>
|
||||
<path
|
||||
android:pathData="M322.42,41.63h13.43v429.87h-13.43z"
|
||||
android:fillColor="#fff"/>
|
||||
<path
|
||||
android:pathData="M40.31,337.17l0,-13.43l429.87,-0l0,13.43z"
|
||||
android:fillColor="#fff"/>
|
||||
<path
|
||||
android:pathData="M40.31,189.4l0,-13.43l429.87,-0l0,13.43z"
|
||||
android:fillColor="#fff"/>
|
||||
<path
|
||||
android:pathData="M94.05,68.49h40.3V55.06H94.05a26.87,26.87 0,0 0,0 53.73h13.43a13.44,13.44 0,1 1,0 26.87H67.18v13.43h40.3a26.87,26.87 0,0 0,0 -53.73H94.05a13.44,13.44 0,0 1,0 -26.87Z"
|
||||
android:fillColor="#fff"/>
|
||||
<path
|
||||
android:pathData="M262,206.19h-40.3v94L262,300.19a26.86,26.86 0,0 0,26.86 -26.87v-40.3A26.86,26.86 0,0 0,262 206.19ZM262,286.79L235.1,286.79L235.1,219.62L262,219.62a13.43,13.43 0,0 1,13.43 13.43v40.3A13.43,13.43 0,0 1,262 286.79Z"
|
||||
android:fillColor="#fff"/>
|
||||
<path
|
||||
android:pathData="M406.38,206.19L392.94,206.19a26.86,26.86 0,0 0,-26.86 26.86v40.3a26.86,26.86 0,0 0,26.86 26.87h13.44a26.87,26.87 0,0 0,26.86 -26.87v-40.3A26.87,26.87 0,0 0,406.38 206.19ZM419.81,273.35a13.48,13.48 0,0 1,-13.43 13.44L392.94,286.79a13.47,13.47 0,0 1,-13.43 -13.44v-40.3a13.47,13.47 0,0 1,13.43 -13.43h13.44a13.48,13.48 0,0 1,13.43 13.43Z"
|
||||
android:fillColor="#fff"/>
|
||||
<path
|
||||
android:pathData="M134.35,374.01l0,0l0,0l0,0l0,-9.5l-9.36,0l-0.04,0.1l-0.1,-0.1l-37.91,37.91l-6.32,6.32l0,-12.56l0,-31.67l-13.44,0l0,19.82l0,17.34l0,20.51l0,17.64l0,18.72l13.44,0l0,-30.8l6.45,-6.45l37.78,37.25l0,0l9.5,0l0,-9.36l-37.85,-37.33l37.84,-37.84l0.01,0z"
|
||||
android:fillColor="#fff"/>
|
||||
<path
|
||||
android:pathData="M275.4,58.42v60.45a20.15,20.15 0,1 1,-40.3 0V58.42H221.67v60.45a33.58,33.58 0,1 0,67.16 0V58.42Z"
|
||||
android:fillColor="#fff"/>
|
||||
<path
|
||||
android:pathData="M275.4,364.51V425a20.15,20.15 0,1 1,-40.3 0V364.51H221.67V425a33.58,33.58 0,1 0,67.16 0V364.51Z"
|
||||
android:fillColor="#fff"/>
|
||||
</vector>
|
57
app/src/main/res/drawable/ic_launcher_foreground_shadow.xml
Normal file
|
@ -0,0 +1,57 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:aapt="http://schemas.android.com/aapt"
|
||||
android:width="512dp"
|
||||
android:height="512dp"
|
||||
android:viewportWidth="512"
|
||||
android:viewportHeight="512">
|
||||
<path
|
||||
android:pathData="M510.91,471.7V216.47L336.27,41.83H323.68V93.05L289.26,58.62H275.82v40.3l-40.3,-40.3H222.09l0,16.77L188.51,41.83H175.07l0.12,54.69L134.35,55.68 88.6,62 71.8,76.25l2.52,17.64 5,6.71 -5.88,-0.84 38.62,38.62 -44.49,-2.52V149.3l27,27 -53.83,-0.1V189.6L174.23,323.09H40.74v14.28l26.87,26.86v94L121.34,512H470.61A40.42,40.42 0,0 0,510.91 471.7Z">
|
||||
<aapt:attr name="android:fillColor">
|
||||
<gradient
|
||||
android:startY="43.94"
|
||||
android:startX="119.85"
|
||||
android:endY="551.52"
|
||||
android:endX="412.9"
|
||||
android:type="linear">
|
||||
<item android:offset="0" android:color="#FF004492"/>
|
||||
<item android:offset="0.22" android:color="#F9004593"/>
|
||||
<item android:offset="0.39" android:color="#E8024894"/>
|
||||
<item android:offset="0.55" android:color="#C9044E97"/>
|
||||
<item android:offset="0.7" android:color="#A007569B"/>
|
||||
<item android:offset="0.84" android:color="#6B0A60A0"/>
|
||||
<item android:offset="0.97" android:color="#280F6CA6"/>
|
||||
<item android:offset="1" android:color="#19106FA8"/>
|
||||
</gradient>
|
||||
</aapt:attr>
|
||||
</path>
|
||||
<path
|
||||
android:pathData="M174.65,41.63h13.43v429.87h-13.43z"
|
||||
android:fillColor="#fff"/>
|
||||
<path
|
||||
android:pathData="M322.42,41.63h13.43v429.87h-13.43z"
|
||||
android:fillColor="#fff"/>
|
||||
<path
|
||||
android:pathData="M40.31,337.17l0,-13.43l429.87,-0l0,13.43z"
|
||||
android:fillColor="#fff"/>
|
||||
<path
|
||||
android:pathData="M40.31,189.4l0,-13.43l429.87,-0l0,13.43z"
|
||||
android:fillColor="#fff"/>
|
||||
<path
|
||||
android:pathData="M94.05,68.49h40.3V55.06H94.05a26.87,26.87 0,0 0,0 53.73h13.43a13.44,13.44 0,1 1,0 26.87H67.18v13.43h40.3a26.87,26.87 0,0 0,0 -53.73H94.05a13.44,13.44 0,0 1,0 -26.87Z"
|
||||
android:fillColor="#fff"/>
|
||||
<path
|
||||
android:pathData="M262,206.19h-40.3v94L262,300.19a26.86,26.86 0,0 0,26.86 -26.87v-40.3A26.86,26.86 0,0 0,262 206.19ZM262,286.79L235.1,286.79L235.1,219.62L262,219.62a13.43,13.43 0,0 1,13.43 13.43v40.3A13.43,13.43 0,0 1,262 286.79Z"
|
||||
android:fillColor="#fff"/>
|
||||
<path
|
||||
android:pathData="M406.38,206.19L392.94,206.19a26.86,26.86 0,0 0,-26.86 26.86v40.3a26.86,26.86 0,0 0,26.86 26.87h13.44a26.87,26.87 0,0 0,26.86 -26.87v-40.3A26.87,26.87 0,0 0,406.38 206.19ZM419.81,273.35a13.48,13.48 0,0 1,-13.43 13.44L392.94,286.79a13.47,13.47 0,0 1,-13.43 -13.44v-40.3a13.47,13.47 0,0 1,13.43 -13.43h13.44a13.48,13.48 0,0 1,13.43 13.43Z"
|
||||
android:fillColor="#fff"/>
|
||||
<path
|
||||
android:pathData="M134.35,374.01l0,0l0,0l0,0l0,-9.5l-9.36,0l-0.04,0.1l-0.1,-0.1l-37.91,37.91l-6.32,6.32l0,-12.56l0,-31.67l-13.44,0l0,19.82l0,17.34l0,20.51l0,17.64l0,18.72l13.44,0l0,-30.8l6.45,-6.45l37.78,37.25l0,0l9.5,0l0,-9.36l-37.85,-37.33l37.84,-37.84l0.01,0z"
|
||||
android:fillColor="#fff"/>
|
||||
<path
|
||||
android:pathData="M275.4,58.42v60.45a20.15,20.15 0,1 1,-40.3 0V58.42H221.67v60.45a33.58,33.58 0,1 0,67.16 0V58.42Z"
|
||||
android:fillColor="#fff"/>
|
||||
<path
|
||||
android:pathData="M275.4,364.51V425a20.15,20.15 0,1 1,-40.3 0V364.51H221.67V425a33.58,33.58 0,1 0,67.16 0V364.51Z"
|
||||
android:fillColor="#fff"/>
|
||||
</vector>
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.v4.widget.DrawerLayout android:id="@+id/drawer_layout_main"
|
||||
<androidx.drawerlayout.widget.DrawerLayout android:id="@+id/drawer_layout_main"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_width="match_parent"
|
||||
android:fitsSystemWindows="true"
|
||||
|
@ -8,7 +8,7 @@
|
|||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<android.support.design.widget.CoordinatorLayout
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
|
@ -17,23 +17,23 @@
|
|||
android:layout_height="match_parent"
|
||||
android:layout_width="match_parent">
|
||||
|
||||
<android.support.design.widget.AppBarLayout
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:theme="@style/AppTheme.AppBarOverlay">
|
||||
|
||||
<android.support.v7.widget.Toolbar
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="?attr/colorPrimary"
|
||||
app:popupTheme="@style/AppTheme.PopupOverlay">
|
||||
|
||||
</android.support.v7.widget.Toolbar>
|
||||
</androidx.appcompat.widget.Toolbar>
|
||||
|
||||
|
||||
</android.support.design.widget.AppBarLayout>
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
|
@ -49,7 +49,7 @@
|
|||
android:layoutDirection="ltr"
|
||||
android:layout_weight="1">
|
||||
|
||||
<android.support.v4.view.ViewPager
|
||||
<androidx.viewpager.widget.ViewPager
|
||||
android:id="@+id/scroller"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
|
@ -59,7 +59,7 @@
|
|||
android:id="@+id/arrow_left"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_keyboard_arrow_left_black_24dp"
|
||||
app:srcCompat="@drawable/ic_keyboard_arrow_left_black_24dp"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:padding="@dimen/activity_horizontal_margin"
|
||||
|
@ -72,7 +72,7 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="@dimen/activity_horizontal_margin"
|
||||
android:src="@drawable/ic_keyboard_arrow_right_black_24dp"
|
||||
app:srcCompat="@drawable/ic_keyboard_arrow_right_black_24dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginEnd="@dimen/activity_horizontal_margin"
|
||||
|
@ -157,8 +157,8 @@
|
|||
|
||||
</LinearLayout>
|
||||
|
||||
</android.support.design.widget.CoordinatorLayout>
|
||||
<android.support.design.widget.NavigationView
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
<com.google.android.material.navigation.NavigationView
|
||||
android:id="@+id/nav_view_main"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
|
@ -168,4 +168,4 @@
|
|||
app:menu="@menu/menu_drawer_main"
|
||||
app:headerLayout="@layout/nav_header" />
|
||||
|
||||
</android.support.v4.widget.DrawerLayout>
|
||||
</androidx.drawerlayout.widget.DrawerLayout>
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.v4.widget.DrawerLayout android:id="@+id/drawer_layout_main"
|
||||
<androidx.drawerlayout.widget.DrawerLayout android:id="@+id/drawer_layout_main"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_width="match_parent"
|
||||
android:fitsSystemWindows="true"
|
||||
|
@ -8,7 +8,7 @@
|
|||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<android.support.design.widget.CoordinatorLayout
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
|
@ -17,23 +17,23 @@
|
|||
android:layout_height="match_parent"
|
||||
android:layout_width="match_parent">
|
||||
|
||||
<android.support.design.widget.AppBarLayout
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:theme="@style/AppTheme.AppBarOverlay">
|
||||
|
||||
<android.support.v7.widget.Toolbar
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="?attr/colorPrimary"
|
||||
app:popupTheme="@style/AppTheme.PopupOverlay">
|
||||
|
||||
</android.support.v7.widget.Toolbar>
|
||||
</androidx.appcompat.widget.Toolbar>
|
||||
|
||||
|
||||
</android.support.design.widget.AppBarLayout>
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_height="match_parent"
|
||||
|
@ -49,7 +49,7 @@
|
|||
android:layoutDirection="ltr"
|
||||
android:layout_weight="4">
|
||||
|
||||
<android.support.v4.view.ViewPager
|
||||
<androidx.viewpager.widget.ViewPager
|
||||
android:id="@+id/scroller"
|
||||
|
||||
android:layout_width="match_parent"
|
||||
|
@ -60,7 +60,7 @@
|
|||
android:id="@+id/arrow_left"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_keyboard_arrow_left_black_24dp"
|
||||
app:srcCompat="@drawable/ic_keyboard_arrow_left_black_24dp"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:padding="@dimen/activity_horizontal_margin"
|
||||
|
@ -72,7 +72,7 @@
|
|||
android:id="@+id/arrow_right"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_keyboard_arrow_right_black_24dp"
|
||||
app:srcCompat="@drawable/ic_keyboard_arrow_right_black_24dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:padding="@dimen/activity_horizontal_margin"
|
||||
|
@ -229,9 +229,9 @@
|
|||
|
||||
</LinearLayout>
|
||||
|
||||
</android.support.design.widget.CoordinatorLayout>
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
||||
<android.support.design.widget.NavigationView
|
||||
<com.google.android.material.navigation.NavigationView
|
||||
android:id="@+id/nav_view_main"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
|
@ -241,4 +241,4 @@
|
|||
app:menu="@menu/menu_drawer_main"
|
||||
app:headerLayout="@layout/nav_header" />
|
||||
|
||||
</android.support.v4.widget.DrawerLayout>
|
||||
</androidx.drawerlayout.widget.DrawerLayout>
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.v4.widget.DrawerLayout android:id="@+id/drawer_layout_main"
|
||||
<androidx.drawerlayout.widget.DrawerLayout android:id="@+id/drawer_layout_main"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_width="match_parent"
|
||||
android:fitsSystemWindows="true"
|
||||
|
@ -8,7 +8,7 @@
|
|||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<android.support.design.widget.CoordinatorLayout
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
|
@ -17,23 +17,23 @@
|
|||
android:layout_height="match_parent"
|
||||
android:layout_width="match_parent">
|
||||
|
||||
<android.support.design.widget.AppBarLayout
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:theme="@style/AppTheme.AppBarOverlay">
|
||||
|
||||
<android.support.v7.widget.Toolbar
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="?attr/colorPrimary"
|
||||
app:popupTheme="@style/AppTheme.PopupOverlay">
|
||||
|
||||
</android.support.v7.widget.Toolbar>
|
||||
</androidx.appcompat.widget.Toolbar>
|
||||
|
||||
|
||||
</android.support.design.widget.AppBarLayout>
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_height="match_parent"
|
||||
|
@ -49,7 +49,7 @@
|
|||
android:layoutDirection="ltr"
|
||||
android:layout_weight="4">
|
||||
|
||||
<android.support.v4.view.ViewPager
|
||||
<androidx.viewpager.widget.ViewPager
|
||||
android:id="@+id/scroller"
|
||||
|
||||
android:layout_width="match_parent"
|
||||
|
@ -60,7 +60,7 @@
|
|||
android:id="@+id/arrow_left"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_keyboard_arrow_left_black_24dp"
|
||||
app:srcCompat="@drawable/ic_keyboard_arrow_left_black_24dp"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:padding="@dimen/activity_horizontal_margin"
|
||||
|
@ -72,7 +72,7 @@
|
|||
android:id="@+id/arrow_right"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_keyboard_arrow_right_black_24dp"
|
||||
app:srcCompat="@drawable/ic_keyboard_arrow_right_black_24dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:padding="@dimen/activity_horizontal_margin"
|
||||
|
@ -227,9 +227,9 @@
|
|||
|
||||
</LinearLayout>
|
||||
|
||||
</android.support.design.widget.CoordinatorLayout>
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
||||
<android.support.design.widget.NavigationView
|
||||
<com.google.android.material.navigation.NavigationView
|
||||
android:id="@+id/nav_view_main"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
|
@ -239,4 +239,4 @@
|
|||
app:menu="@menu/menu_drawer_main"
|
||||
app:headerLayout="@layout/nav_header" />
|
||||
|
||||
</android.support.v4.widget.DrawerLayout>
|
||||
</androidx.drawerlayout.widget.DrawerLayout>
|
|
@ -1,29 +1,25 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.drawerlayout.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/drawer_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fitsSystemWindows="true">
|
||||
<!-- tools:openDrawer="start" -->
|
||||
|
||||
<android.support.design.widget.CoordinatorLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fitsSystemWindows="true"
|
||||
tools:context="tu_darmstadt.sudoku.activity.GameActivity">
|
||||
|
||||
<android.support.design.widget.AppBarLayout
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:clipChildren="false"
|
||||
android:theme="@style/AppTheme.AppBarOverlay">
|
||||
|
||||
<android.support.v7.widget.Toolbar android:id="@+id/toolbar"
|
||||
<androidx.appcompat.widget.Toolbar android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="?attr/colorPrimary"
|
||||
|
@ -76,15 +72,15 @@
|
|||
android:id="@+id/timerView"
|
||||
android:gravity="end"/>
|
||||
</LinearLayout>
|
||||
</android.support.v7.widget.Toolbar>
|
||||
</androidx.appcompat.widget.Toolbar>
|
||||
|
||||
</android.support.design.widget.AppBarLayout>
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<include layout="@layout/content_game_view" />
|
||||
|
||||
</android.support.design.widget.CoordinatorLayout>
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
||||
<android.support.design.widget.NavigationView
|
||||
<com.google.android.material.navigation.NavigationView
|
||||
android:id="@+id/nav_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:fitsSystemWindows="true"
|
||||
|
@ -94,4 +90,4 @@
|
|||
app:menu="@menu/menu_drawer"
|
||||
app:headerLayout="@layout/nav_header" />
|
||||
|
||||
</android.support.v4.widget.DrawerLayout>
|
||||
</androidx.drawerlayout.widget.DrawerLayout>
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.v4.widget.DrawerLayout android:id="@+id/drawer_layout_main"
|
||||
<androidx.drawerlayout.widget.DrawerLayout android:id="@+id/drawer_layout_main"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_width="match_parent"
|
||||
android:fitsSystemWindows="true"
|
||||
|
@ -8,30 +8,30 @@
|
|||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<android.support.design.widget.CoordinatorLayout
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:fitsSystemWindows="true"
|
||||
tools:context="tu_darmstadt.sudoku.ui.MainActivity"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_width="match_parent">
|
||||
|
||||
<android.support.design.widget.AppBarLayout
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:theme="@style/AppTheme.AppBarOverlay">
|
||||
|
||||
<android.support.v7.widget.Toolbar
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="?attr/colorPrimary"
|
||||
app:popupTheme="@style/AppTheme.PopupOverlay">
|
||||
|
||||
</android.support.v7.widget.Toolbar>
|
||||
</androidx.appcompat.widget.Toolbar>
|
||||
|
||||
|
||||
</android.support.design.widget.AppBarLayout>
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_height="match_parent"
|
||||
|
@ -48,7 +48,7 @@
|
|||
android:layoutDirection="ltr"
|
||||
android:layout_weight="4">
|
||||
|
||||
<android.support.v4.view.ViewPager
|
||||
<androidx.viewpager.widget.ViewPager
|
||||
android:id="@+id/scroller"
|
||||
|
||||
android:layout_width="match_parent"
|
||||
|
@ -59,7 +59,7 @@
|
|||
android:id="@+id/arrow_left"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_keyboard_arrow_left_black_24dp"
|
||||
app:srcCompat="@drawable/ic_keyboard_arrow_left_black_24dp"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:padding="@dimen/activity_horizontal_margin"
|
||||
|
@ -71,7 +71,7 @@
|
|||
android:id="@+id/arrow_right"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_keyboard_arrow_right_black_24dp"
|
||||
app:srcCompat="@drawable/ic_keyboard_arrow_right_black_24dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:padding="@dimen/activity_horizontal_margin"
|
||||
|
@ -224,9 +224,9 @@
|
|||
|
||||
</LinearLayout>
|
||||
|
||||
</android.support.design.widget.CoordinatorLayout>
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
||||
<android.support.design.widget.NavigationView
|
||||
<com.google.android.material.navigation.NavigationView
|
||||
android:id="@+id/nav_view_main"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
|
@ -236,4 +236,4 @@
|
|||
app:menu="@menu/menu_drawer_main"
|
||||
app:headerLayout="@layout/nav_header" />
|
||||
|
||||
</android.support.v4.widget.DrawerLayout>
|
||||
</androidx.drawerlayout.widget.DrawerLayout>
|
||||
|
|
|
@ -1,30 +1,43 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.design.widget.CoordinatorLayout
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent" android:layout_height="match_parent"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:statusBarBackground="?attr/colorPrimary"
|
||||
android:fitsSystemWindows="true">
|
||||
|
||||
<android.support.design.widget.AppBarLayout android:id="@+id/appbar"
|
||||
android:layout_width="match_parent" android:layout_height="wrap_content"
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:clipChildren="false"
|
||||
android:theme="@style/AppTheme.AppBarOverlay">
|
||||
|
||||
<android.support.v7.widget.Toolbar android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent" android:layout_height="?attr/actionBarSize"
|
||||
android:background="?attr/colorPrimary" app:popupTheme="@style/AppTheme.PopupOverlay"
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="?attr/colorPrimary"
|
||||
app:popupTheme="@style/AppTheme.PopupOverlay"
|
||||
android:clipChildren="false"
|
||||
app:layout_scrollFlags="enterAlways">
|
||||
|
||||
</android.support.v7.widget.Toolbar>
|
||||
</androidx.appcompat.widget.Toolbar>
|
||||
|
||||
<android.support.design.widget.TabLayout android:id="@+id/tabs"
|
||||
android:layout_width="match_parent" android:layout_height="wrap_content" />
|
||||
<com.google.android.material.tabs.TabLayout
|
||||
android:id="@+id/tabs"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
</android.support.design.widget.AppBarLayout>
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<android.support.v4.view.ViewPager android:id="@+id/main_content"
|
||||
android:layout_width="fill_parent" android:layout_height="fill_parent"
|
||||
<androidx.viewpager.widget.ViewPager
|
||||
android:id="@+id/main_content"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
|
||||
|
||||
|
||||
</android.support.design.widget.CoordinatorLayout>
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
tools:showIn="@layout/activity_tutorial">
|
||||
|
||||
|
||||
<android.support.v4.view.ViewPager
|
||||
<androidx.viewpager.widget.ViewPager
|
||||
android:id="@+id/view_pager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
android:contentDescription="App Logo"
|
||||
android:paddingEnd="@dimen/activity_horizontal_margin"
|
||||
android:paddingStart="@dimen/activity_horizontal_margin"
|
||||
android:src="@mipmap/ic_launcher_nopfa"/>
|
||||
android:src="@mipmap/ic_drawer"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
|
@ -35,7 +35,5 @@
|
|||
android:layout_centerVertical="true"
|
||||
android:layout_toRightOf="@+id/imageView"
|
||||
android:layout_toEndOf="@+id/imageView"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
|
8
app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
Normal file
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@color/ic_launcher_background"/>
|
||||
<foreground>
|
||||
<inset android:drawable="@drawable/ic_launcher_foreground_shadow"
|
||||
android:inset="21%"/>
|
||||
</foreground>
|
||||
</adaptive-icon>
|
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 5.2 KiB |
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 5.2 KiB |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
BIN
app/src/main/res/mipmap-ldpi/ic_launcher.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 3 KiB After Width: | Height: | Size: 3 KiB |
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3 KiB |
Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 7.3 KiB |
Before Width: | Height: | Size: 7.6 KiB After Width: | Height: | Size: 7.3 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 15 KiB |
|
@ -28,4 +28,6 @@
|
|||
<item>@color/dot_dark_screen</item>
|
||||
<item>@color/dot_dark_screen</item>
|
||||
</array>
|
||||
|
||||
<color name="ic_launcher_background">#3680BB</color>
|
||||
</resources>
|
||||
|
|
|
@ -6,7 +6,7 @@ buildscript {
|
|||
google()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:3.0.1'
|
||||
classpath 'com.android.tools.build:gradle:3.6.2'
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
// in the individual module build.gradle files
|
||||
|
@ -16,6 +16,7 @@ buildscript {
|
|||
allprojects {
|
||||
repositories {
|
||||
jcenter()
|
||||
google()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -15,4 +15,6 @@
|
|||
# When configured, Gradle will run in incubating parallel mode.
|
||||
# This option should only be used with decoupled projects. More details, visit
|
||||
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
|
||||
# org.gradle.parallel=true
|
||||
# org.gradle.parallel=true
|
||||
android.enableJetifier=true
|
||||
android.useAndroidX=true
|
4
gradle/wrapper/gradle-wrapper.properties
vendored
|
@ -1,6 +1,6 @@
|
|||
#Fri Jan 19 17:45:21 CET 2018
|
||||
#Wed Oct 23 12:21:08 CEST 2019
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip
|
||||
|
|