Skip to content

Commit

Permalink
Add adaptive icon, and new SDK version.
Browse files Browse the repository at this point in the history
  • Loading branch information
tpcstld committed May 27, 2018
1 parent 40f1f36 commit 346a0ee
Show file tree
Hide file tree
Showing 14 changed files with 35 additions and 17 deletions.
2 changes: 1 addition & 1 deletion 2048/2048.iml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.id="2048" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" external.system.module.group="" external.system.module.version="unspecified" type="JAVA_MODULE" version="4">
<module external.linked.project.id="2048" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="java-gradle" name="Java-Gradle">
<configuration>
Expand Down
14 changes: 7 additions & 7 deletions 2048/2048/build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 22
buildToolsVersion '22.0.0'
compileSdkVersion 27
buildToolsVersion '27.0.3'

defaultConfig {
minSdkVersion 7
targetSdkVersion 22
versionCode 25
versionName "1.1.9"
minSdkVersion 14
targetSdkVersion 27
versionCode 26
versionName "1.1.10"
}
buildTypes {
release {
Expand All @@ -19,5 +19,5 @@ android {
}

dependencies {
compile 'com.android.support:appcompat-v7:22.0.0'
compile 'com.android.support:appcompat-v7:27.1.1'
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@
import android.content.SharedPreferences;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.support.v7.app.ActionBarActivity;
import android.support.v7.app.AppCompatActivity;
import android.view.KeyEvent;
import android.view.Window;

public class MainActivity extends ActionBarActivity {
public class MainActivity extends AppCompatActivity {

private static final String WIDTH = "width";
private static final String HEIGHT = "height";
Expand Down Expand Up @@ -59,6 +58,7 @@ public boolean onKeyDown(int keyCode, KeyEvent event) {

@Override
public void onSaveInstanceState(Bundle savedInstanceState) {
super.onSaveInstanceState(savedInstanceState);
savedInstanceState.putBoolean("hasState", true);
save();
}
Expand Down
5 changes: 5 additions & 0 deletions 2048/2048/src/main/res/drawable-anydpi/logo_2048.xml
Original file line number Diff line number Diff line change
@@ -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="@color/icon_background" />
<foreground android:drawable="@mipmap/icon_foreground" />
</adaptive-icon>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions 2048/2048/src/main/res/values-v21/styles.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>

<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="android:colorPrimaryDark">@color/status_background</item>
</style>
</resources>
3 changes: 3 additions & 0 deletions 2048/2048/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,7 @@
<color name="text_black">#776e65</color>
<color name="text_brown">#d6cdc4</color>
<color name="background">#faf8ef</color>
<color name="icon_background">#e8ba2e</color>

<color name="status_background">#bbada0</color>
</resources>
3 changes: 0 additions & 3 deletions 2048/2048/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
<resources>

<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<!-- Customize your theme here. -->
</style>

</resources>
8 changes: 7 additions & 1 deletion 2048/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,20 @@
buildscript {
repositories {
mavenCentral()
google()
maven {
url 'https://maven.google.com/'
name 'Google'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.1'
classpath 'com.android.tools.build:gradle:3.1.2'
}
}

allprojects {
repositories {
mavenCentral()
google()
}
}
4 changes: 2 additions & 2 deletions 2048/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Tue Dec 27 02:40:31 EST 2016
#Sun May 27 16:41:23 EDT 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip

0 comments on commit 346a0ee

Please sign in to comment.