V1.0.1(2)
15
.gitignore
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
*.iml
|
||||
.gradle
|
||||
/local.properties
|
||||
/.idea/caches
|
||||
/.idea/libraries
|
||||
/.idea/modules.xml
|
||||
/.idea/workspace.xml
|
||||
/.idea/navEditor.xml
|
||||
/.idea/assetWizardSettings.xml
|
||||
.DS_Store
|
||||
/build
|
||||
/captures
|
||||
.externalNativeBuild
|
||||
.cxx
|
||||
local.properties
|
||||
90
app/.gitignore
vendored
Normal file
@ -0,0 +1,90 @@
|
||||
# Built application files
|
||||
*.apk
|
||||
#*.aar
|
||||
*.ap_
|
||||
*.aab
|
||||
|
||||
# Files for the ART/Dalvik VM
|
||||
*.dex
|
||||
|
||||
# Java class files
|
||||
*.class
|
||||
|
||||
# Generated files
|
||||
bin/
|
||||
gen/
|
||||
out/
|
||||
# Uncomment the following line in case you need and you don't have the release build type files in your app
|
||||
# release/
|
||||
|
||||
# Gradle files
|
||||
.gradle/
|
||||
build/
|
||||
|
||||
# Local configuration file (sdk path, etc)
|
||||
local.properties
|
||||
|
||||
# Proguard folder generated by Eclipse
|
||||
proguard/
|
||||
|
||||
# Log Files
|
||||
*.log
|
||||
|
||||
# Android Studio Navigation editor temp files
|
||||
.navigation/
|
||||
|
||||
# Android Studio captures folder
|
||||
captures/
|
||||
|
||||
# IntelliJ
|
||||
app/release/
|
||||
.safedk/
|
||||
.idea/
|
||||
*.iml
|
||||
.idea/workspace.xml
|
||||
.idea/tasks.xml
|
||||
.idea/gradle.xml
|
||||
.idea/assetWizardSettings.xml
|
||||
.idea/dictionaries
|
||||
.idea/libraries
|
||||
# Android Studio 3 in .gitignore file.
|
||||
.idea/caches
|
||||
.idea/modules.xml
|
||||
# Comment next line if keeping position of elements in Navigation Editor is relevant for you
|
||||
.idea/navEditor.xml
|
||||
|
||||
# Keystore files
|
||||
# Uncomment the following lines if you do not want to check your keystore files in.
|
||||
#*.jks
|
||||
#*.keystore
|
||||
|
||||
# External native build folder generated in Android Studio 2.2 and later
|
||||
.externalNativeBuild
|
||||
.cxx/
|
||||
|
||||
# Google Services (e.g. APIs or Firebase)
|
||||
# google-services.json
|
||||
|
||||
# Freeline
|
||||
freeline.py
|
||||
freeline/
|
||||
freeline_project_description.json
|
||||
|
||||
# fastlane
|
||||
fastlane/report.xml
|
||||
fastlane/Preview.html
|
||||
fastlane/screenshots
|
||||
fastlane/test_output
|
||||
fastlane/readme.md
|
||||
|
||||
# Version control
|
||||
vcs.xml
|
||||
|
||||
# lint
|
||||
lint/intermediates/
|
||||
lint/generated/
|
||||
lint/outputs/
|
||||
lint/tmp/
|
||||
# lint/reports/
|
||||
|
||||
app/debug
|
||||
BIN
app/BrainTest.jks
Normal file
BIN
app/IntelligenceTest.jks
Normal file
49
app/build.gradle
Normal file
@ -0,0 +1,49 @@
|
||||
import java.util.Date
|
||||
import java.text.SimpleDateFormat
|
||||
plugins {
|
||||
id 'com.android.application'
|
||||
id 'org.jetbrains.kotlin.android'
|
||||
}
|
||||
def timestamp = new SimpleDateFormat("MM_dd_HH_mm").format(new Date())
|
||||
android {
|
||||
namespace 'com.braintest.brain.test'
|
||||
compileSdk 34
|
||||
|
||||
defaultConfig {
|
||||
//com.braintest.brain.iq
|
||||
applicationId "com.braintest.brain.iq"
|
||||
minSdk 23
|
||||
targetSdk 34
|
||||
versionCode 2
|
||||
versionName "1.0.1"
|
||||
setProperty("archivesBaseName", "Brain Test_V" + versionName + "(${versionCode})_$timestamp")
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled true
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
kotlinOptions {
|
||||
jvmTarget = '1.8'
|
||||
}
|
||||
buildFeatures {
|
||||
viewBinding true
|
||||
buildConfig true
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'androidx.core:core-ktx:1.7.0'
|
||||
implementation 'androidx.appcompat:appcompat:1.6.1'
|
||||
implementation 'com.google.android.material:material:1.12.0'
|
||||
|
||||
implementation 'com.balysv:material-ripple:1.0.2'
|
||||
implementation 'com.codemybrainsout.rating:ratingdialog:1.0.8'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
||||
}
|
||||
21
app/proguard-rules.pro
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
# Add project specific ProGuard rules here.
|
||||
# You can control the set of applied configuration files using the
|
||||
# proguardFiles setting in build.gradle.
|
||||
#
|
||||
# For more details, see
|
||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||
|
||||
# If your project uses WebView with JS, uncomment the following
|
||||
# and specify the fully qualified class name to the JavaScript interface
|
||||
# class:
|
||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||
# public *;
|
||||
#}
|
||||
|
||||
# Uncomment this to preserve the line number information for
|
||||
# debugging stack traces.
|
||||
#-keepattributes SourceFile,LineNumberTable
|
||||
|
||||
# If you keep the line number information, uncomment this to
|
||||
# hide the original source file name.
|
||||
#-renamesourcefileattribute SourceFile
|
||||
37
app/src/main/AndroidManifest.xml
Normal file
@ -0,0 +1,37 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
|
||||
<application
|
||||
android:name=".BrainTestApp"
|
||||
android:allowBackup="true"
|
||||
android:dataExtractionRules="@xml/data_extraction_rules"
|
||||
android:fullBackupContent="@xml/backup_rules"
|
||||
android:icon="@mipmap/logo"
|
||||
android:label="@string/app_name"
|
||||
android:roundIcon="@mipmap/logo"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/Theme.BrainTest"
|
||||
tools:targetApi="31">
|
||||
<activity
|
||||
android:name=".SetActivity"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".WelcomeActivity"
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity android:name=".MainActivity" />
|
||||
<activity
|
||||
android:name=".InfoActivity"
|
||||
android:parentActivityName=".LevelsPage" />
|
||||
<activity android:name=".LevelsPage" />
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
23
app/src/main/java/com/braintest/brain/test/BrainTestApp.java
Normal file
@ -0,0 +1,23 @@
|
||||
package com.braintest.brain.test;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.Application;
|
||||
import android.view.View;
|
||||
|
||||
public class BrainTestApp extends Application {
|
||||
@Override
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
}
|
||||
|
||||
public static void setStatusBar(Activity activity, boolean dark) {
|
||||
View decor = activity.getWindow().getDecorView();
|
||||
if (dark) {
|
||||
decor.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
|
||||
| View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
|
||||
} else {
|
||||
decor.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
|
||||
| View.SYSTEM_UI_FLAG_LAYOUT_STABLE);
|
||||
}
|
||||
}
|
||||
}
|
||||
14
app/src/main/java/com/braintest/brain/test/ConsValues.java
Normal file
@ -0,0 +1,14 @@
|
||||
package com.braintest.brain.test;
|
||||
|
||||
public class ConsValues {
|
||||
|
||||
|
||||
public static final String PRE_FILE = "Save_data";
|
||||
|
||||
public static final String LEVELS_NUMBER ="guan_number";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
25
app/src/main/java/com/braintest/brain/test/Data.java
Normal file
@ -0,0 +1,25 @@
|
||||
package com.braintest.brain.test;
|
||||
|
||||
public class Data {
|
||||
public Data(boolean isUnlock, int levels) {
|
||||
this.isUnlock = isUnlock;
|
||||
this.levels = levels;
|
||||
}
|
||||
|
||||
private boolean isUnlock;
|
||||
private int levels;
|
||||
|
||||
public void setUnlock(boolean unlock) {
|
||||
isUnlock = unlock;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public boolean isUnlock() {
|
||||
return isUnlock;
|
||||
}
|
||||
|
||||
public int getLevels() {
|
||||
return levels;
|
||||
}
|
||||
}
|
||||
382
app/src/main/java/com/braintest/brain/test/InfoActivity.java
Normal file
@ -0,0 +1,382 @@
|
||||
package com.braintest.brain.test;
|
||||
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.os.Bundle;
|
||||
import android.os.CountDownTimer;
|
||||
import android.os.Handler;
|
||||
import android.util.Log;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.Button;
|
||||
import android.widget.ProgressBar;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
public class InfoActivity extends AppCompatActivity {
|
||||
|
||||
private ProgressBar progressBar;
|
||||
private CountDownTimer myTimer;
|
||||
private int levelNumber;
|
||||
private TextView questionText, textQuestionNumber;
|
||||
private Button answer1, answer2, answer3, answer4;
|
||||
|
||||
private Questions questions;
|
||||
private String theCorrectAnswer;
|
||||
private int questionNumber = 1;
|
||||
private SharedPreferences prefs;
|
||||
private SharedPreferences.Editor editor;
|
||||
// private ImageView help;
|
||||
private int gemsCount;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_game);
|
||||
BrainTestApp.setStatusBar(this,true);
|
||||
questionText = findViewById(R.id.QuestionText);
|
||||
textQuestionNumber = findViewById(R.id.text_QuestionNumber);
|
||||
answer1 = findViewById(R.id.Answer1_Btn);
|
||||
answer2 = findViewById(R.id.Answer2_Btn);
|
||||
answer3 = findViewById(R.id.Answer3_Btn);
|
||||
answer4 = findViewById(R.id.Answer4_Btn);
|
||||
|
||||
progressBar = findViewById(R.id.timer_progressBar);
|
||||
|
||||
Bundle bundle = getIntent().getExtras();
|
||||
levelNumber = bundle.getInt(ConsValues.LEVELS_NUMBER);
|
||||
questionNumber = (levelNumber-1)*5+questionNumber;
|
||||
getNextQuestion();
|
||||
|
||||
|
||||
prefs = getSharedPreferences(ConsValues.PRE_FILE, Context.MODE_PRIVATE);
|
||||
editor = prefs.edit();
|
||||
|
||||
answer1.setOnClickListener(v -> {
|
||||
if (answer1.getText().toString().equals(theCorrectAnswer)) {
|
||||
myTimer.cancel();
|
||||
delayNextQuestion();
|
||||
correctAnswer(answer1);
|
||||
|
||||
} else {
|
||||
myTimer.cancel();
|
||||
wrongAnswer(answer1);
|
||||
delayExit();
|
||||
}
|
||||
});
|
||||
|
||||
answer2.setOnClickListener(v -> {
|
||||
if (answer2.getText().toString().equals(theCorrectAnswer)) {
|
||||
myTimer.cancel();
|
||||
delayNextQuestion();
|
||||
correctAnswer(answer2);
|
||||
|
||||
} else {
|
||||
myTimer.cancel();
|
||||
wrongAnswer(answer2);
|
||||
delayExit();
|
||||
}
|
||||
});
|
||||
|
||||
answer3.setOnClickListener(v -> {
|
||||
if (answer3.getText().toString().equals(theCorrectAnswer)) {
|
||||
myTimer.cancel();
|
||||
delayNextQuestion();
|
||||
correctAnswer(answer3);
|
||||
|
||||
} else {
|
||||
myTimer.cancel();
|
||||
wrongAnswer(answer3);
|
||||
delayExit();
|
||||
}
|
||||
});
|
||||
|
||||
answer4.setOnClickListener(v -> {
|
||||
if (answer4.getText().toString().equals(theCorrectAnswer)) {
|
||||
myTimer.cancel();
|
||||
delayNextQuestion();
|
||||
correctAnswer(answer4);
|
||||
|
||||
} else {
|
||||
myTimer.cancel();
|
||||
wrongAnswer(answer4);
|
||||
delayExit();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
setProgressBar();
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void setHelperCount() {
|
||||
gemsCount = gemsCount - 1;
|
||||
prefs = getSharedPreferences("prefGem", Context.MODE_PRIVATE);
|
||||
SharedPreferences.Editor editor = prefs.edit();
|
||||
editor.putInt("gems", gemsCount);
|
||||
getHelpAnswer(questionNumber);
|
||||
editor.apply();
|
||||
}
|
||||
|
||||
private void setProgressBar() {
|
||||
myTimer = new CountDownTimer(30000, 1000) {
|
||||
@Override
|
||||
public void onTick(long millisUntilFinished) {
|
||||
long time = millisUntilFinished / 1000;
|
||||
progressBar.setProgress(Integer.parseInt((String.valueOf(time))));
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFinish() {
|
||||
myTimer.cancel();
|
||||
showDialogTimeOut();
|
||||
}
|
||||
}.start();
|
||||
}
|
||||
|
||||
@SuppressLint({"SetTextI18n", "UseCompatLoadingForDrawables"})
|
||||
private void getNextQuestion() {
|
||||
getQuestionNumbers(questionNumber);
|
||||
|
||||
answer1.setBackground(getDrawable(R.drawable.background_item));
|
||||
answer2.setBackground(getDrawable(R.drawable.background_item));
|
||||
answer3.setBackground(getDrawable(R.drawable.background_item));
|
||||
answer4.setBackground(getDrawable(R.drawable.background_item));
|
||||
|
||||
textQuestionNumber.setText(getString(R.string.str_text_question) + " " + questionNumber);
|
||||
}
|
||||
|
||||
|
||||
private void getQuestionNumbers(int num) {
|
||||
String[] theQuestion = questions.getQuestions(num);
|
||||
questionText.setText(theQuestion[0]);
|
||||
answer1.setText(theQuestion[1]);
|
||||
answer2.setText(theQuestion[2]);
|
||||
answer3.setText(theQuestion[3]);
|
||||
answer4.setText(theQuestion[4]);
|
||||
theCorrectAnswer = theQuestion[5];
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void getHelpAnswer(int num) {
|
||||
String[] theQuestion = questions.getQuestions(num);
|
||||
theCorrectAnswer = theQuestion[5];
|
||||
Toast.makeText(this, theCorrectAnswer.toString(), Toast.LENGTH_LONG).show();
|
||||
|
||||
}
|
||||
|
||||
@SuppressLint("UseCompatLoadingForDrawables")
|
||||
private void correctAnswer(Button button) {
|
||||
button.setBackground(getDrawable(R.drawable.background_right));
|
||||
}
|
||||
|
||||
@SuppressLint("UseCompatLoadingForDrawables")
|
||||
private void wrongAnswer(Button button) {
|
||||
button.setBackground(getDrawable(R.drawable.background_wrong));
|
||||
}
|
||||
|
||||
private void delayExit() {
|
||||
myTimer.cancel();
|
||||
disableClickButton();
|
||||
|
||||
if (answer1.getText().toString().equals(theCorrectAnswer)) {
|
||||
correctAnswer(answer1);
|
||||
}
|
||||
if (answer2.getText().toString().equals(theCorrectAnswer)) {
|
||||
correctAnswer(answer2);
|
||||
}
|
||||
if (answer3.getText().toString().equals(theCorrectAnswer)) {
|
||||
correctAnswer(answer3);
|
||||
}
|
||||
if (answer4.getText().toString().equals(theCorrectAnswer)) {
|
||||
correctAnswer(answer4);
|
||||
}
|
||||
|
||||
final Handler handler = new Handler();
|
||||
handler.postDelayed(() -> {
|
||||
showDialogLose();
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
private void delayNextQuestion() {
|
||||
int i = questionNumber % 5;
|
||||
if (i == 0) {
|
||||
QuestionNumberFinish(questionNumber);
|
||||
return;
|
||||
}
|
||||
final Handler handler = new Handler();
|
||||
handler.postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
questionNumber++;
|
||||
getNextQuestion();
|
||||
enableClickButton();
|
||||
setProgressBar();
|
||||
}
|
||||
}, 1000);
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void disableClickButton() {
|
||||
answer1.setClickable(false);
|
||||
answer2.setClickable(false);
|
||||
answer3.setClickable(false);
|
||||
answer4.setClickable(false);
|
||||
}
|
||||
|
||||
private void enableClickButton() {
|
||||
answer1.setClickable(true);
|
||||
answer2.setClickable(true);
|
||||
answer3.setClickable(true);
|
||||
answer4.setClickable(true);
|
||||
}
|
||||
|
||||
private void showDialogTimeOut() {
|
||||
Dialog dialog = new Dialog(this);
|
||||
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE); // before
|
||||
dialog.setContentView(R.layout.layout_time_out);
|
||||
dialog.setCancelable(false);
|
||||
dialog.getWindow().setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT));
|
||||
|
||||
WindowManager.LayoutParams lp = new WindowManager.LayoutParams();
|
||||
lp.copyFrom(dialog.getWindow().getAttributes());
|
||||
lp.width = WindowManager.LayoutParams.WRAP_CONTENT;
|
||||
lp.height = WindowManager.LayoutParams.WRAP_CONTENT;
|
||||
|
||||
dialog.findViewById(R.id.bt_play_again).setOnClickListener(v -> {
|
||||
dialog.dismiss();
|
||||
finish();
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putInt(ConsValues.LEVELS_NUMBER, levelNumber);
|
||||
Intent intent = new Intent(InfoActivity.this, InfoActivity.class);
|
||||
intent.putExtras(bundle);
|
||||
startActivity(intent);
|
||||
});
|
||||
|
||||
dialog.findViewById(R.id.bt_close_icon).setOnClickListener(v -> {
|
||||
dialog.dismiss();
|
||||
finish();
|
||||
});
|
||||
|
||||
dialog.findViewById(R.id.bt_close).setOnClickListener(v -> {
|
||||
dialog.dismiss();
|
||||
finish();
|
||||
});
|
||||
|
||||
dialog.show();
|
||||
dialog.getWindow().setAttributes(lp);
|
||||
}
|
||||
|
||||
private void showDialogLose() {
|
||||
Dialog dialog = new Dialog(this);
|
||||
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE); // before
|
||||
dialog.setContentView(R.layout.layout_lose);
|
||||
dialog.setCancelable(false);
|
||||
dialog.getWindow().setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT));
|
||||
|
||||
WindowManager.LayoutParams lp = new WindowManager.LayoutParams();
|
||||
lp.copyFrom(dialog.getWindow().getAttributes());
|
||||
lp.width = WindowManager.LayoutParams.WRAP_CONTENT;
|
||||
lp.height = WindowManager.LayoutParams.WRAP_CONTENT;
|
||||
|
||||
dialog.findViewById(R.id.bt_play_again).setOnClickListener(v -> {
|
||||
dialog.dismiss();
|
||||
finish();
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putInt(ConsValues.LEVELS_NUMBER, levelNumber);
|
||||
Intent intent = new Intent(InfoActivity.this, InfoActivity.class);
|
||||
intent.putExtras(bundle);
|
||||
startActivity(intent);
|
||||
});
|
||||
|
||||
dialog.findViewById(R.id.bt_close_icon).setOnClickListener(v -> {
|
||||
dialog.dismiss();
|
||||
finish();
|
||||
});
|
||||
|
||||
dialog.findViewById(R.id.bt_close).setOnClickListener(v -> {
|
||||
dialog.dismiss();
|
||||
finish();
|
||||
});
|
||||
|
||||
dialog.show();
|
||||
dialog.getWindow().setAttributes(lp);
|
||||
}
|
||||
|
||||
private void setDialogWon() {
|
||||
Dialog dialog = new Dialog(this);
|
||||
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE); // before
|
||||
dialog.setContentView(R.layout.layout_win);
|
||||
dialog.setCancelable(false);
|
||||
dialog.getWindow().setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT));
|
||||
|
||||
WindowManager.LayoutParams lp = new WindowManager.LayoutParams();
|
||||
lp.copyFrom(dialog.getWindow().getAttributes());
|
||||
lp.width = WindowManager.LayoutParams.WRAP_CONTENT;
|
||||
lp.height = WindowManager.LayoutParams.WRAP_CONTENT;
|
||||
|
||||
dialog.findViewById(R.id.bt_play_again).setOnClickListener(v -> {
|
||||
finish();
|
||||
myTimer.cancel();
|
||||
levelNumber++;
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putInt(ConsValues.LEVELS_NUMBER, levelNumber);
|
||||
Intent intent = new Intent(InfoActivity.this, InfoActivity.class);
|
||||
intent.putExtras(bundle);
|
||||
startActivity(intent);
|
||||
});
|
||||
|
||||
dialog.findViewById(R.id.bt_close_icon).setOnClickListener(v -> {
|
||||
dialog.dismiss();
|
||||
finish();
|
||||
});
|
||||
|
||||
dialog.findViewById(R.id.bt_close).setOnClickListener(v -> {
|
||||
dialog.dismiss();
|
||||
finish();
|
||||
});
|
||||
|
||||
dialog.show();
|
||||
dialog.getWindow().setAttributes(lp);
|
||||
}
|
||||
|
||||
private void QuestionNumberFinish(int number) {
|
||||
int g = number / 6;
|
||||
String format = String.format(getString(R.string.str_LevelValue), String.valueOf(levelNumber + 1));
|
||||
Log.d("-----", "----------format=" + format + "---number=" + number);
|
||||
setDialogWon();
|
||||
editor.putBoolean(format, true);
|
||||
editor.apply();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
protected void onPause() {
|
||||
super.onPause();
|
||||
myTimer.cancel();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
myTimer.cancel();
|
||||
super.onBackPressed();
|
||||
}
|
||||
}
|
||||
80
app/src/main/java/com/braintest/brain/test/LevelsPage.java
Normal file
@ -0,0 +1,80 @@
|
||||
package com.braintest.brain.test;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class LevelsPage extends AppCompatActivity {
|
||||
|
||||
|
||||
SharedPreferences prefs;
|
||||
private RecyclerView recyclerView;
|
||||
private List<Data> list;
|
||||
private MyAdapter myAdapter;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_levels);
|
||||
BrainTestApp.setStatusBar(this,true);
|
||||
recyclerView = findViewById(R.id.levels_list);
|
||||
ImageView back = findViewById(R.id.back);
|
||||
back.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
finish();
|
||||
}
|
||||
});
|
||||
prefs = getSharedPreferences(ConsValues.PRE_FILE, Context.MODE_PRIVATE);
|
||||
|
||||
|
||||
initList();
|
||||
|
||||
}
|
||||
|
||||
private void initList() {
|
||||
SharedPreferences.Editor edit = prefs.edit();
|
||||
edit.putBoolean(String.format(getString(R.string.str_LevelValue), String.valueOf(1)), true);
|
||||
edit.apply();
|
||||
list = new ArrayList<>();
|
||||
for (int i = 0; i < 20; i++) {
|
||||
Data levelsBean;
|
||||
int levels = i + 1;
|
||||
String format = String.format(getString(R.string.str_LevelValue), String.valueOf(levels));
|
||||
boolean aBoolean = prefs.getBoolean(format, false);
|
||||
levelsBean = new Data(aBoolean, levels);
|
||||
list.add(levelsBean);
|
||||
}
|
||||
myAdapter = new MyAdapter(this, list);
|
||||
recyclerView.setAdapter(myAdapter);
|
||||
recyclerView.setLayoutManager(new GridLayoutManager(this, 3));
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void onStart() {
|
||||
super.onStart();
|
||||
|
||||
for (Data bean : list) {
|
||||
int index = list.indexOf(bean);
|
||||
String format = String.format(getString(R.string.str_LevelValue), String.valueOf(bean.getLevels()));
|
||||
boolean aBoolean = prefs.getBoolean(format, false);
|
||||
if (aBoolean) {
|
||||
bean.setUnlock(aBoolean);
|
||||
myAdapter.updateUnlock(index);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
47
app/src/main/java/com/braintest/brain/test/MainActivity.java
Normal file
@ -0,0 +1,47 @@
|
||||
package com.braintest.brain.test;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
public class MainActivity extends AppCompatActivity {
|
||||
|
||||
TextView startBtn, exitBtn, aboutBtn;
|
||||
|
||||
ImageView ImSet;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_main);
|
||||
BrainTestApp.setStatusBar(this,true);
|
||||
startBtn = findViewById(R.id.btn_play);
|
||||
ImSet = findViewById(R.id.im_set);
|
||||
startBtn.setOnClickListener(v -> {
|
||||
Intent page2 = new Intent(MainActivity.this, LevelsPage.class);
|
||||
startActivity(page2);
|
||||
});
|
||||
|
||||
ImSet.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent page2 = new Intent(MainActivity.this, SetActivity.class);
|
||||
startActivity(page2);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
//
|
||||
// aboutBtn.setOnClickListener(v -> showDialogAbout());
|
||||
//
|
||||
// exitBtn.setOnClickListener(v -> finish());
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
78
app/src/main/java/com/braintest/brain/test/MyAdapter.java
Normal file
@ -0,0 +1,78 @@
|
||||
package com.braintest.brain.test;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.braintest.brain.test.databinding.ItemLayoutBinding;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class MyAdapter extends RecyclerView.Adapter<MyAdapter.LevelsViewHolder> {
|
||||
|
||||
private Context mContext;
|
||||
|
||||
private List<Data> list;
|
||||
|
||||
public MyAdapter(Context context, List<Data> list) {
|
||||
mContext = context;
|
||||
this.list = list;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public LevelsViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
ItemLayoutBinding levelsBinding = ItemLayoutBinding.inflate(LayoutInflater.from(parent.getContext()), null, false);
|
||||
return new LevelsViewHolder(levelsBinding);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull LevelsViewHolder holder, int position) {
|
||||
int i = position + 1;
|
||||
holder.itemLevelsBinding.levelsBtn.setOnClickListener(v -> {
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putInt(ConsValues.LEVELS_NUMBER, i);
|
||||
Intent quiz = new Intent(mContext, InfoActivity.class);
|
||||
quiz.putExtras(bundle);
|
||||
mContext.startActivity(quiz);
|
||||
});
|
||||
|
||||
Data levelsBean = list.get(position);
|
||||
holder.itemLevelsBinding.levelsBtn.setText(String.valueOf(levelsBean.getLevels()));
|
||||
if (levelsBean.isUnlock()) {
|
||||
holder.itemLevelsBinding.levelsBtn.setClickable(true);
|
||||
holder.itemLevelsBinding.levelsBtn.setAlpha(1f);
|
||||
} else {
|
||||
holder.itemLevelsBinding.levelsBtn.setClickable(false);
|
||||
holder.itemLevelsBinding.levelsBtn.setAlpha(0.64f);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void updateUnlock(int pos) {
|
||||
notifyItemChanged(pos);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return list.size();
|
||||
}
|
||||
|
||||
public static class LevelsViewHolder extends RecyclerView.ViewHolder {
|
||||
|
||||
|
||||
private ItemLayoutBinding itemLevelsBinding;
|
||||
|
||||
public LevelsViewHolder(@NonNull ItemLayoutBinding itemView) {
|
||||
super(itemView.getRoot());
|
||||
itemLevelsBinding = itemView;
|
||||
}
|
||||
}
|
||||
}
|
||||
1112
app/src/main/java/com/braintest/brain/test/Questions.java
Normal file
95
app/src/main/java/com/braintest/brain/test/SetActivity.java
Normal file
@ -0,0 +1,95 @@
|
||||
package com.braintest.brain.test;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.Intent;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
public class SetActivity extends AppCompatActivity {
|
||||
|
||||
private String VersionStr;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_set);
|
||||
BrainTestApp.setStatusBar(this,true);
|
||||
VersionStr = "Version " + BuildConfig.VERSION_NAME;
|
||||
|
||||
TextView tvVersion = findViewById(R.id.version);
|
||||
tvVersion.setText(VersionStr);
|
||||
|
||||
RelativeLayout aboutRl = findViewById(R.id.rl_about);
|
||||
RelativeLayout shareRl = findViewById(R.id.rl_share);
|
||||
shareRl.setOnClickListener(v -> {
|
||||
Intent share = new Intent(Intent.ACTION_SEND);
|
||||
share.setType("text/plain");
|
||||
share.putExtra(Intent.EXTRA_SUBJECT, R.string.app_name);
|
||||
String text = getString(R.string.str_share_title);
|
||||
text = text + "\n https://play.google.com/store/apps/details?id=" + getPackageName();
|
||||
share.putExtra(Intent.EXTRA_TEXT, text);
|
||||
startActivity(Intent.createChooser(share, "choose one"));
|
||||
});
|
||||
|
||||
aboutRl.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
showDialogAbout();
|
||||
}
|
||||
});
|
||||
|
||||
ImageView back = findViewById(R.id.back);
|
||||
back.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
finish();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
private void showDialogAbout() {
|
||||
final Dialog dialog = new Dialog(this);
|
||||
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE); // before
|
||||
dialog.setContentView(R.layout.layout_about);
|
||||
dialog.setCancelable(true);
|
||||
dialog.getWindow().setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT));
|
||||
|
||||
WindowManager.LayoutParams lp = new WindowManager.LayoutParams();
|
||||
lp.copyFrom(dialog.getWindow().getAttributes());
|
||||
lp.width = WindowManager.LayoutParams.WRAP_CONTENT;
|
||||
lp.height = WindowManager.LayoutParams.WRAP_CONTENT;
|
||||
|
||||
((TextView) dialog.findViewById(R.id.tv_version)).setText(VersionStr);
|
||||
|
||||
|
||||
|
||||
dialog.findViewById(R.id.bt_close).setOnClickListener(v -> dialog.dismiss());
|
||||
|
||||
|
||||
dialog.findViewById(R.id.bt_rateUs).setOnClickListener(v -> {
|
||||
String format = String.format(getString(R.string.str_google_play), getPackageName());
|
||||
Uri uri = Uri.parse(format);
|
||||
Intent goToMarket = new Intent(Intent.ACTION_VIEW, uri);
|
||||
Log.d("---","---format="+format);
|
||||
goToMarket.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
startActivity(goToMarket);
|
||||
|
||||
});
|
||||
dialog.show();
|
||||
dialog.getWindow().setAttributes(lp);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,36 @@
|
||||
package com.braintest.brain.test;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
public class WelcomeActivity extends AppCompatActivity {
|
||||
|
||||
static int splashTimeOut = 3000 ;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_welcome);
|
||||
BrainTestApp.setStatusBar(this,true);
|
||||
|
||||
|
||||
ImageView logo = findViewById(R.id.logo);
|
||||
|
||||
new Handler().postDelayed(() -> {
|
||||
Intent mainActivity = new Intent(WelcomeActivity.this, MainActivity.class);
|
||||
mainActivity.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
startActivity(mainActivity);
|
||||
finish();
|
||||
}, splashTimeOut);
|
||||
|
||||
// Animation myAnim = AnimationUtils.loadAnimation(this,R.anim.welcom_alpha);
|
||||
// logo.startAnimation(myAnim);
|
||||
// appNameText.startAnimation(myAnim);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
30
app/src/main/res/drawable-v24/ic_launcher_foreground.xml
Normal file
@ -0,0 +1,30 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:aapt="http://schemas.android.com/aapt"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportWidth="108"
|
||||
android:viewportHeight="108">
|
||||
<path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
|
||||
<aapt:attr name="android:fillColor">
|
||||
<gradient
|
||||
android:endX="85.84757"
|
||||
android:endY="92.4963"
|
||||
android:startX="42.9492"
|
||||
android:startY="49.59793"
|
||||
android:type="linear">
|
||||
<item
|
||||
android:color="#44000000"
|
||||
android:offset="0.0" />
|
||||
<item
|
||||
android:color="#00000000"
|
||||
android:offset="1.0" />
|
||||
</gradient>
|
||||
</aapt:attr>
|
||||
</path>
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:fillType="nonZero"
|
||||
android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
|
||||
android:strokeWidth="1"
|
||||
android:strokeColor="#00000000" />
|
||||
</vector>
|
||||
7
app/src/main/res/drawable/background_home.xml
Normal file
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<!-- 主页背景-->
|
||||
<solid android:color="@color/home_color"/>
|
||||
|
||||
</shape>
|
||||
10
app/src/main/res/drawable/background_item.xml
Normal file
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- 选项背景-->
|
||||
<solid android:color="@color/item_color" />
|
||||
<corners
|
||||
android:bottomLeftRadius="@dimen/circle_20"
|
||||
android:bottomRightRadius="@dimen/circle_20"
|
||||
android:topLeftRadius="@dimen/circle_20"
|
||||
android:topRightRadius="@dimen/circle_20" />
|
||||
</shape>
|
||||
10
app/src/main/res/drawable/background_levels.xml
Normal file
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval">
|
||||
<!-- 关卡背景-->
|
||||
<solid android:color="@color/circle_levels_color" />
|
||||
|
||||
<size
|
||||
android:width="24dp"
|
||||
android:height="24dp" />
|
||||
</shape>
|
||||
10
app/src/main/res/drawable/background_right.xml
Normal file
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="@color/app_green" />
|
||||
<!-- right answer bg-->
|
||||
<corners
|
||||
android:bottomLeftRadius="@dimen/circle_20"
|
||||
android:bottomRightRadius="@dimen/circle_20"
|
||||
android:topLeftRadius="@dimen/circle_20"
|
||||
android:topRightRadius="@dimen/circle_20" />
|
||||
</shape>
|
||||
8
app/src/main/res/drawable/background_shape_dialog.xml
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<!-- 主页背景-->
|
||||
<solid android:color="@color/home_color"/>
|
||||
<corners android:radius="15dp"/>
|
||||
|
||||
</shape>
|
||||
10
app/src/main/res/drawable/background_wrong.xml
Normal file
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="@color/wrong_color" />
|
||||
<!-- wrong answer bg-->
|
||||
<corners
|
||||
android:bottomLeftRadius="@dimen/circle_20"
|
||||
android:bottomRightRadius="@dimen/circle_20"
|
||||
android:topLeftRadius="@dimen/circle_20"
|
||||
android:topRightRadius="@dimen/circle_20" />
|
||||
</shape>
|
||||
12
app/src/main/res/drawable/dilaog_button.xml
Normal file
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
|
||||
<stroke
|
||||
android:width="2dp"
|
||||
android:color="@color/circle_levels_color" />
|
||||
<solid android:color="@color/circle_levels_color" />
|
||||
<corners android:radius="@dimen/circle_20" />
|
||||
|
||||
|
||||
</shape>
|
||||
170
app/src/main/res/drawable/ic_launcher_background.xml
Normal file
@ -0,0 +1,170 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<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="#3DDC84"
|
||||
android:pathData="M0,0h108v108h-108z" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M9,0L9,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,0L19,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M29,0L29,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M39,0L39,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M49,0L49,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M59,0L59,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M69,0L69,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M79,0L79,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M89,0L89,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M99,0L99,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,9L108,9"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,19L108,19"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,29L108,29"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,39L108,39"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,49L108,49"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,59L108,59"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,69L108,69"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,79L108,79"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,89L108,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,99L108,99"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,29L89,29"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,39L89,39"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,49L89,49"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,59L89,59"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,69L89,69"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,79L89,79"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M29,19L29,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M39,19L39,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M49,19L49,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M59,19L59,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M69,19L69,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M79,19L79,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
</vector>
|
||||
11
app/src/main/res/drawable/icon_back.xml
Normal file
@ -0,0 +1,11 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="20dp"
|
||||
android:height="16dp"
|
||||
android:viewportWidth="20"
|
||||
android:viewportHeight="16">
|
||||
<path
|
||||
android:pathData="M10.061,1.04C10.646,1.626 10.646,2.575 10.061,3.161L6.722,6.5L17,6.5C17.828,6.5 18.5,7.172 18.5,8C18.5,8.828 17.828,9.5 17,9.5L6.722,9.5L10.061,12.839C10.646,13.425 10.646,14.374 10.061,14.96C9.475,15.546 8.525,15.546 7.939,14.96L2.04,9.061C1.454,8.475 1.454,7.525 2.04,6.939L7.939,1.04C8.525,0.454 9.475,0.454 10.061,1.04Z"
|
||||
android:strokeWidth="1"
|
||||
android:fillColor="@color/black"
|
||||
android:strokeColor="@color/black"/>
|
||||
</vector>
|
||||
9
app/src/main/res/drawable/icon_close.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="@color/dialog_close_color"
|
||||
android:pathData="M19,6.41L17.59,5 12,10.59 6.41,5 5,6.41 10.59,12 5,17.59 6.41,19 12,13.41 17.59,19 19,17.59 13.41,12z"/>
|
||||
</vector>
|
||||
10
app/src/main/res/drawable/icon_correct.xml
Normal file
@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="@color/app_green">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M16.59,7.58L10,14.17l-3.59,-3.58L5,12l5,5 8,-8zM12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM12,20c-4.42,0 -8,-3.58 -8,-8s3.58,-8 8,-8 8,3.58 8,8 -3.58,8 -8,8z"/>
|
||||
</vector>
|
||||
19
app/src/main/res/drawable/icon_countdown.xml
Normal file
@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:id="@android:id/background">
|
||||
<!-- Countdown-->
|
||||
<shape>
|
||||
<corners android:radius="6dp"/>
|
||||
<solid android:color="@color/app_color_gray" />
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
<item android:id="@+id/progress">
|
||||
<clip>
|
||||
<shape>
|
||||
<corners android:radius="6dp"/>
|
||||
<solid android:color="@color/counttime_color" />
|
||||
</shape>
|
||||
</clip>
|
||||
</item>
|
||||
</layer-list>
|
||||
10
app/src/main/res/drawable/icon_wrong.xml
Normal file
@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="@color/wrong_color">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M19,6.41L17.59,5 12,10.59 6.41,5 5,6.41 10.59,12 5,17.59 6.41,19 12,13.41 17.59,19 19,17.59 13.41,12z"/>
|
||||
</vector>
|
||||
11
app/src/main/res/drawable/play_btn.xml
Normal file
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval">
|
||||
<stroke
|
||||
android:width="5dp"
|
||||
android:color="@color/color_yellow" />
|
||||
<solid android:color="@color/item_color" />
|
||||
<corners android:radius="@dimen/circle_20" />
|
||||
|
||||
|
||||
</shape>
|
||||
9
app/src/main/res/drawable/set.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="64.1dp"
|
||||
android:height="64dp"
|
||||
android:viewportWidth="1025"
|
||||
android:viewportHeight="1024">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M1021.5,443.8c-2.9,-38.2 -10,-41.7 -47.8,-38.6 -41.8,3.3 -77.1,-17.5 -91.5,-53.9 -14.8,-37.2 -4.1,-75.6 28.5,-102.3 21.9,-18 24.6,-32.6 4.7,-53.6 -29.9,-31.7 -61.2,-62.3 -93.7,-91.2 -25.3,-22.4 -37,-19.5 -58.4,7.4 -26.1,32.9 -67.9,42.7 -105.8,25 -35.6,-16.6 -52.3,-47 -49.5,-90.1 1.9,-29.6 -6.8,-39.9 -36.3,-42.2 -23,-1.8 -46.1,-3 -67.7,-4.4C481.1,2.4 460,4.2 439,7 409.6,10.9 403.3,19.5 405.8,49.6 409.7,95.2 390.7,129.5 352.9,145.2 316.1,160.4 278.1,149.5 249.3,115.4c-17.1,-20.2 -32,-23.1 -50.9,-5.2C166.7,140 135.5,170.7 106.6,203.3 81.9,231.2 84.7,240.6 113.2,264.4 140.3,287.1 152.1,316.1 144.5,351.1 136.8,386.8 114.2,409.7 78.9,417.9 65.9,420.9 51.6,419 38,418.9 19.5,418.7 7.8,427.1 5.3,445.3 -1.4,495.7 -1.7,546.2 7.5,596.4c3.6,19.8 14.3,27.5 34.3,26.3C52.3,622.1 63,619.6 73.4,620.6c37,3.6 66,28.2 76,62.8 10,34.4 -1.9,69.5 -31.5,93.4 -24.4,19.6 -27.1,33.3 -5.9,55.9 29.4,31.3 59.9,61.7 92.2,90.1 27.4,24.1 37.9,21.3 60.8,-7.9 31.4,-40.2 87.7,-45.6 126.2,-12.6 25.8,22.1 32.8,50.1 29.4,82.6 -2.5,24 6.3,37.8 27.4,38.3 47.3,1 94.7,1.2 141.8,-1.7 30.7,-1.9 36.8,-12.8 33.3,-43.8 -5.1,-44.9 13.8,-80.2 51.5,-96.2 38.1,-16.1 76.6,-5.2 104.9,29.8 17.3,21.4 32.4,24.5 52,5.8 32.4,-30.9 64,-63 93.7,-96.4 21.6,-24.3 18.6,-37.4 -7.5,-57.1 -21.8,-16.4 -34,-38.1 -35.6,-65.2 -3.2,-55.3 41.9,-97.3 98,-91.7 28.6,2.8 42.6,-5.3 43.3,-30.3C1024.5,532.2 1024.8,487.8 1021.5,443.8zM513.4,735c-123,-1.3 -221.6,-101.4 -220,-223.2 1.6,-120.2 100.8,-218.9 219.3,-218.4 122.5,0.5 223.5,101.2 222.2,221.7C733.6,637.2 633.7,736.3 513.4,735z"/>
|
||||
</vector>
|
||||
9
app/src/main/res/drawable/share.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="64dp"
|
||||
android:height="64dp"
|
||||
android:viewportWidth="1024"
|
||||
android:viewportHeight="1024">
|
||||
<path
|
||||
android:fillColor="@color/white"
|
||||
android:pathData="M896,810.7a128,128 0,0 1,-256 0,89.2 89.2,0 0,1 0,-10.7 21.8,21.8 0,0 0,-10.2 -20.5l-279,-163a21.3,21.3 0,0 0,-23 0A125.4,125.4 0,0 1,256 640a128,128 0,0 1,0 -256,125.4 125.4,0 0,1 71.7,22.6 21.3,21.3 0,0 0,23 0l279.5,-163a21.8,21.8 0,0 0,9.8 -19.6A89.2,89.2 0,0 1,640 213.3a128,128 0,1 1,45.7 97.3l-291.8,170.7a21.8,21.8 0,0 0,-10.2 20.5,133.5 133.5,0 0,1 0,21.3 21.8,21.8 0,0 0,10.2 20.5l279.5,163a21.3,21.3 0,0 0,23 0A125.4,125.4 0,0 1,768 682.7a128,128 0,0 1,128 128z"/>
|
||||
</vector>
|
||||
9
app/src/main/res/drawable/version.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="64dp"
|
||||
android:height="64dp"
|
||||
android:viewportWidth="1024"
|
||||
android:viewportHeight="1024">
|
||||
<path
|
||||
android:pathData="M510.9,63.9c-246.9,0 -447.1,200.7 -447.1,448.4 0,247.6 200.2,448.4 447.1,448.4 246.9,0 447.1,-200.7 447.1,-448.4C957.9,264.6 757.8,63.9 510.9,63.9zM510.9,260c30.9,0 55.9,25.1 55.9,56 0,31 -25,56 -55.9,56s-55.9,-25.1 -55.9,-56C455,285.1 480,260 510.9,260zM566.7,764.4l-55.7,0c-0.1,0 -0.1,0 -0.2,0 -0.1,0 -0.1,-0 -0.2,-0l-55.7,0c-15.4,0 -27.9,-12.5 -27.9,-28 0,-15.5 12.5,-28 27.9,-28l27.9,0L482.9,484.2l-27.9,0c-15.4,0 -27.9,-12.5 -27.9,-28 0,-15.5 12.5,-28 27.9,-28l55.9,0c15.4,0 27.9,12.5 27.9,28 0,0.3 -0,0.6 -0,0.9 0,0.3 0,0.6 0,0.9l0,250.4 27.9,0c15.4,0 27.9,12.5 27.9,28C594.7,751.9 582.2,764.4 566.7,764.4z"
|
||||
android:fillColor="@color/white"/>
|
||||
</vector>
|
||||
BIN
app/src/main/res/font/newfont.ttf
Normal file
136
app/src/main/res/layout/activity_game.xml
Normal file
@ -0,0 +1,136 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout 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:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingTop="@dimen/top_dp"
|
||||
android:background="@drawable/background_home">
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/toolBar_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:fontFamily="@font/newfont"
|
||||
android:text="@string/app_name"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingBottom="10dp"
|
||||
android:textColor="@color/common_text_color"
|
||||
android:textSize="@dimen/text_size_17sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginHorizontal="@dimen/pading_12dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_below="@id/toolBar_title"
|
||||
android:orientation="vertical"
|
||||
android:weightSum="1">
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/timer_progressBar"
|
||||
style="@style/Widget.AppCompat.ProgressBar.Horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="15dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:indeterminate="false"
|
||||
android:max="30"
|
||||
android:progress="10"
|
||||
android:progressDrawable="@drawable/icon_countdown" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:layout_marginStart="14dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginEnd="14dp"
|
||||
android:layout_weight="0.25"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text_QuestionNumber"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:fontFamily="@font/newfont"
|
||||
android:gravity="center"
|
||||
android:text="السؤال: 1"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/text_size_14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/QuestionText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fontFamily="@font/newfont"
|
||||
android:gravity="center"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:text="@string/app_name"
|
||||
android:textColor="@color/common_text_color"
|
||||
android:textSize="@dimen/text_size_21sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/Answer1_Btn"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/padding_27dp"
|
||||
android:layout_marginStart="25dp"
|
||||
android:layout_marginTop="@dimen/padding_19dp"
|
||||
android:layout_marginEnd="25dp"
|
||||
android:layout_weight="0.1"
|
||||
android:background="@drawable/background_item"
|
||||
android:fontFamily="@font/newfont"
|
||||
android:text="الزرافة"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/text_size_17sp" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/Answer2_Btn"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/padding_27dp"
|
||||
android:layout_marginStart="25dp"
|
||||
android:layout_marginTop="@dimen/padding_19dp"
|
||||
android:layout_marginEnd="25dp"
|
||||
android:layout_weight="0.1"
|
||||
android:background="@drawable/background_item"
|
||||
android:fontFamily="@font/newfont"
|
||||
android:text="النعامة"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/text_size_17sp" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/Answer3_Btn"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/padding_27dp"
|
||||
android:layout_marginStart="25dp"
|
||||
android:layout_marginTop="@dimen/padding_19dp"
|
||||
android:layout_marginEnd="25dp"
|
||||
android:layout_weight="0.1"
|
||||
android:background="@drawable/background_item"
|
||||
android:fontFamily="@font/newfont"
|
||||
android:text="الفيل"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/text_size_17sp" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/Answer4_Btn"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/padding_27dp"
|
||||
android:layout_marginStart="25dp"
|
||||
android:layout_marginTop="@dimen/padding_19dp"
|
||||
android:layout_marginEnd="25dp"
|
||||
android:layout_weight="0.1"
|
||||
android:background="@drawable/background_item"
|
||||
android:fontFamily="@font/newfont"
|
||||
android:text="السلحفاة"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/text_size_17sp" />
|
||||
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
18
app/src/main/res/layout/activity_levels.xml
Normal file
@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout 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:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="@dimen/top_dp"
|
||||
android:background="@drawable/background_home">
|
||||
|
||||
<include layout="@layout/layout_action_bar" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/levels_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
</LinearLayout>
|
||||
48
app/src/main/res/layout/activity_main.xml
Normal file
@ -0,0 +1,48 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingTop="@dimen/top_dp"
|
||||
android:background="@drawable/background_home">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="20dp"
|
||||
android:fontFamily="@font/newfont"
|
||||
android:text="@string/app_name"
|
||||
android:textColor="@color/common_text_color"
|
||||
android:textSize="22sp" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/btn_play"
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="200dp"
|
||||
android:layout_below="@id/title"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginHorizontal="@dimen/padding_34dp"
|
||||
android:layout_marginTop="150dp"
|
||||
android:background="@drawable/play_btn"
|
||||
android:fontFamily="@font/newfont"
|
||||
android:gravity="center"
|
||||
android:text="@string/str_play"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/text_size_22sp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/im_set"
|
||||
android:layout_width="23dp"
|
||||
android:layout_height="23dp"
|
||||
android:layout_marginHorizontal="@dimen/padding_34dp"
|
||||
android:src="@drawable/set"
|
||||
android:layout_alignBottom="@id/title"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignTop="@id/title"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/text_size_22sp" />
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
115
app/src/main/res/layout/activity_set.xml
Normal file
@ -0,0 +1,115 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout 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:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingTop="@dimen/top_dp"
|
||||
android:background="@drawable/background_home"
|
||||
tools:context=".SetActivity">
|
||||
|
||||
<include
|
||||
layout="@layout/layout_action_bar" />
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/card_logo"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="110dp"
|
||||
app:cardCornerRadius="15dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="116dp"
|
||||
android:layout_height="116dp"
|
||||
android:src="@mipmap/logo" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/version"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/card_logo"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="12dp"
|
||||
android:fontFamily="@font/newfont"
|
||||
android:textColor="@color/common_text_color"
|
||||
android:textSize="16sp" />
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/card_logo"
|
||||
android:layout_marginStart="25dp"
|
||||
android:layout_marginTop="90dp"
|
||||
android:layout_marginEnd="25dp"
|
||||
android:background="@drawable/background_item"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="14dp"
|
||||
android:paddingBottom="14dp">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_share"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="56dp"
|
||||
android:paddingStart="15dp"
|
||||
android:paddingEnd="15dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/im_share"
|
||||
android:layout_width="23dp"
|
||||
android:layout_height="23dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:src="@drawable/share" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginStart="33dp"
|
||||
android:layout_toEndOf="@id/im_share"
|
||||
android:fontFamily="@font/newfont"
|
||||
android:text="@string/share"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="17sp" />
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.6dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:background="@color/color_white" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_about"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="56dp"
|
||||
android:paddingStart="15dp"
|
||||
android:paddingEnd="15dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/im_version"
|
||||
android:layout_width="23dp"
|
||||
android:layout_height="23dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:src="@drawable/version" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_version"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginStart="33dp"
|
||||
android:layout_toEndOf="@id/im_version"
|
||||
android:fontFamily="@font/newfont"
|
||||
android:text="@string/about"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="17sp" />
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
37
app/src/main/res/layout/activity_welcome.xml
Normal file
@ -0,0 +1,37 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingTop="@dimen/top_dp"
|
||||
android:background="@drawable/background_home">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/logo"
|
||||
android:layout_width="130dp"
|
||||
android:layout_height="130dp"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="230dp"
|
||||
android:elevation="5dp"
|
||||
android:src="@mipmap/logo" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/common_text_color"
|
||||
android:layout_below="@id/logo"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="40dp"
|
||||
android:textSize="25sp"
|
||||
android:fontFamily="@font/newfont"
|
||||
android:text="@string/app_name_welcome"/>
|
||||
|
||||
|
||||
<ProgressBar
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginBottom="40dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:indeterminateTint="@color/splash_progress_color" />
|
||||
|
||||
</RelativeLayout>
|
||||
23
app/src/main/res/layout/item_layout.xml
Normal file
@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="97dp">
|
||||
|
||||
<Button
|
||||
android:id="@+id/levels_btn"
|
||||
android:layout_width="74dp"
|
||||
android:layout_height="74dp"
|
||||
android:layout_gravity="center"
|
||||
android:background="@drawable/background_levels"
|
||||
android:fontFamily="@font/newfont"
|
||||
android:text="1"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="20sp" />
|
||||
</FrameLayout>
|
||||
|
||||
</FrameLayout>
|
||||
108
app/src/main/res/layout/layout_about.xml
Normal file
@ -0,0 +1,108 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="300dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/background_shape_dialog"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/bt_close"
|
||||
android:layout_width="?attr/actionBarSize"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:src="@drawable/icon_close" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="-40dp"
|
||||
android:orientation="vertical"
|
||||
android:padding="@dimen/dp_16dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:focusableInTouchMode="true"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:theme="@style/ThemeOverlay.AppCompat.Dark">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="80dp"
|
||||
app:srcCompat="@mipmap/logo" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_11dp"
|
||||
android:fontFamily="@font/newfont"
|
||||
android:text="@string/app_name"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Large"
|
||||
android:textColor="@color/common_text_color"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_version"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_4dp"
|
||||
android:fontFamily="@font/newfont"
|
||||
android:text="@string/app_name"
|
||||
android:textColor="@color/common_text_color" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="@dimen/dp_16dp"
|
||||
android:autoLink="web"
|
||||
android:fontFamily="@font/newfont"
|
||||
android:text="@string/str_about_dialog_title"
|
||||
android:textAlignment="center"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
|
||||
android:textColor="@color/common_text_color" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/bt_rateUs"
|
||||
style="@style/Widget.AppCompat.Button.Borderless"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_47dp"
|
||||
android:layout_marginStart="22dp"
|
||||
android:layout_marginEnd="22dp"
|
||||
android:background="@drawable/dilaog_button"
|
||||
android:gravity="center"
|
||||
android:text="@string/str_rate"
|
||||
android:textColor="@color/white"
|
||||
app:fontFamily="@font/newfont" />
|
||||
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/dp_11dp" />
|
||||
</LinearLayout>
|
||||
|
||||
</FrameLayout>
|
||||
26
app/src/main/res/layout/layout_action_bar.xml
Normal file
@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.appcompat.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@android:color/transparent">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:padding="15dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/back"
|
||||
android:src="@drawable/icon_back" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/toolBar_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:fontFamily="@font/newfont"
|
||||
android:text="@string/app_name"
|
||||
android:textColor="@color/common_text_color"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</androidx.appcompat.widget.Toolbar>
|
||||
119
app/src/main/res/layout/layout_lose.xml
Normal file
@ -0,0 +1,119 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="300dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:background="@drawable/background_shape_dialog">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/bt_close_icon"
|
||||
android:layout_width="?attr/actionBarSize"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:src="@drawable/icon_close" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center_horizontal"
|
||||
android:padding="@dimen/dp_16dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:focusableInTouchMode="true"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:theme="@style/ThemeOverlay.AppCompat.Dark">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="80dp"
|
||||
android:src="@drawable/icon_wrong" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_11dp"
|
||||
android:text="@string/str_wrong"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Large"
|
||||
android:textColor="@color/common_text_color"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="@font/newfont"/>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="@dimen/dp_16dp"
|
||||
android:autoLink="web"
|
||||
android:text="@string/str_you_lose"
|
||||
android:textAlignment="center"
|
||||
android:fontFamily="@font/newfont"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
|
||||
android:textColor="@color/common_text_color" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/bt_play_again"
|
||||
style="@style/Widget.AppCompat.Button.Borderless"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_47dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/str_play_again"
|
||||
android:textColor="@color/white"
|
||||
app:fontFamily="@font/newfont"
|
||||
android:layout_marginHorizontal="16dp"
|
||||
android:background="@drawable/dilaog_button"/>
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/dp_11dp" />
|
||||
|
||||
<com.balysv.materialripple.MaterialRippleLayout
|
||||
android:id="@+id/bt_close"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_47dp"
|
||||
android:layout_marginHorizontal="16dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:background="@drawable/dilaog_button">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="@string/str_text_exit"
|
||||
android:textAppearance="@style/Base.TextAppearance.AppCompat.Subhead"
|
||||
android:textColor="@android:color/white"
|
||||
app:fontFamily="@font/newfont" />
|
||||
|
||||
</com.balysv.materialripple.MaterialRippleLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</FrameLayout>
|
||||
119
app/src/main/res/layout/layout_time_out.xml
Normal file
@ -0,0 +1,119 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="300dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:background="@drawable/background_shape_dialog">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/bt_close_icon"
|
||||
android:layout_width="?attr/actionBarSize"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:src="@drawable/icon_close" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="-40dp"
|
||||
android:orientation="vertical"
|
||||
android:padding="@dimen/dp_16dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:focusableInTouchMode="true"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:theme="@style/ThemeOverlay.AppCompat.Dark">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="80dp"
|
||||
app:srcCompat="@mipmap/ic_time_out_logo"
|
||||
app:tint="@color/wrong_color" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_11dp"
|
||||
android:text="@string/str_time_out"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Large"
|
||||
android:textColor="@color/common_text_color"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="@font/newfont"/>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="@dimen/dp_16dp"
|
||||
android:autoLink="web"
|
||||
android:text="@string/str_time_out_content"
|
||||
android:textAlignment="center"
|
||||
android:fontFamily="@font/newfont"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
|
||||
android:textColor="@color/common_text_color" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/bt_play_again"
|
||||
style="@style/Widget.AppCompat.Button.Borderless"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_47dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/str_play_again"
|
||||
android:textColor="@color/white"
|
||||
app:fontFamily="@font/newfont"
|
||||
android:layout_marginHorizontal="16dp"
|
||||
android:background="@drawable/dilaog_button"/>
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/dp_11dp" />
|
||||
|
||||
<com.balysv.materialripple.MaterialRippleLayout
|
||||
android:id="@+id/bt_close"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_47dp"
|
||||
android:layout_marginHorizontal="16dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:background="@drawable/dilaog_button">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="@string/str_text_exit"
|
||||
android:textAppearance="@style/Base.TextAppearance.AppCompat.Subhead"
|
||||
android:textColor="@android:color/white"
|
||||
app:fontFamily="@font/newfont" />
|
||||
|
||||
</com.balysv.materialripple.MaterialRippleLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</FrameLayout>
|
||||
118
app/src/main/res/layout/layout_win.xml
Normal file
@ -0,0 +1,118 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="300dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:background="@drawable/background_shape_dialog">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/bt_close_icon"
|
||||
android:layout_width="?attr/actionBarSize"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:src="@drawable/icon_close" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="-40dp"
|
||||
android:orientation="vertical"
|
||||
android:padding="@dimen/dp_16dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:focusableInTouchMode="true"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:theme="@style/ThemeOverlay.AppCompat.Dark">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="80dp"
|
||||
android:src="@drawable/icon_correct" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_11dp"
|
||||
android:text="@string/str_great"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Large"
|
||||
android:textColor="@color/common_text_color"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="@font/newfont"/>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="@dimen/dp_16dp"
|
||||
android:autoLink="web"
|
||||
android:text="@string/str_text_win_content"
|
||||
android:textAlignment="center"
|
||||
android:fontFamily="@font/newfont"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
|
||||
android:textColor="@color/common_text_color" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/bt_play_again"
|
||||
style="@style/Widget.AppCompat.Button.Borderless"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_47dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/str_text_next_level"
|
||||
android:textColor="@color/white"
|
||||
app:fontFamily="@font/newfont"
|
||||
android:layout_marginHorizontal="16dp"
|
||||
android:background="@drawable/dilaog_button" />
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/dp_11dp" />
|
||||
|
||||
<com.balysv.materialripple.MaterialRippleLayout
|
||||
android:id="@+id/bt_close"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_47dp"
|
||||
android:layout_marginHorizontal="16dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:background="@drawable/dilaog_button">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="@string/str_text_exit"
|
||||
android:textAppearance="@style/Base.TextAppearance.AppCompat.Subhead"
|
||||
android:textColor="@android:color/white"
|
||||
app:fontFamily="@font/newfont" />
|
||||
|
||||
</com.balysv.materialripple.MaterialRippleLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</FrameLayout>
|
||||
5
app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
Normal file
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@drawable/ic_launcher_background" />
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
||||
</adaptive-icon>
|
||||
5
app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
Normal file
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@drawable/ic_launcher_background" />
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
||||
</adaptive-icon>
|
||||
BIN
app/src/main/res/mipmap-hdpi/ic_launcher.webp
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
app/src/main/res/mipmap-hdpi/ic_launcher_round.webp
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
app/src/main/res/mipmap-mdpi/ic_launcher.webp
Normal file
|
After Width: | Height: | Size: 982 B |
BIN
app/src/main/res/mipmap-mdpi/ic_launcher_round.webp
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
app/src/main/res/mipmap-xhdpi/ic_launcher.webp
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_launcher.webp
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
Normal file
|
After Width: | Height: | Size: 5.8 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_time_out_logo.png
Normal file
|
After Width: | Height: | Size: 9.1 KiB |
BIN
app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
Normal file
|
After Width: | Height: | Size: 7.6 KiB |
BIN
app/src/main/res/mipmap-xxxhdpi/logo.png
Normal file
|
After Width: | Height: | Size: 458 KiB |
16
app/src/main/res/values-night/themes.xml
Normal file
@ -0,0 +1,16 @@
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
<!-- Base application theme. -->
|
||||
<style name="Theme.BrainTest" parent="Theme.MaterialComponents.DayNight.NoActionBar.Bridge">
|
||||
<!-- <!– Primary brand color. –>-->
|
||||
<!-- <item name="colorPrimary">@color/app_theme1</item>-->
|
||||
<!-- <item name="colorPrimaryVariant">@color/app_home_bg_color</item>-->
|
||||
<!-- <item name="colorOnPrimary">@color/app_theme2</item>-->
|
||||
<!-- <!– Secondary brand color. –>-->
|
||||
<!-- <item name="colorSecondary">@color/app_theme3</item>-->
|
||||
<!-- <item name="colorSecondaryVariant">@color/app_theme4</item>-->
|
||||
<!-- <item name="colorOnSecondary">@color/app_theme5</item>-->
|
||||
<!-- Status bar color. -->
|
||||
<item name="android:statusBarColor">@color/white</item>
|
||||
<!-- Customize your theme here. -->
|
||||
</style>
|
||||
</resources>
|
||||
283
app/src/main/res/values/colors.xml
Normal file
@ -0,0 +1,283 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="black">#FF000000</color>
|
||||
<color name="white">#FFFFFFFF</color>
|
||||
<color name="home_color">#ffffff</color> <!--所有页面背景颜色-->
|
||||
<color name="item_color">#cd87be</color>
|
||||
<color name="app_green">#00f855</color> <!--right answer-->
|
||||
<color name="wrong_color">#D32F2F</color> <!--wrong answer-->
|
||||
<color name="counttime_color">#D32F2F</color>
|
||||
<color name="circle_levels_color">#cd87be</color><!--levels item-->
|
||||
|
||||
<color name="common_text_color">#2b2b2b</color>
|
||||
<color name="splash_progress_color">#cd87be</color>
|
||||
<color name="color_yellow">#fffec5</color>
|
||||
<color name="app_color_gray">#80878f</color>
|
||||
<color name="dialog_close_color">#FF000000</color>
|
||||
<color name="color_white">#80FFFFFF</color>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- <color name="grey_3">#f7f7f7</color>-->
|
||||
<!-- <color name="grey_5">#f2f2f2</color>-->
|
||||
<!-- <color name="grey_10">#e6e6e6</color>-->
|
||||
<!-- <color name="grey_20">#cccccc</color>-->
|
||||
<!-- <color name="grey_40">#999999</color>-->
|
||||
<!-- <color name="grey_60">#666666</color>-->
|
||||
<!-- <color name="grey_80">#37474F</color>-->
|
||||
<!-- <color name="grey_90">#263238</color>-->
|
||||
<!-- <color name="grey_95">#1a1a1a</color>-->
|
||||
<!-- <color name="grey_100_">#0d0d0d</color>-->
|
||||
|
||||
<!-- <color name="yellow_50">#FFFDE7</color>-->
|
||||
<!-- <color name="yellow_100">#FFF9C4</color>-->
|
||||
<!-- <color name="yellow_200">#FFF59D</color>-->
|
||||
<!-- <color name="yellow_300">#FFF176</color>-->
|
||||
<!-- <color name="yellow_400">#FFEE58</color>-->
|
||||
<!-- <color name="yellow_500">#FFEB3B</color>-->
|
||||
<!-- <color name="yellow_600">#FDD835</color>-->
|
||||
<!-- <color name="yellow_700">#FBC02D</color>-->
|
||||
<!-- <color name="yellow_800">#F9A825</color>-->
|
||||
<!-- <color name="yellow_900">#F57F17</color>-->
|
||||
<!-- <color name="yellow_A100">#FFFF8D</color>-->
|
||||
<!-- <color name="yellow_A200">#FFFF00</color>-->
|
||||
<!-- <color name="yellow_A400">#FFEA00</color>-->
|
||||
<!-- <color name="yellow_A700">#FFD600</color>-->
|
||||
|
||||
<!-- <color name="green_50">#E8F5E9</color>-->
|
||||
<!-- <color name="green_100">#C8E6C9</color>-->
|
||||
<!-- <color name="green_200">#A5D6A7</color>-->
|
||||
<!-- <color name="green_300">#81C784</color>-->
|
||||
<!-- <color name="green_400">#66BB6A</color>-->
|
||||
<!-- <color name="green_500">#4CAF50</color>-->
|
||||
<!-- <color name="green_600">#43A047</color>-->
|
||||
<!-- <color name="green_700">#388E3C</color>-->
|
||||
<!-- <color name="green_800">#2E7D32</color>-->
|
||||
<!-- <color name="green_900">#1B5E20</color>-->
|
||||
<!-- <color name="green_A100">#B9F6CA</color>-->
|
||||
<!-- <color name="green_A200">#69F0AE</color>-->
|
||||
<!-- <color name="green_A400">#00E676</color>-->
|
||||
<!-- <color name="green_A700">#00C853</color>-->
|
||||
|
||||
<!-- <color name="deep_orange_50">#FBE9E7</color>-->
|
||||
<!-- <color name="deep_orange_100">#FFCCBC</color>-->
|
||||
<!-- <color name="deep_orange_200">#FFAB91</color>-->
|
||||
<!-- <color name="deep_orange_300">#FF8A65</color>-->
|
||||
<!-- <color name="deep_orange_400">#FF7043</color>-->
|
||||
<!-- <color name="deep_orange_500">#FF5722</color>-->
|
||||
<!-- <color name="deep_orange_600">#F4511E</color>-->
|
||||
<!-- <color name="deep_orange_700">#E64A19</color>-->
|
||||
<!-- <color name="deep_orange_800">#D84315</color>-->
|
||||
<!-- <color name="deep_orange_900">#BF360C</color>-->
|
||||
<!-- <color name="deep_orange_A100">#FF9E80</color>-->
|
||||
<!-- <color name="deep_orange_A200">#FF6E40</color>-->
|
||||
<!-- <color name="deep_orange_A400">#FF3D00</color>-->
|
||||
<!-- <color name="deep_orange_A700">#DD2C00</color>-->
|
||||
|
||||
<!-- <color name="red_50">#FFEBEE</color>-->
|
||||
<!-- <color name="red_100">#FFCDD2</color>-->
|
||||
<!-- <color name="red_200">#EF9A9A</color>-->
|
||||
<!-- <color name="red_300">#E57373</color>-->
|
||||
<!-- <color name="red_400">#EF5350</color>-->
|
||||
<!-- <color name="red_500">#F44336</color>-->
|
||||
<!-- <color name="red_600">#E53935</color>-->
|
||||
<!-- <color name="red_700">#D32F2F</color>-->
|
||||
<!-- <color name="red_800">#C62828</color>-->
|
||||
<!-- <color name="red_900">#B71C1C</color>-->
|
||||
<!-- <color name="red_A100">#FF8A80</color>-->
|
||||
<!-- <color name="red_A200">#FF5252</color>-->
|
||||
<!-- <color name="red_A400">#FF1744</color>-->
|
||||
<!-- <color name="red_A700">#D50000</color>-->
|
||||
|
||||
<!-- <color name="blue_grey_50">#ECEFF1</color>-->
|
||||
<!-- <color name="blue_grey_100">#CFD8DC</color>-->
|
||||
<!-- <color name="blue_grey_200">#B0BEC5</color>-->
|
||||
<!-- <color name="blue_grey_300">#90A4AE</color>-->
|
||||
<!-- <color name="blue_grey_400">#78909C</color>-->
|
||||
<!-- <color name="blue_grey_500">#607D8B</color>-->
|
||||
<!-- <color name="blue_grey_600">#546E7A</color>-->
|
||||
<!-- <color name="blue_grey_700">#455A64</color>-->
|
||||
<!-- <color name="blue_grey_800">#37474F</color>-->
|
||||
<!-- <color name="blue_grey_900">#263238</color>-->
|
||||
<!-- <color name="blue_grey_800_overlay">#E637474F</color>-->
|
||||
|
||||
<!-- <color name="pink_50">#FCE4EC</color>-->
|
||||
<!-- <color name="pink_100">#F8BBD0</color>-->
|
||||
<!-- <color name="pink_200">#F48FB1</color>-->
|
||||
<!-- <color name="pink_300">#F06292</color>-->
|
||||
<!-- <color name="pink_400">#EC407A</color>-->
|
||||
<!-- <color name="pink_500">#E91E63</color>-->
|
||||
<!-- <color name="pink_600">#D81B60</color>-->
|
||||
<!-- <color name="pink_700">#C2185B</color>-->
|
||||
<!-- <color name="pink_800">#AD1457</color>-->
|
||||
<!-- <color name="pink_900">#880E4F</color>-->
|
||||
<!-- <color name="pink_A100">#FF80AB</color>-->
|
||||
<!-- <color name="pink_A200">#FF4081</color>-->
|
||||
<!-- <color name="pink_A400">#F50057</color>-->
|
||||
<!-- <color name="pink_A700">#C51162</color>-->
|
||||
|
||||
<!-- <color name="indigo_50">#E8EAF6</color>-->
|
||||
<!-- <color name="indigo_100">#C5CAE9</color>-->
|
||||
<!-- <color name="indigo_200">#9FA8DA</color>-->
|
||||
<!-- <color name="indigo_300">#7986CB</color>-->
|
||||
<!-- <color name="indigo_400">#5C6BC0</color>-->
|
||||
<!-- <color name="indigo_500">#3F51B5</color>-->
|
||||
<!-- <color name="indigo_600">#3949AB</color>-->
|
||||
<!-- <color name="indigo_700">#303F9F</color>-->
|
||||
<!-- <color name="indigo_800">#283593</color>-->
|
||||
<!-- <color name="indigo_900">#1A237E</color>-->
|
||||
<!-- <color name="indigo_A100">#8C9EFF</color>-->
|
||||
<!-- <color name="indigo_A200">#536DFE</color>-->
|
||||
<!-- <color name="indigo_A400">#3D5AFE</color>-->
|
||||
<!-- <color name="indigo_A700">#304FFE</color>-->
|
||||
<!-- <color name="indigo_800_overlay">#E6283593</color>-->
|
||||
|
||||
<!-- <color name="cyan_50">#E0F7FA</color>-->
|
||||
<!-- <color name="cyan_100">#B2EBF2</color>-->
|
||||
<!-- <color name="cyan_200">#80DEEA</color>-->
|
||||
<!-- <color name="cyan_300">#4DD0E1</color>-->
|
||||
<!-- <color name="cyan_400">#26C6DA</color>-->
|
||||
<!-- <color name="cyan_500">#00BCD4</color>-->
|
||||
<!-- <color name="cyan_600">#00ACC1</color>-->
|
||||
<!-- <color name="cyan_700">#0097A7</color>-->
|
||||
<!-- <color name="cyan_800">#00838F</color>-->
|
||||
<!-- <color name="cyan_900">#006064</color>-->
|
||||
<!-- <color name="cyan_A100">#84FFFF</color>-->
|
||||
<!-- <color name="cyan_A200">#18FFFF</color>-->
|
||||
<!-- <color name="cyan_A400">#00E5FF</color>-->
|
||||
<!-- <color name="cyan_A700">#00B8D4</color>-->
|
||||
<!-- <color name="cyan_800_overlay">#E600838F</color>-->
|
||||
|
||||
<!-- <color name="light_green_50">#F1F8E9</color>-->
|
||||
<!-- <color name="light_green_100">#DCEDC8</color>-->
|
||||
<!-- <color name="light_green_200">#C5E1A5</color>-->
|
||||
<!-- <color name="light_green_300">#AED581</color>-->
|
||||
<!-- <color name="light_green_400">#9CCC65</color>-->
|
||||
<!-- <color name="light_green_500">#8BC34A</color>-->
|
||||
<!-- <color name="light_green_600">#7CB342</color>-->
|
||||
<!-- <color name="light_green_700">#689F38</color>-->
|
||||
<!-- <color name="light_green_800">#558B2F</color>-->
|
||||
<!-- <color name="light_green_900">#33691E</color>-->
|
||||
<!-- <color name="light_green_A100">#CCFF90</color>-->
|
||||
<!-- <color name="light_green_A200">#B2FF59</color>-->
|
||||
<!-- <color name="light_green_A400">#76FF03</color>-->
|
||||
<!-- <color name="light_green_A700">#64DD17</color>-->
|
||||
|
||||
<!-- <color name="amber_50">#FFF8E1</color>-->
|
||||
<!-- <color name="amber_100">#FFECB3</color>-->
|
||||
<!-- <color name="amber_200">#FFE082</color>-->
|
||||
<!-- <color name="amber_300">#FFD54F</color>-->
|
||||
<!-- <color name="amber_400">#FFCA28</color>-->
|
||||
<!-- <color name="amber_500">#FFC107</color>-->
|
||||
<!-- <color name="amber_600">#FFB300</color>-->
|
||||
<!-- <color name="amber_700">#FFA000</color>-->
|
||||
<!-- <color name="amber_800">#FF8F00</color>-->
|
||||
<!-- <color name="amber_900">#FF6F00</color>-->
|
||||
<!-- <color name="amber_A100">#FFE57F</color>-->
|
||||
<!-- <color name="amber_A200">#FFD740</color>-->
|
||||
<!-- <color name="amber_A400">#FFC400</color>-->
|
||||
<!-- <color name="amber_A700">#FFAB00</color>-->
|
||||
|
||||
<!-- <color name="brown_50">#EFEBE9</color>-->
|
||||
<!-- <color name="brown_100">#D7CCC8</color>-->
|
||||
<!-- <color name="brown_200">#BCAAA4</color>-->
|
||||
<!-- <color name="brown_300">#A1887F</color>-->
|
||||
<!-- <color name="brown_400">#8D6E63</color>-->
|
||||
<!-- <color name="brown_500">#795548</color>-->
|
||||
<!-- <color name="brown_600">#6D4C41</color>-->
|
||||
<!-- <color name="brown_700">#5D4037</color>-->
|
||||
<!-- <color name="brown_800">#4E342E</color>-->
|
||||
<!-- <color name="brown_900">#3E2723</color>-->
|
||||
|
||||
<!-- <color name="purple_50">#F3E5F5</color>-->
|
||||
<!-- <color name="purple_100">#E1BEE7</color>-->
|
||||
<!-- <color name="purple_200">#CE93D8</color>-->
|
||||
<!-- <color name="purple_300">#BA68C8</color>-->
|
||||
<!-- <color name="purple_400">#AB47BC</color>-->
|
||||
<!-- <color name="purple_500">#9C27B0</color>-->
|
||||
<!-- <color name="purple_600">#8E24AA</color>-->
|
||||
<!-- <color name="purple_700">#7B1FA2</color>-->
|
||||
<!-- <color name="purple_800">#6A1B9A</color>-->
|
||||
<!-- <color name="purple_900">#4A148C</color>-->
|
||||
<!-- <color name="purple_A100">#EA80FC</color>-->
|
||||
<!-- <color name="purple_A200">#E040FB</color>-->
|
||||
<!-- <color name="purple_A400">#D500F9</color>-->
|
||||
<!-- <color name="purple_A700">#AA00FF</color>-->
|
||||
|
||||
<!-- <color name="blue_50">#E3F2FD</color>-->
|
||||
<!-- <color name="blue_100">#BBDEFB</color>-->
|
||||
<!-- <color name="blue_200">#90CAF9</color>-->
|
||||
<!-- <color name="blue_300">#64B5F6</color>-->
|
||||
<!-- <color name="blue_400">#42A5F5</color>-->
|
||||
<!-- <color name="blue_500">#2196F3</color>-->
|
||||
<!-- <color name="blue_600">#1E88E5</color>-->
|
||||
<!-- <color name="blue_700">#1976D2</color>-->
|
||||
<!-- <color name="blue_800">#1565C0</color>-->
|
||||
<!-- <color name="blue_900">#0D47A1</color>-->
|
||||
<!-- <color name="blue_A100">#82B1FF</color>-->
|
||||
<!-- <color name="blue_A200">#448AFF</color>-->
|
||||
<!-- <color name="blue_A400">#2979FF</color>-->
|
||||
<!-- <color name="blue_A700">#2962FF</color>-->
|
||||
|
||||
<!-- <color name="teal_50">#E0F2F1</color>-->
|
||||
<!-- <color name="teal_100">#B2DFDB</color>-->
|
||||
<!-- <color name="teal_200">#80CBC4</color>-->
|
||||
<!-- <color name="teal_300">#4DB6AC</color>-->
|
||||
<!-- <color name="teal_400">#26A69A</color>-->
|
||||
<!-- <color name="teal_500">#009688</color>-->
|
||||
<!-- <color name="teal_600">#00897B</color>-->
|
||||
<!-- <color name="teal_700">#00796B</color>-->
|
||||
<!-- <color name="teal_800">#00695C</color>-->
|
||||
<!-- <color name="teal_900">#004D40</color>-->
|
||||
<!-- <color name="teal_A100">#A7FFEB</color>-->
|
||||
<!-- <color name="teal_A200">#64FFDA</color>-->
|
||||
<!-- <color name="teal_A400">#1DE9B6</color>-->
|
||||
<!-- <color name="teal_A700">#00BFA5</color>-->
|
||||
|
||||
<!-- <color name="lime_50">#F9FBE7</color>-->
|
||||
<!-- <color name="lime_100">#F0F4C3</color>-->
|
||||
<!-- <color name="lime_200">#E6EE9C</color>-->
|
||||
<!-- <color name="lime_300">#DCE775</color>-->
|
||||
<!-- <color name="lime_400">#D4E157</color>-->
|
||||
<!-- <color name="lime_500">#CDDC39</color>-->
|
||||
<!-- <color name="lime_600">#C0CA33</color>-->
|
||||
<!-- <color name="lime_700">#AFB42B</color>-->
|
||||
<!-- <color name="lime_800">#9E9D24</color>-->
|
||||
<!-- <color name="lime_900">#827717</color>-->
|
||||
<!-- <color name="lime_A100">#F4FF81</color>-->
|
||||
<!-- <color name="lime_A200">#EEFF41</color>-->
|
||||
<!-- <color name="lime_A400">#C6FF00</color>-->
|
||||
<!-- <color name="lime_A700">#AEEA00</color>-->
|
||||
|
||||
<!-- <color name="orange_50">#FFF3E0</color>-->
|
||||
<!-- <color name="orange_100">#FFE0B2</color>-->
|
||||
<!-- <color name="orange_200">#FFCC80</color>-->
|
||||
<!-- <color name="orange_300">#FFB74D</color>-->
|
||||
<!-- <color name="orange_400">#FFA726</color>-->
|
||||
<!-- <color name="orange_500">#FF9800</color>-->
|
||||
<!-- <color name="orange_600">#FB8C00</color>-->
|
||||
<!-- <color name="orange_700">#F57C00</color>-->
|
||||
<!-- <color name="orange_800">#EF6C00</color>-->
|
||||
<!-- <color name="orange_900">#E65100</color>-->
|
||||
<!-- <color name="orange_A100">#FFD180</color>-->
|
||||
<!-- <color name="orange_A200">#FFAB40</color>-->
|
||||
<!-- <color name="orange_A400">#FF9100</color>-->
|
||||
<!-- <color name="orange_A700">#FF6D00</color>-->
|
||||
|
||||
<!-- <color name="grey_50">#FAFAFA</color>-->
|
||||
<!-- <color name="grey_100">#F5F5F5</color>-->
|
||||
<!-- <color name="grey_200">#EEEEEE</color>-->
|
||||
<!-- <color name="grey_300">#E0E0E0</color>-->
|
||||
<!-- <color name="grey_400">#BDBDBD</color>-->
|
||||
<!-- <color name="grey_500">#9E9E9E</color>-->
|
||||
<!-- <color name="grey_600">#757575</color>-->
|
||||
<!-- <color name="grey_700">#616161</color>-->
|
||||
<!-- <color name="grey_800">#424242</color>-->
|
||||
<!-- <color name="grey_900">#212121</color>-->
|
||||
<!-- <color name="grey_1000">#1a1a1a</color>-->
|
||||
|
||||
</resources>
|
||||
18
app/src/main/res/values/dimens.xml
Normal file
@ -0,0 +1,18 @@
|
||||
<resources>
|
||||
<dimen name="text_size_21sp">21sp</dimen>
|
||||
<dimen name="text_size_14sp">14sp</dimen>
|
||||
<dimen name="text_size_22sp">22sp</dimen>
|
||||
<dimen name="text_size_17sp">17sp</dimen>
|
||||
|
||||
<dimen name="pading_12dp">12dp</dimen>
|
||||
<dimen name="padding_19dp">19dp</dimen>
|
||||
<dimen name="padding_27dp">27dp</dimen>
|
||||
<dimen name="padding_34dp">34dp</dimen>
|
||||
<dimen name="circle_20">20dp</dimen>
|
||||
|
||||
<dimen name="dp_4dp">4dp</dimen>
|
||||
<dimen name="dp_11dp">11dp</dimen>
|
||||
<dimen name="dp_16dp">16dp</dimen>
|
||||
<dimen name="dp_47dp">47dp</dimen>
|
||||
<dimen name="top_dp">37dp</dimen>
|
||||
</resources>
|
||||
22
app/src/main/res/values/strings.xml
Normal file
@ -0,0 +1,22 @@
|
||||
<resources>
|
||||
<string name="app_name">Brain Test</string>
|
||||
<string name="app_name_welcome">Welcome to Brain test</string>
|
||||
<string name="str_play">Play</string>
|
||||
<string name="str_time_out">Time Out</string>
|
||||
<string name="str_time_out_content">the time has expired, please try again</string>
|
||||
<string name="str_play_again">Play Again</string>
|
||||
<string name="str_text_exit">Exit</string>
|
||||
<string name="str_text_next_level">Next Level</string>
|
||||
<string name="str_about_dialog_title">This is an interesting Brain test game.</string>
|
||||
<string name="str_rate">Rate Brain test</string>
|
||||
<string name="str_LevelValue">LevelValue%s</string>
|
||||
<string name="str_google_play">https://play.google.com/store/apps/details?id=%s</string>
|
||||
<string name="str_share_title">Here is a fun Brain test game</string>
|
||||
<string name="str_wrong">Wrong</string>
|
||||
<string name="str_you_lose">You lose, please try again</string>
|
||||
<string name="str_text_question">Question</string>
|
||||
<string name="str_great">Great, you win</string>
|
||||
<string name="str_text_win_content">You have passed this level</string>
|
||||
<string name="share">Share Games</string>
|
||||
<string name="about">About Games</string>
|
||||
</resources>
|
||||
16
app/src/main/res/values/themes.xml
Normal file
@ -0,0 +1,16 @@
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
<!-- Base application theme. -->
|
||||
<style name="Theme.BrainTest" parent="Theme.MaterialComponents.DayNight.NoActionBar.Bridge">
|
||||
<!-- Primary brand color. -->
|
||||
<!-- <item name="colorPrimary">@color/app_theme1</item>-->
|
||||
<!-- <item name="colorPrimaryVariant">@color/app_home_bg_color</item>-->
|
||||
<!-- <item name="colorOnPrimary">@color/app_theme2</item>-->
|
||||
<!-- <!– Secondary brand color. –>-->
|
||||
<!-- <item name="colorSecondary">@color/app_theme3</item>-->
|
||||
<!-- <item name="colorSecondaryVariant">@color/app_theme4</item>-->
|
||||
<!-- <item name="colorOnSecondary">@color/app_theme5</item>-->
|
||||
<!-- Status bar color. -->
|
||||
<item name="android:statusBarColor">@color/white</item>
|
||||
<!-- Customize your theme here. -->
|
||||
</style>
|
||||
</resources>
|
||||
13
app/src/main/res/xml/backup_rules.xml
Normal file
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
Sample backup rules file; uncomment and customize as necessary.
|
||||
See https://developer.android.com/guide/topics/data/autobackup
|
||||
for details.
|
||||
Note: This file is ignored for devices older that API 31
|
||||
See https://developer.android.com/about/versions/12/backup-restore
|
||||
-->
|
||||
<full-backup-content>
|
||||
<!--
|
||||
<include domain="sharedpref" path="."/>
|
||||
<exclude domain="sharedpref" path="device.xml"/>
|
||||
-->
|
||||
</full-backup-content>
|
||||
19
app/src/main/res/xml/data_extraction_rules.xml
Normal file
@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
Sample data extraction rules file; uncomment and customize as necessary.
|
||||
See https://developer.android.com/about/versions/12/backup-restore#xml-changes
|
||||
for details.
|
||||
-->
|
||||
<data-extraction-rules>
|
||||
<cloud-backup>
|
||||
<!-- TODO: Use <include> and <exclude> to control what is backed up.
|
||||
<include .../>
|
||||
<exclude .../>
|
||||
-->
|
||||
</cloud-backup>
|
||||
<!--
|
||||
<device-transfer>
|
||||
<include .../>
|
||||
<exclude .../>
|
||||
</device-transfer>
|
||||
-->
|
||||
</data-extraction-rules>
|
||||
BIN
app/testIntelligenceTest.jks
Normal file
6
build.gradle
Normal file
@ -0,0 +1,6 @@
|
||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||
plugins {
|
||||
id 'com.android.application' version '8.1.3' apply false
|
||||
// id 'com.android.library' version '8.1.3' apply false
|
||||
id 'org.jetbrains.kotlin.android' version '1.7.20' apply false
|
||||
}
|
||||
25
gradle.properties
Normal file
@ -0,0 +1,25 @@
|
||||
# Project-wide Gradle settings.
|
||||
# IDE (e.g. Android Studio) users:
|
||||
# Gradle settings configured through the IDE *will override*
|
||||
# any settings specified in this file.
|
||||
# For more details on how to configure your build environment visit
|
||||
# http://www.gradle.org/docs/current/userguide/build_environment.html
|
||||
# Specifies the JVM arguments used for the daemon process.
|
||||
# The setting is particularly useful for tweaking memory settings.
|
||||
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
|
||||
# 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
|
||||
# AndroidX package structure to make it clearer which packages are bundled with the
|
||||
# Android operating system, and which are packaged with your app's APK
|
||||
# https://developer.android.com/topic/libraries/support-library/androidx-rn
|
||||
android.useAndroidX=true
|
||||
# Automatically convert third-party libraries to use AndroidX
|
||||
android.enableJetifier=true
|
||||
# Kotlin code style for this project: "official" or "obsolete":
|
||||
kotlin.code.style=official
|
||||
# Enables namespacing of each library's R class so that its R class includes only the
|
||||
# resources declared in the library itself and none from the library's dependencies,
|
||||
# thereby reducing the size of the R class for that library
|
||||
android.nonTransitiveRClass=true
|
||||
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Normal file
6
gradle/wrapper/gradle-wrapper.properties
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
#Tue Jun 25 17:00:52 CST 2024
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
185
gradlew
vendored
Normal file
@ -0,0 +1,185 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
#
|
||||
# Copyright 2015 the original author or authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# https://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
##
|
||||
## Gradle start up script for UN*X
|
||||
##
|
||||
##############################################################################
|
||||
|
||||
# Attempt to set APP_HOME
|
||||
# Resolve links: $0 may be a link
|
||||
PRG="$0"
|
||||
# Need this for relative symlinks.
|
||||
while [ -h "$PRG" ] ; do
|
||||
ls=`ls -ld "$PRG"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG=`dirname "$PRG"`"/$link"
|
||||
fi
|
||||
done
|
||||
SAVED="`pwd`"
|
||||
cd "`dirname \"$PRG\"`/" >/dev/null
|
||||
APP_HOME="`pwd -P`"
|
||||
cd "$SAVED" >/dev/null
|
||||
|
||||
APP_NAME="Gradle"
|
||||
APP_BASE_NAME=`basename "$0"`
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD="maximum"
|
||||
|
||||
warn () {
|
||||
echo "$*"
|
||||
}
|
||||
|
||||
die () {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
}
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
nonstop=false
|
||||
case "`uname`" in
|
||||
CYGWIN* )
|
||||
cygwin=true
|
||||
;;
|
||||
Darwin* )
|
||||
darwin=true
|
||||
;;
|
||||
MINGW* )
|
||||
msys=true
|
||||
;;
|
||||
NONSTOP* )
|
||||
nonstop=true
|
||||
;;
|
||||
esac
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
# IBM's JDK on AIX uses strange locations for the executables
|
||||
JAVACMD="$JAVA_HOME/jre/sh/java"
|
||||
else
|
||||
JAVACMD="$JAVA_HOME/bin/java"
|
||||
fi
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
else
|
||||
JAVACMD="java"
|
||||
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
|
||||
MAX_FD_LIMIT=`ulimit -H -n`
|
||||
if [ $? -eq 0 ] ; then
|
||||
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
||||
MAX_FD="$MAX_FD_LIMIT"
|
||||
fi
|
||||
ulimit -n $MAX_FD
|
||||
if [ $? -ne 0 ] ; then
|
||||
warn "Could not set maximum file descriptor limit: $MAX_FD"
|
||||
fi
|
||||
else
|
||||
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
|
||||
fi
|
||||
fi
|
||||
|
||||
# For Darwin, add options to specify how the application appears in the dock
|
||||
if $darwin; then
|
||||
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
||||
fi
|
||||
|
||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
|
||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||
|
||||
JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||
|
||||
# We build the pattern for arguments to be converted via cygpath
|
||||
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
||||
SEP=""
|
||||
for dir in $ROOTDIRSRAW ; do
|
||||
ROOTDIRS="$ROOTDIRS$SEP$dir"
|
||||
SEP="|"
|
||||
done
|
||||
OURCYGPATTERN="(^($ROOTDIRS))"
|
||||
# Add a user-defined pattern to the cygpath arguments
|
||||
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
|
||||
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
|
||||
fi
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
i=0
|
||||
for arg in "$@" ; do
|
||||
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
|
||||
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
|
||||
|
||||
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
|
||||
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
|
||||
else
|
||||
eval `echo args$i`="\"$arg\""
|
||||
fi
|
||||
i=`expr $i + 1`
|
||||
done
|
||||
case $i in
|
||||
0) set -- ;;
|
||||
1) set -- "$args0" ;;
|
||||
2) set -- "$args0" "$args1" ;;
|
||||
3) set -- "$args0" "$args1" "$args2" ;;
|
||||
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
||||
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
||||
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
||||
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
||||
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
||||
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# Escape application args
|
||||
save () {
|
||||
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
||||
echo " "
|
||||
}
|
||||
APP_ARGS=`save "$@"`
|
||||
|
||||
# Collect all arguments for the java command, following the shell quoting and substitution rules
|
||||
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
|
||||
|
||||
exec "$JAVACMD" "$@"
|
||||
89
gradlew.bat
vendored
Normal file
@ -0,0 +1,89 @@
|
||||
@rem
|
||||
@rem Copyright 2015 the original author or authors.
|
||||
@rem
|
||||
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@rem you may not use this file except in compliance with the License.
|
||||
@rem You may obtain a copy of the License at
|
||||
@rem
|
||||
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||
@rem
|
||||
@rem Unless required by applicable law or agreed to in writing, software
|
||||
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%" == "" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%" == "" set DIRNAME=.
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if "%ERRORLEVEL%" == "0" goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||
exit /b 1
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
||||
6
keystore.properties
Normal file
@ -0,0 +1,6 @@
|
||||
app_name=Brain Test
|
||||
package_name=com.braintest.brain.iq
|
||||
keystoreFile=app/BrainTest.jks
|
||||
key_alias=BrainTestkey0
|
||||
key_store_password=BrainTest
|
||||
key_password=BrainTest
|
||||
16
settings.gradle
Normal file
@ -0,0 +1,16 @@
|
||||
pluginManagement {
|
||||
repositories {
|
||||
gradlePluginPortal()
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
||||
dependencyResolutionManagement {
|
||||
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
||||
rootProject.name = "Brain Test"
|
||||
include ':app'
|
||||