Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the application smaller #12

Draft
wants to merge 7 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@ android {
applicationId "ru.karamoff.kawan_kawan.arithmaster"
minSdk 21
targetSdk 34
versionCode 46
versionCode 50
versionName "1.1.0"

testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
}

buildTypes {
Expand All @@ -39,9 +37,4 @@ android {
}

dependencies {
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.google.android.material:material:1.11.0'
testImplementation 'junit:junit:4.13.2'
}
38 changes: 0 additions & 38 deletions app/build.gradle.orig

This file was deleted.

1 change: 0 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
<application
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme"
tools:ignore="GoogleAppIndexingWarning">
Expand Down
Binary file added app/src/main/ic_launcher-playstore.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed app/src/main/ic_launcher-web.png
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
package ru.karamoff.kawan_kawan.arithmaster;

import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.WindowManager;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.TextView;

import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.content.res.AppCompatResources;
import androidx.constraintlayout.widget.ConstraintLayout;

import java.util.Date;
import java.util.Timer;
import java.util.TimerTask;

public class GameActivity extends AppCompatActivity {
public class GameActivity extends Activity {

private TextView operationField;

Expand Down Expand Up @@ -43,7 +41,7 @@ protected void onCreate(Bundle savedInstanceState) {
setContentView(R.layout.activity_game);

// получение объектов для изменения в дальнейшем
ConstraintLayout parent = findViewById(R.id.parentLayout); // "родитель" разметки
LinearLayout parent = findViewById(R.id.parentLayout); // "родитель" разметки
TextView modeTitle = findViewById(R.id.modeTitle); // заголовок окна

operationField = findViewById(R.id.operation); // операция
Expand All @@ -63,12 +61,12 @@ protected void onCreate(Bundle savedInstanceState) {
// меняет окно в зависимости от режима игры
switch (gamemode) {
case 0: // классика
parent.setBackground(AppCompatResources.getDrawable(this, R.drawable.gradient_classic)); // установка фона
parent.setBackground(getResources().getDrawable(R.drawable.gradient_classic)); // установка фона
modeTitle.setText(getText(R.string.classic_mode_name)); // установка заголовка

// установка номера заполняемого поля - в данном случае последнее
toBeFilled = 2;
textviews[toBeFilled].setBackground(AppCompatResources.getDrawable(this, R.drawable.empty_field_classic));
textviews[toBeFilled].setBackground(getResources().getDrawable(R.drawable.empty_field_classic));
break;
default: // если не передан один из стандартных режимов - скорее всего ошибка
toBeFilled = 2;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
package ru.karamoff.kawan_kawan.arithmaster;

import android.app.Activity;
import android.os.Bundle;
import android.view.WindowManager;
import android.widget.TextView;

import androidx.appcompat.app.AppCompatActivity;

public class InfoActivity extends AppCompatActivity {
public class InfoActivity extends Activity {

@Override
protected void onCreate(Bundle savedInstanceState) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
package ru.karamoff.kawan_kawan.arithmaster;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.WindowManager;

import androidx.appcompat.app.AppCompatActivity;

public class MainActivity extends AppCompatActivity {
public class MainActivity extends Activity {

@Override
protected void onCreate(Bundle savedInstanceState) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
package ru.karamoff.kawan_kawan.arithmaster;

import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.WindowManager;
import android.widget.TextView;

import androidx.appcompat.app.AppCompatActivity;

import java.util.Date;

public class ResultActivity extends AppCompatActivity {
public class ResultActivity extends Activity {

@SuppressLint("DefaultLocale")
@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path
android:fillColor="@color/launcherIconBackground"
android:pathData="M0,0h108v108h-108z"/>
</vector>
14 changes: 14 additions & 0 deletions app/src/main/res/drawable-anydpi-v26/ic_launcher_foreground.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<group android:scaleX="0.91"
android:scaleY="0.91"
android:translateX="4.86"
android:translateY="4.86">
<path
android:pathData="m38,73.52 l13.2,-39.03h5.61L70,73.52h-5.23l-6.82,-21.8a229,229 0,0 1,-2.02 -6.54,387 387,0 0,1 -1.88,-6.63h-0.24a220,220 0,0 1,-1.84 6.65,241 241,0 0,1 -2.02,6.52l-6.9,21.8zM44.94,61.63L44.94,57.67h17.97v3.96zM61.45,34.48h3.91l13.2,39.03L73.32,73.52l-6.82,-21.8a229,229 0,0 1,-2.02 -6.54c-0.64,-2.17 -2.41,-8.45 -3.03,-10.7m8.55,0h3.91l13.2,39.03h-5.23l-6.82,-21.8a229,229 0,0 1,-2.02 -6.54c-0.64,-2.17 -2.41,-8.45 -3.03,-10.7m8.55,0h3.91l13.2,39.03h-5.23l-6.82,-21.8a229,229 0,0 1,-2.02 -6.54c-0.64,-2.17 -2.41,-8.45 -3.03,-10.7m8.55,0h3.91l13.2,39.03h-5.23l-6.82,-21.8a229,229 0,0 1,-2.02 -6.54c-0.64,-2.17 -2.41,-8.45 -3.03,-10.7m8.55,0h3.91l13.2,39.03h-5.23l-6.82,-21.8a229,229 0,0 1,-2.02 -6.54c-0.64,-2.17 -2.41,-8.45 -3.03,-10.7m8.55,0h3.91l13.2,39.03h-5.23l-6.82,-21.8a229,229 0,0 1,-2.02 -6.54c-0.64,-2.17 -2.41,-8.45 -3.03,-10.7"
android:fillColor="#fff"/>
</group>
</vector>
14 changes: 14 additions & 0 deletions app/src/main/res/drawable-anydpi-v26/ic_launcher_monochrome.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<group android:scaleX="0.91"
android:scaleY="0.91"
android:translateX="4.86"
android:translateY="4.86">
<path
android:pathData="m38,73.52 l13.2,-39.03h5.61L70,73.52h-5.23l-6.82,-21.8a229,229 0,0 1,-2.02 -6.54,387 387,0 0,1 -1.88,-6.63h-0.24a220,220 0,0 1,-1.84 6.65,241 241,0 0,1 -2.02,6.52l-6.9,21.8zM44.94,61.63L44.94,57.67h17.97v3.96zM61.45,34.48h3.91l13.2,39.03L73.32,73.52l-6.82,-21.8a229,229 0,0 1,-2.02 -6.54c-0.64,-2.17 -2.41,-8.45 -3.03,-10.7m8.55,0h3.91l13.2,39.03h-5.23l-6.82,-21.8a229,229 0,0 1,-2.02 -6.54c-0.64,-2.17 -2.41,-8.45 -3.03,-10.7m8.55,0h3.91l13.2,39.03h-5.23l-6.82,-21.8a229,229 0,0 1,-2.02 -6.54c-0.64,-2.17 -2.41,-8.45 -3.03,-10.7m8.55,0h3.91l13.2,39.03h-5.23l-6.82,-21.8a229,229 0,0 1,-2.02 -6.54c-0.64,-2.17 -2.41,-8.45 -3.03,-10.7m8.55,0h3.91l13.2,39.03h-5.23l-6.82,-21.8a229,229 0,0 1,-2.02 -6.54c-0.64,-2.17 -2.41,-8.45 -3.03,-10.7m8.55,0h3.91l13.2,39.03h-5.23l-6.82,-21.8a229,229 0,0 1,-2.02 -6.54c-0.64,-2.17 -2.41,-8.45 -3.03,-10.7"
android:fillColor="#fff"/>
</group>
</vector>
Loading