This commit is contained in:
Florian Bouillon 2018-02-05 15:17:34 +01:00
parent e00c2e7e66
commit c6b37e5038
25 changed files with 38 additions and 16 deletions

2
.idea/modules.xml generated
View File

@ -2,8 +2,8 @@
<project version="4"> <project version="4">
<component name="ProjectModuleManager"> <component name="ProjectModuleManager">
<modules> <modules>
<module fileurl="file://$PROJECT_DIR$/Hangman-game.iml" filepath="$PROJECT_DIR$/Hangman-game.iml" />
<module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" /> <module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" />
<module fileurl="file://$PROJECT_DIR$/hangman-game.iml" filepath="$PROJECT_DIR$/hangman-game.iml" />
</modules> </modules>
</component> </component>
</project> </project>

View File

@ -5,7 +5,7 @@
<application <application
android:allowBackup="true" android:allowBackup="true"
android:fullBackupContent="@xml/backup_descriptor" android:fullBackupContent="@xml/backup_descriptor"
android:icon="@mipmap/ic_launcher" android:icon="@mipmap/logo"
android:label="@string/app_name" android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round" android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true" android:supportsRtl="true"
@ -21,7 +21,7 @@
</activity> </activity>
<activity <activity
android:name=".GameActivity" android:name=".GameActivity"
android:windowSoftInputMode="stateHidden|adjustResize"> android:windowSoftInputMode="stateHidden|adjustPan">
</activity> </activity>
<activity <activity
android:name=".SettingsActivity" android:name=".SettingsActivity"

View File

@ -86,7 +86,8 @@ public class GameActivity extends AppCompatActivity {
input.setOnEditorActionListener(new TextView.OnEditorActionListener() { input.setOnEditorActionListener(new TextView.OnEditorActionListener() {
@Override @Override
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) { public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
String text = ((EditText) v).getText().toString(); EditText txt = ((EditText) v);
String text = txt.getText().toString();
if(text.length() == 1) { if(text.length() == 1) {
log("Letter : " + text); log("Letter : " + text);
if(letters.contains(text)) { if(letters.contains(text)) {
@ -94,9 +95,12 @@ public class GameActivity extends AppCompatActivity {
} else { } else {
log("Sending letter " + text); log("Sending letter " + text);
//Send Letter //Send Letter
txt.setText("", TextView.BufferType.EDITABLE);
} }
} else if(text.length() > 1) { } else if(text.length() > 1) {
log("Word : " + text); log("Word : " + text);
//Send Letter
txt.setText("", TextView.BufferType.EDITABLE);
} }
return false; return false;
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 81 KiB

After

Width:  |  Height:  |  Size: 104 KiB

View File

@ -12,14 +12,14 @@
<LinearLayout <LinearLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@+id/appBarLayout"
android:layout_centerHorizontal="true"
android:orientation="vertical" android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_bias="0.507" app:layout_constraintHorizontal_bias="0.507"
app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent" app:layout_constraintRight_toRightOf="parent"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintTop_toBottomOf="@+id/appBarLayout">
app:layout_constraintTop_toBottomOf="@+id/appBarLayout"
android:layout_below="@+id/appBarLayout"
android:layout_centerHorizontal="true">
<ImageView <ImageView
android:id="@+id/imageView" android:id="@+id/imageView"

View File

@ -5,6 +5,7 @@
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:windowSoftInputMode="adjustResize|adjustPan"
tools:context="net.DeltaWings.Android.Hangman.GameActivity" tools:context="net.DeltaWings.Android.Hangman.GameActivity"
tools:layout_editor_absoluteX="0dp" tools:layout_editor_absoluteX="0dp"
tools:layout_editor_absoluteY="81dp"> tools:layout_editor_absoluteY="81dp">
@ -40,6 +41,7 @@
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent" app:layout_constraintRight_toRightOf="parent"
android:windowSoftInputMode="adjustResize|adjustPan"
app:layout_constraintTop_toBottomOf="@+id/progressBar" app:layout_constraintTop_toBottomOf="@+id/progressBar"
app:layout_constraintVertical_bias="0.5"> app:layout_constraintVertical_bias="0.5">
@ -72,6 +74,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:fontFamily="sans-serif-condensed" android:fontFamily="sans-serif-condensed"
android:text="________________" android:text="________________"
android:windowSoftInputMode="adjustResize|adjustPan"
android:textAlignment="center" android:textAlignment="center"
android:textSize="36sp" android:textSize="36sp"
android:textStyle="bold"/> android:textStyle="bold"/>
@ -86,6 +89,7 @@
android:maxLength="16" android:maxLength="16"
android:maxLines="1" android:maxLines="1"
android:selectAllOnFocus="false" android:selectAllOnFocus="false"
android:windowSoftInputMode="adjustResize|adjustPan"
android:text="Name" android:text="Name"
android:textAlignment="center" android:textAlignment="center"
android:textSize="36sp" android:textSize="36sp"

View 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="@color/logo_background"/>
<foreground android:drawable="@mipmap/logo_foreground"/>
</adaptive-icon>

View 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="@color/logo_background"/>
<foreground android:drawable="@mipmap/logo_foreground"/>
</adaptive-icon>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.2 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 1.5 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.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 53 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="logo_background">#042888</color>
</resources>

View File

@ -12,9 +12,9 @@
# This option should only be used with decoupled projects. More details, visit # 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 # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true # org.gradle.parallel=true
#Mon Jan 29 13:40:57 CET 2018 #Mon Feb 05 13:35:24 CET 2018
#systemProp.https.proxyPort=8080 systemProp.https.proxyPort=8080
#systemProp.http.proxyHost=10.16.0.6 systemProp.http.proxyHost=10.16.0.6
org.gradle.jvmargs=-Xmx1536m org.gradle.jvmargs=-Xmx1536m
#systemProp.https.proxyHost=10.16.0.6 systemProp.https.proxyHost=10.16.0.6
#systemProp.http.proxyPort=8080 systemProp.http.proxyPort=8080