V1.0.2(3)

This commit is contained in:
litingting 2024-08-30 16:51:41 +08:00
commit 71266e20f4
70 changed files with 3869 additions and 0 deletions

15
.gitignore vendored Normal file
View 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
View 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/IntelligenceGames.jks Normal file

Binary file not shown.

50
app/build.gradle Normal file
View File

@ -0,0 +1,50 @@
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.iq.intelligence.study'
compileSdk 34
defaultConfig {
//com.iq.intelligence.games
applicationId "com.iq.intelligence.games"
minSdk 23
targetSdk 34
versionCode 3
versionName "1.0.2"
setProperty("archivesBaseName", "Intelligence Games_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.6.0'
}
buildFeatures {
viewBinding true
}
aaptOptions.cruncherEnabled = false
aaptOptions.useNewCruncher = false
}
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'
}

21
app/proguard-rules.pro vendored Normal file
View 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

View File

@ -0,0 +1,33 @@
<?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: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.Intelligence"
tools:targetApi="31" >
<activity android:name=".IntoActivity"
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="com.iq.intelligence.study.MainActivity" />
<activity android:name="com.iq.intelligence.study.GameMainActivity"
android:parentActivityName="com.iq.intelligence.study.LevelsPageActivity" />
<activity android:name="com.iq.intelligence.study.LevelsPageActivity" />
</application>
</manifest>

View File

@ -0,0 +1,77 @@
package com.iq.intelligence.study;
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.iq.intelligence.study.databinding.ItemLevelsBinding;
import java.util.List;
public class GameLevelsAdapter extends RecyclerView.Adapter<GameLevelsAdapter.LevelsViewHolder> {
private Context mContext;
private List<LevelsBean> list;
public GameLevelsAdapter(Context context, List<LevelsBean> list) {
mContext = context;
this.list = list;
}
@NonNull
@Override
public LevelsViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
ItemLevelsBinding levelsBinding = ItemLevelsBinding.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(PrescribedValue.LEVELS_NUMBER, i);
Intent quiz = new Intent(mContext, GameMainActivity.class);
quiz.putExtras(bundle);
mContext.startActivity(quiz);
});
LevelsBean 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 ItemLevelsBinding itemLevelsBinding;
public LevelsViewHolder(@NonNull ItemLevelsBinding itemView) {
super(itemView.getRoot());
itemLevelsBinding = itemView;
}
}
}

View File

@ -0,0 +1,381 @@
package com.iq.intelligence.study;
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 GameMainActivity extends AppCompatActivity {
private ProgressBar progressBar;
private CountDownTimer myTimer;
private int levelNumber;
private TextView questionText, textQuestionNumber;
private Button answer1, answer2, answer3, answer4;
private GameQuestions questionManager;
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.page_game);
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(PrescribedValue.LEVELS_NUMBER);
questionNumber = (levelNumber-1)*5+questionNumber;
getNextQuestion();
prefs = getSharedPreferences(PrescribedValue.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.data_background));
answer2.setBackground(getDrawable(R.drawable.data_background));
answer3.setBackground(getDrawable(R.drawable.data_background));
answer4.setBackground(getDrawable(R.drawable.data_background));
textQuestionNumber.setText(getString(R.string.text_question) + " " + questionNumber);
}
private void getQuestionNumbers(int num) {
String[] theQuestion = questionManager.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 = questionManager.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.right_bg));
}
@SuppressLint("UseCompatLoadingForDrawables")
private void wrongAnswer(Button button) {
button.setBackground(getDrawable(R.drawable.wrong_background));
}
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.count_time_finish);
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(PrescribedValue.LEVELS_NUMBER, levelNumber);
Intent intent = new Intent(GameMainActivity.this, GameMainActivity.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.lose_dialog);
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(PrescribedValue.LEVELS_NUMBER, levelNumber);
Intent intent = new Intent(GameMainActivity.this, GameMainActivity.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.pass_dialog);
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(PrescribedValue.LEVELS_NUMBER, levelNumber);
Intent intent = new Intent(GameMainActivity.this, GameMainActivity.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.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();
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,69 @@
package com.iq.intelligence.study;
import android.content.Intent;
import android.os.Bundle;
import android.os.CountDownTimer;
import android.os.Handler;
import android.view.View;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.ImageView;
import android.widget.ProgressBar;
import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity;
import androidx.cardview.widget.CardView;
public class IntoActivity extends AppCompatActivity {
static int splashTimeOut = 2000 ;
private ProgressBar progressBar;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.page_into);
progressBar = findViewById(R.id.h_progress);
View dectorView = getWindow().getDecorView();
dectorView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE |
View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION |
View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN |
View.SYSTEM_UI_FLAG_HIDE_NAVIGATION |
View.SYSTEM_UI_FLAG_FULLSCREEN |
View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY);
CardView logo = findViewById(R.id.logo);
TextView appNameText = findViewById(R.id.appName);
new Handler().postDelayed(() -> {
}, splashTimeOut);
CountDownTimer countDownTimer = new CountDownTimer(splashTimeOut, 100) {
@Override
public void onTick(long millisUntilFinished) {
float l1 = (float)millisUntilFinished / splashTimeOut;
float v = 100-l1 * 100;
progressBar.setProgress((int) v);
}
@Override
public void onFinish() {
progressBar.setProgress(100);
Intent mainActivity = new Intent(IntoActivity.this, MainActivity.class);
mainActivity.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(mainActivity);
finish();
}
};
countDownTimer.start();
Animation myAnim = AnimationUtils.loadAnimation(this,R.anim.goto_alpha);
logo.startAnimation(myAnim);
appNameText.startAnimation(myAnim);
}
}

View File

@ -0,0 +1,25 @@
package com.iq.intelligence.study;
public class LevelsBean {
public LevelsBean(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;
}
}

View File

@ -0,0 +1,80 @@
package com.iq.intelligence.study;
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 LevelsPageActivity extends AppCompatActivity {
SharedPreferences prefs;
private RecyclerView recyclerView;
private List<LevelsBean> list;
private GameLevelsAdapter levelsAdapter;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.game_grades);
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(PrescribedValue.PRE_FILE, Context.MODE_PRIVATE);
initList();
}
private void initList() {
SharedPreferences.Editor edit = prefs.edit();
edit.putBoolean(String.format(getString(R.string.LevelValue), String.valueOf(1)), true);
edit.apply();
list = new ArrayList<>();
for (int i = 0; i < 20; i++) {
LevelsBean levelsBean;
int levels = i + 1;
String format = String.format(getString(R.string.LevelValue), String.valueOf(levels));
boolean aBoolean = prefs.getBoolean(format, false);
levelsBean = new LevelsBean(aBoolean, levels);
list.add(levelsBean);
}
levelsAdapter = new GameLevelsAdapter(this, list);
recyclerView.setAdapter(levelsAdapter);
recyclerView.setLayoutManager(new GridLayoutManager(this, 5));
}
@Override
protected void onStart() {
super.onStart();
for (LevelsBean bean : list) {
int index = list.indexOf(bean);
String format = String.format(getString(R.string.LevelValue), String.valueOf(bean.getLevels()));
boolean aBoolean = prefs.getBoolean(format, false);
if (aBoolean) {
bean.setUnlock(aBoolean);
levelsAdapter.updateUnlock(index);
}
}
}
}

View File

@ -0,0 +1,102 @@
package com.iq.intelligence.study;
import android.annotation.SuppressLint;
import android.app.Dialog;
import android.content.Intent;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.graphics.drawable.ColorDrawable;
import android.net.Uri;
import android.os.Bundle;
import android.util.Log;
import android.view.Window;
import android.view.WindowManager;
import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity;
import com.balysv.materialripple.BuildConfig;
public class MainActivity extends AppCompatActivity {
TextView startBtn, shareBtn, exitBtn, aboutBtn;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.page_main);
startBtn = findViewById(R.id.btn_start);
shareBtn = findViewById(R.id.btn_share_game);
aboutBtn = findViewById(R.id.btn_about_game);
exitBtn = findViewById(R.id.btn_exit);
startBtn.setOnClickListener(v -> {
Intent page2 = new Intent(MainActivity.this, LevelsPageActivity.class);
startActivity(page2);
});
shareBtn.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.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"));
});
aboutBtn.setOnClickListener(v -> showDialogAbout());
exitBtn.setOnClickListener(v -> finish());
}
private void showDialogAbout() {
final Dialog dialog = new Dialog(this);
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE); // before
dialog.setContentView(R.layout.game_introduce);
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 tvVersion = (TextView) dialog.findViewById(R.id.tv_version);
try {
PackageInfo packageInfo = getPackageManager().getPackageInfo(getPackageName(), 0);
tvVersion.setText(String.format(getString(R.string.app_v), packageInfo.versionName));
} catch (PackageManager.NameNotFoundException exception) {
tvVersion.setText(String.format(getString(R.string.app_v), "1.0.1"));
}
dialog.findViewById(R.id.bt_privacy_policy).setOnClickListener(v -> {
Uri parse = Uri.parse(PrescribedValue.URL_PRIVACY);
Intent moreApp = new Intent(Intent.ACTION_VIEW);
moreApp.setData(parse);
startActivity(moreApp);
});
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.google_play), getPackageName());
Uri uri = Uri.parse(format);
Intent goToMarket = new Intent(Intent.ACTION_VIEW, uri);
Log.d("---", "---format=" + format);
startActivity(goToMarket);
});
dialog.show();
dialog.getWindow().setAttributes(lp);
}
}

View File

@ -0,0 +1,13 @@
package com.iq.intelligence.study;
public class PrescribedValue {
//隐私政策链接
public static final String URL_PRIVACY = "https://com.iq.intelligence.games/privacy.html";
public static final String PRE_FILE = "share_game";
public static final String LEVELS_NUMBER ="gradesNumber";
}

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<alpha
xmlns:android="http://schemas.android.com/apk/res/android"
android:fromAlpha="0.0"
android:toAlpha="1.0"
android:duration="1500">
</alpha>

View 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>

View File

@ -0,0 +1,12 @@
<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="#000000"
android:fillType="evenOdd"
android:strokeColor="#00000000"/>
</vector>

View 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="#000000"
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>

View 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/white" />
<corners
android:bottomLeftRadius="@dimen/corners_20"
android:bottomRightRadius="@dimen/corners_20"
android:topLeftRadius="@dimen/corners_20"
android:topRightRadius="@dimen/corners_20" />
</shape>

View 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/app_main_background_color"/>
<corners android:radius="15dp"/>
</shape>

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/white" />
<corners android:radius="@dimen/corners_20" />
</shape>

View 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">
<corners android:radius="@dimen/corners_20"/>
<solid android:color="@color/app_pressed_btn"/>
</shape>

View 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/app_main_background_color"/>
</shape>

View 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/white" />
</shape>
</item>
<item android:id="@+id/progress">
<clip>
<shape>
<corners android:radius="6dp"/>
<solid android:color="@color/app_wrong_color" />
</shape>
</clip>
</item>
</layer-list>

View 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/app_button" />
<size
android:width="24dp"
android:height="24dp" />
</shape>

View 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_pass_color">
<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>

View File

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@android:id/background">
<shape>
<corners android:radius="10dp" />
<solid android:color="@color/background" />
</shape>
</item>
<item android:id="@android:id/progress">
<clip>
<shape>
<corners android:radius="10dp" />
<gradient
android:angle="0"
android:centerColor="@color/center"
android:endColor="@color/end"
android:startColor="@color/start" />
</shape>
</clip>
</item>
</layer-list>

View 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_pass_color" />
<!-- right answer bg-->
<corners
android:bottomLeftRadius="@dimen/corners_20"
android:bottomRightRadius="@dimen/corners_20"
android:topLeftRadius="@dimen/corners_20"
android:topRightRadius="@dimen/corners_20" />
</shape>

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true">
<shape android:shape="rectangle">
<stroke android:width="2dp" android:color="@color/app_pressed_btn"/>
<solid android:color="@color/app_pressed_btn"/>
<corners android:radius="@dimen/corners_20"/>
</shape>
</item>
<item>
<shape android:shape="rectangle">
<stroke android:width="2dp" android:color="@color/app_button"/>
<solid android:color="@color/app_button"/>
<corners android:radius="@dimen/corners_20"/>
</shape>
</item>
</selector>

View 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_wrong_color" />
<!-- wrong answer bg-->
<corners
android:bottomLeftRadius="@dimen/corners_20"
android:bottomRightRadius="@dimen/corners_20"
android:topLeftRadius="@dimen/corners_20"
android:topRightRadius="@dimen/corners_20" />
</shape>

View 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_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>

Binary file not shown.

View File

@ -0,0 +1,121 @@
<?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/dialog_background"
android:gravity="center"
android:orientation="vertical">
<LinearLayout
android:id="@+id/close"
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/close_dialog" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="@dimen/spacing_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/app_wrong_color" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/spacing_11dp"
android:fontFamily="@font/gamefont"
android:gravity="center"
android:text="@string/time_count"
android:textAppearance="@style/TextAppearance.AppCompat.Large"
android:textColor="@color/app_wrong_color"
android:textStyle="bold" />
</LinearLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="@dimen/spacing_16dp"
android:autoLink="web"
android:fontFamily="@font/gamefont"
android:text="@string/time_out_content"
android:textAlignment="center"
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
android:textColor="@color/black" />
</LinearLayout>
<Button
android:id="@+id/bt_play_again"
style="@style/Widget.AppCompat.Button.Borderless"
android:layout_width="match_parent"
android:layout_height="@dimen/spacing_47dp"
android:layout_marginHorizontal="16dp"
android:background="@drawable/dilaog_button"
android:gravity="center"
android:text="@string/re_play"
android:textColor="@color/black"
app:fontFamily="@font/gamefont" />
<View
android:layout_width="0dp"
android:layout_height="@dimen/spacing_11dp" />
<com.balysv.materialripple.MaterialRippleLayout
android:id="@+id/bt_close"
style="@style/RippleStyleWhite"
android:layout_width="match_parent"
android:layout_height="@dimen/spacing_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/exit"
android:textAppearance="@style/Base.TextAppearance.AppCompat.Subhead"
android:textColor="@color/black"
app:fontFamily="@font/gamefont" />
</com.balysv.materialripple.MaterialRippleLayout>
</LinearLayout>
</FrameLayout>

View File

@ -0,0 +1,17 @@
<?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:background="@drawable/home_background">
<include layout="@layout/page_top_bar" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/levels_list"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>

View File

@ -0,0 +1,129 @@
<?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/dialog_background"
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/close_dialog"
app:tint="@color/black" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="-40dp"
android:orientation="vertical"
android:padding="@dimen/spacing_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">
<androidx.cardview.widget.CardView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:cardCornerRadius="10dp">
<ImageView
android:id="@+id/imageView"
android:layout_width="80dp"
android:layout_height="80dp"
app:srcCompat="@mipmap/logo" />
</androidx.cardview.widget.CardView>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/spacing_11dp"
android:fontFamily="@font/gamefont"
android:text="@string/app_name"
android:textAppearance="@style/TextAppearance.AppCompat.Large"
android:textColor="@color/black"
android:textStyle="bold" />
<TextView
android:id="@+id/tv_version"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/spacing_4dp"
android:fontFamily="@font/gamefont"
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
android:textColor="@color/app_game_version" />
</LinearLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="@dimen/spacing_16dp"
android:autoLink="web"
android:fontFamily="@font/gamefont"
android:text="@string/about_game"
android:textAlignment="center"
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
android:textColor="@color/black" />
</LinearLayout>
<Button
android:id="@+id/bt_rateUs"
style="@style/Widget.AppCompat.Button.Borderless"
android:layout_width="match_parent"
android:layout_height="@dimen/spacing_47dp"
android:layout_marginStart="22dp"
android:layout_marginEnd="22dp"
android:background="@drawable/dilaog_button"
android:gravity="center"
android:text="@string/rate"
android:textColor="@color/black"
app:fontFamily="@font/gamefont" />
<Button
android:id="@+id/bt_privacy_policy"
style="@style/Widget.AppCompat.Button.Borderless"
android:layout_width="match_parent"
android:layout_height="@dimen/spacing_47dp"
android:layout_marginStart="22dp"
android:layout_marginTop="12dp"
android:layout_marginEnd="22dp"
android:background="@drawable/dilaog_button"
android:gravity="center"
android:text="@string/privacy_title"
android:textColor="@color/white"
android:visibility="gone"
app:fontFamily="@font/gamefont" />
<View
android:layout_width="0dp"
android:layout_height="@dimen/spacing_11dp" />
</LinearLayout>
</FrameLayout>

View 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="77dp">
<Button
android:id="@+id/levels_btn"
android:layout_width="54dp"
android:layout_height="54dp"
android:layout_gravity="center"
android:background="@drawable/level_background"
android:fontFamily="@font/gamefont"
android:text="1"
android:textColor="@color/white"
android:textSize="20sp" />
</FrameLayout>
</FrameLayout>

View File

@ -0,0 +1,126 @@
<?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/dialog_background"
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_icon"
android:layout_width="?attr/actionBarSize"
android:layout_height="?attr/actionBarSize"
android:background="?attr/selectableItemBackgroundBorderless"
android:src="@drawable/close_dialog" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:orientation="vertical"
android:padding="@dimen/spacing_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">
<androidx.cardview.widget.CardView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:cardCornerRadius="8dp">
<ImageView
android:id="@+id/imageView"
android:layout_width="80dp"
android:layout_height="80dp"
android:src="@mipmap/logo" />
</androidx.cardview.widget.CardView>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/spacing_11dp"
android:fontFamily="@font/gamefont"
android:gravity="center"
android:text="@string/wrong"
android:textAppearance="@style/TextAppearance.AppCompat.Large"
android:textColor="@color/app_wrong_color"
android:textStyle="bold" />
</LinearLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="@dimen/spacing_16dp"
android:autoLink="web"
android:fontFamily="@font/gamefont"
android:text="@string/lose_text"
android:textAlignment="center"
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
android:textColor="@color/black" />
</LinearLayout>
<Button
android:id="@+id/bt_play_again"
style="@style/Widget.AppCompat.Button.Borderless"
android:layout_width="match_parent"
android:layout_height="@dimen/spacing_47dp"
android:layout_marginHorizontal="16dp"
android:background="@drawable/dilaog_button"
android:gravity="center"
android:text="@string/re_play"
android:textColor="@color/black"
app:fontFamily="@font/gamefont" />
<View
android:layout_width="0dp"
android:layout_height="@dimen/spacing_11dp" />
<com.balysv.materialripple.MaterialRippleLayout
android:id="@+id/bt_close"
style="@style/RippleStyleWhite"
android:layout_width="match_parent"
android:layout_height="@dimen/spacing_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/exit"
android:textAppearance="@style/Base.TextAppearance.AppCompat.Subhead"
android:textColor="@color/black"
app:fontFamily="@font/gamefont" />
</com.balysv.materialripple.MaterialRippleLayout>
</LinearLayout>
</FrameLayout>

View File

@ -0,0 +1,137 @@
<?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:background="@drawable/home_background">
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/transparent">
<TextView
android:id="@+id/toolBar_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:fontFamily="@font/gamefont"
android:text="@string/app_name"
android:textColor="@color/black"
android:textSize="@dimen/text_17sp"
android:textStyle="bold" />
</androidx.appcompat.widget.Toolbar>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginHorizontal="@dimen/margin_12dp"
android:layout_marginTop="@dimen/Bar_Size"
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="12dp"
android:layout_marginTop="10dp"
android:indeterminate="false"
android:max="30"
android:progress="10"
android:progressDrawable="@drawable/lay_game_list" />
<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/gamefont"
android:gravity="center"
android:text="السؤال: 1"
android:textColor="@color/black"
android:textSize="@dimen/text_14sp" />
<TextView
android:id="@+id/QuestionText"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fontFamily="@font/gamefont"
android:gravity="center"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:text="@string/app_name"
android:textColor="#EAB106"
android:textSize="@dimen/text_21sp" />
</LinearLayout>
<Button
android:id="@+id/Answer1_Btn"
android:layout_width="match_parent"
android:layout_height="@dimen/margin_27dp"
android:layout_marginStart="25dp"
android:layout_marginTop="@dimen/margin_19dp"
android:layout_marginEnd="25dp"
android:layout_weight="0.1"
android:background="@drawable/data_background"
android:fontFamily="@font/gamefont"
android:text="الزرافة"
android:textColor="@color/black"
android:textSize="@dimen/text_17sp" />
<Button
android:id="@+id/Answer2_Btn"
android:layout_width="match_parent"
android:layout_height="@dimen/margin_27dp"
android:layout_marginStart="25dp"
android:layout_marginTop="@dimen/margin_19dp"
android:layout_marginEnd="25dp"
android:layout_weight="0.1"
android:background="@drawable/data_background"
android:fontFamily="@font/gamefont"
android:text="النعامة"
android:textColor="@color/black"
android:textSize="@dimen/text_17sp" />
<Button
android:id="@+id/Answer3_Btn"
android:layout_width="match_parent"
android:layout_height="@dimen/margin_27dp"
android:layout_marginStart="25dp"
android:layout_marginTop="@dimen/margin_19dp"
android:layout_marginEnd="25dp"
android:layout_weight="0.1"
android:background="@drawable/data_background"
android:fontFamily="@font/gamefont"
android:text="الفيل"
android:textColor="@color/black"
android:textSize="@dimen/text_17sp" />
<Button
android:id="@+id/Answer4_Btn"
android:layout_width="match_parent"
android:layout_height="@dimen/margin_27dp"
android:layout_marginStart="25dp"
android:layout_marginTop="@dimen/margin_19dp"
android:layout_marginEnd="25dp"
android:layout_weight="0.1"
android:background="@drawable/data_background"
android:fontFamily="@font/gamefont"
android:text="السلحفاة"
android:textColor="@color/black"
android:textSize="@dimen/text_17sp" />
</LinearLayout>
</RelativeLayout>

View File

@ -0,0 +1,50 @@
<?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"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/home_background">
<androidx.cardview.widget.CardView
android:id="@+id/logo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="230dp"
app:cardCornerRadius="10dp">
<ImageView
android:layout_width="130dp"
android:layout_height="130dp"
android:elevation="5dp"
android:src="@mipmap/logo" />
</androidx.cardview.widget.CardView>
<TextView
android:id="@+id/appName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/logo"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:layout_marginTop="110dp"
android:fontFamily="@font/gamefont"
android:text="@string/app_name"
android:textColor="@color/black"
android:textSize="@dimen/text_24sp" />
<ProgressBar
android:id="@+id/h_progress"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="match_parent"
android:layout_height="6dp"
android:layout_centerHorizontal="true"
android:layout_marginStart="33dp"
android:layout_marginEnd="33dp"
android:layout_marginBottom="40dp"
android:progress="10"
android:layout_alignParentBottom="true"
android:progressDrawable="@drawable/progressbar" />
</RelativeLayout>

View File

@ -0,0 +1,94 @@
<?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:background="@drawable/home_background">
<TextView
android:id="@+id/btn_exit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:fontFamily="@font/gamefont"
android:paddingLeft="20dp"
android:paddingTop="10dp"
android:paddingRight="40dp"
android:paddingBottom="10dp"
android:text="@string/exit"
android:textColor="@color/black"
android:textSize="@dimen/text_22sp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical">
<androidx.cardview.widget.CardView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:cardCornerRadius="10dp">
<ImageView
android:layout_width="200dp"
android:layout_height="200dp"
android:gravity="center"
android:src="@mipmap/logo" />
</androidx.cardview.widget.CardView>
<TextView
android:id="@+id/btn_start"
android:layout_width="250dp"
android:layout_height="wrap_content"
android:layout_marginHorizontal="@dimen/margin_34dp"
android:layout_marginTop="50dp"
android:background="@drawable/selector_main_btn"
android:fontFamily="@font/gamefont"
android:gravity="center"
android:paddingLeft="40dp"
android:paddingTop="10dp"
android:paddingRight="40dp"
android:paddingBottom="10dp"
android:text="@string/start"
android:textColor="@color/white"
android:textSize="@dimen/text_22sp" />
<TextView
android:id="@+id/btn_share_game"
android:layout_width="250dp"
android:layout_height="wrap_content"
android:layout_marginHorizontal="@dimen/margin_34dp"
android:layout_marginTop="20dp"
android:background="@drawable/exit"
android:fontFamily="@font/gamefont"
android:gravity="center"
android:paddingLeft="40dp"
android:paddingTop="10dp"
android:paddingRight="40dp"
android:paddingBottom="10dp"
android:text="@string/share_iq_game"
android:textColor="@color/white"
android:textSize="@dimen/text_22sp" />
<TextView
android:id="@+id/btn_about_game"
android:layout_width="250dp"
android:layout_height="wrap_content"
android:layout_marginHorizontal="@dimen/margin_34dp"
android:layout_marginTop="20dp"
android:background="@drawable/exit"
android:fontFamily="@font/gamefont"
android:gravity="center"
android:paddingLeft="40dp"
android:paddingTop="10dp"
android:paddingRight="40dp"
android:paddingBottom="10dp"
android:text="@string/about_iq_game"
android:textColor="@color/white"
android:textSize="@dimen/text_22sp" />
</LinearLayout>
</RelativeLayout>

View 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/back_page" />
<TextView
android:id="@+id/toolBar_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:fontFamily="@font/gamefont"
android:text="IQ Game"
android:textColor="@color/black"
android:textSize="18sp"
android:textStyle="bold" />
</androidx.appcompat.widget.Toolbar>

View File

@ -0,0 +1,120 @@
<?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/dialog_background">
<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/close_dialog"
app:tint="@color/black" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="@dimen/spacing_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/pass_dialog" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/spacing_11dp"
android:text="@string/pass_text"
android:textAppearance="@style/TextAppearance.AppCompat.Large"
android:textColor="@color/app_pass_color"
android:gravity="center"
android:textStyle="bold"
android:fontFamily="@font/gamefont"/>
</LinearLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="@dimen/spacing_16dp"
android:autoLink="web"
android:text="@string/text_win_content"
android:textAlignment="center"
android:fontFamily="@font/gamefont"
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
android:textColor="@color/black" />
</LinearLayout>
<Button
android:id="@+id/bt_play_again"
style="@style/Widget.AppCompat.Button.Borderless"
android:layout_width="match_parent"
android:layout_height="@dimen/spacing_47dp"
android:gravity="center"
android:text="@string/game_next_level"
android:textColor="@color/black"
app:fontFamily="@font/gamefont"
android:layout_marginHorizontal="16dp"
android:background="@drawable/dilaog_button" />
<View
android:layout_width="0dp"
android:layout_height="@dimen/spacing_11dp" />
<com.balysv.materialripple.MaterialRippleLayout
android:id="@+id/bt_close"
style="@style/RippleStyleWhite"
android:layout_width="match_parent"
android:layout_height="@dimen/spacing_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/exit"
android:textAppearance="@style/Base.TextAppearance.AppCompat.Subhead"
android:textColor="@color/black"
app:fontFamily="@font/gamefont" />
</com.balysv.materialripple.MaterialRippleLayout>
</LinearLayout>
</FrameLayout>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 982 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

View File

@ -0,0 +1,16 @@
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<style name="Theme.Intelligence" parent="Theme.MaterialComponents.DayNight.NoActionBar.Bridge">
<!-- Primary brand color. -->
<item name="colorPrimary">@color/app_t1</item>
<item name="colorPrimaryVariant">@color/app_main_background_color</item>
<item name="colorOnPrimary">@color/app_t2</item>
<!-- Secondary brand color. -->
<item name="colorSecondary">@color/app_t3</item>
<item name="colorSecondaryVariant">@color/app_t4</item>
<item name="colorOnSecondary">@color/app_t5</item>
<!-- Status bar color. -->
<item name="android:statusBarColor">?attr/colorPrimaryVariant</item>
<!-- Customize your theme here. -->
</style>
</resources>

View File

@ -0,0 +1,289 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="black">#FF000000</color>
<color name="white">#FFFFFFFF</color>
<color name="app_main_background_color">#F1EBD8</color> <!--所有页面背景颜色-->
<color name="app_answer_data_color">#80D6CF8A</color>
<color name="app_pass_color">#388E3C</color> <!--right answer-->
<color name="app_wrong_color">#F65959</color> <!--wrong answer-->
<color name="app_dialog_top">#FDD835</color><!--wrong answer-->
<color name="app_time_count">#F6E65F</color>
<color name="app_game_version">#80FFFFFF</color>
<color name="app_button">#FFD452</color><!--levels item-->
<color name="app_pressed_btn">#A8D7DD</color>
<!--控制theme主题颜色的-->
<color name="app_t1">#CBEAA8</color>
<color name="app_t2">#FFFFFFFF</color>
<color name="app_t3">#80CBC4</color>
<color name="app_t4">#f87684</color>
<color name="app_t5">#7364C5</color>
<color name="background">#80FFFFFF</color>
<color name="start">#1e9ed0</color>
<color name="center">#1e9ed0</color>
<color name="end">#1e9ed0</color>
<!-- <color name="game_test">#7B67E6</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>

View File

@ -0,0 +1,22 @@
<resources>
<!-- Default screen margins, per the Android Design guidelines. -->
<dimen name="Bar_Size">50dp</dimen>
<dimen name="text_21sp">20sp</dimen>
<dimen name="text_17sp">15sp</dimen>
<dimen name="text_14sp">12sp</dimen>
<dimen name="text_22sp">20sp</dimen>
<dimen name="text_24sp">20sp</dimen>
<dimen name="margin_12dp">15dp</dimen>
<dimen name="margin_19dp">20dp</dimen>
<dimen name="margin_27dp">25dp</dimen>
<dimen name="margin_34dp">35dp</dimen>
<dimen name="corners_20">25dp</dimen>
<dimen name="spacing_4dp">5dp</dimen>
<dimen name="spacing_11dp">10dp</dimen>
<dimen name="spacing_16dp">15dp</dimen>
<dimen name="spacing_47dp">45dp</dimen>
</resources>

View File

@ -0,0 +1,23 @@
<resources>
<string name="app_name">Intelligence Games</string>
<string name="start">Start</string>
<string name="time_count">Timed out, please enter again</string>
<string name="time_out_content">Pity! the time has expired, please try again</string>
<string name="re_play">Play Again</string>
<string name="exit">Exit</string>
<string name="wrong">The answer is incorrect</string>
<string name="lose_text">You lose, please try again,come on!</string>
<string name="text_question">Question</string>
<string name="pass_text">Congratulations, you passed</string>
<string name="text_win_content">Congratulations,you have successfully completed this level</string>
<string name="game_next_level">Next Level</string>
<string name="share_iq_game">Share</string>
<string name="about_iq_game">Detail</string>
<string name="about_game">It is a fun IQ test game.Play it with us!</string>
<string name="rate">Rate the Game</string>
<string name="privacy_title">Privacy Policy</string>
<string name="LevelValue">LevelValue%s</string>
<string name="google_play">https://play.google.com/store/apps/details?id=%s</string>
<string name="share_title">It is a fun IQ test game</string>
<string name="app_v">Version V%s</string>
</resources>

View File

@ -0,0 +1,9 @@
<resources xmlns:tools="http://schemas.android.com/tools">
<!--style for ripple library-->
<style name="RippleStyleWhite">
<item name="mrl_rippleOverlay">true</item>
<item name="mrl_rippleColor">@color/app_game_version</item>
<item name="mrl_rippleHover">true</item>
<item name="mrl_rippleAlpha">0.2</item>
</style>
</resources>

View File

@ -0,0 +1,16 @@
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<style name="Theme.Intelligence" parent="Theme.MaterialComponents.DayNight.NoActionBar.Bridge">
<!-- Primary brand color. -->
<item name="colorPrimary">@color/app_t1</item>
<item name="colorPrimaryVariant">@color/app_main_background_color</item>
<item name="colorOnPrimary">@color/app_t2</item>
<!-- Secondary brand color. -->
<item name="colorSecondary">@color/app_t3</item>
<item name="colorSecondaryVariant">@color/app_t4</item>
<item name="colorOnSecondary">@color/app_t5</item>
<!-- Status bar color. -->
<item name="android:statusBarColor">?attr/colorPrimaryVariant</item>
<!-- Customize your theme here. -->
</style>
</resources>

View 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>

View 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>

6
build.gradle Normal file
View 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 '7.3.1' apply false
id 'com.android.library' version '7.3.1' apply false
id 'org.jetbrains.kotlin.android' version '1.7.20' apply false
}

25
gradle.properties Normal file
View 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

Binary file not shown.

View File

@ -0,0 +1,6 @@
#Tue May 28 17:51:41 CST 2024
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME

185
gradlew vendored Normal file
View 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
View 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
View File

@ -0,0 +1,6 @@
app_name=Intelligence Games
package_name= com.iq.intelligence.games
keystoreFile=app/IntelligenceGames.jks
key_alias=IntelligenceGameskey0
key_store_password=IntelligenceGames
key_password=IntelligenceGames

16
settings.gradle Normal file
View File

@ -0,0 +1,16 @@
pluginManagement {
repositories {
gradlePluginPortal()
google()
mavenCentral()
}
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
}
}
rootProject.name = "Intelligence Games"
include ':app'