mirror of
https://github.com/Aviortheking/Hangman.git
synced 2024-12-19 18:20:54 +00:00
Yolo
This commit is contained in:
parent
7e179b00d4
commit
c404977f32
2
.idea/modules.xml
generated
2
.idea/modules.xml
generated
@ -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>
|
@ -12,7 +12,8 @@
|
|||||||
android:theme="@style/AppTheme">
|
android:theme="@style/AppTheme">
|
||||||
<activity
|
<activity
|
||||||
android:name=".MainActivity"
|
android:name=".MainActivity"
|
||||||
android:label="@string/app_name">
|
android:label="@string/app_name"
|
||||||
|
android:theme="@style/DeltaWings">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MAIN"/>
|
<action android:name="android.intent.action.MAIN"/>
|
||||||
|
|
||||||
@ -21,12 +22,16 @@
|
|||||||
</activity>
|
</activity>
|
||||||
<activity
|
<activity
|
||||||
android:name=".GameActivity"
|
android:name=".GameActivity"
|
||||||
|
android:theme="@style/DeltaWings"
|
||||||
android:windowSoftInputMode="stateHidden|adjustPan">
|
android:windowSoftInputMode="stateHidden|adjustPan">
|
||||||
</activity>
|
</activity>
|
||||||
<activity
|
<activity
|
||||||
android:name=".SettingsActivity"
|
android:name=".SettingsActivity"
|
||||||
android:label="@string/title_activity_settings">
|
android:label="@string/title_activity_settings">
|
||||||
</activity>
|
</activity>
|
||||||
|
<activity android:name=".AboutActivity"
|
||||||
|
android:theme="@style/DeltaWings">
|
||||||
|
</activity>
|
||||||
</application>
|
</application>
|
||||||
|
|
||||||
</manifest>
|
</manifest>
|
@ -0,0 +1,13 @@
|
|||||||
|
package net.DeltaWings.Android.Hangman;
|
||||||
|
|
||||||
|
import android.support.v7.app.AppCompatActivity;
|
||||||
|
import android.os.Bundle;
|
||||||
|
|
||||||
|
public class AboutActivity extends AppCompatActivity {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
setContentView(R.layout.activity_about);
|
||||||
|
}
|
||||||
|
}
|
@ -1,6 +1,7 @@
|
|||||||
package net.DeltaWings.Android.Hangman;
|
package net.DeltaWings.Android.Hangman;
|
||||||
|
|
||||||
import android.animation.ObjectAnimator;
|
import android.animation.ObjectAnimator;
|
||||||
|
import android.app.Activity;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.support.v7.app.ActionBar;
|
import android.support.v7.app.ActionBar;
|
||||||
|
@ -13,6 +13,11 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
public static MainActivity instance;
|
public static MainActivity instance;
|
||||||
|
|
||||||
|
public static MainActivity getInstance() {
|
||||||
|
return instance;
|
||||||
|
}
|
||||||
|
public boolean single = true;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
instance = this;
|
instance = this;
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
package net.DeltaWings.Android.Hangman.Util;
|
package net.DeltaWings.Android.Hangman.Util;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import net.DeltaWings.Android.Hangman.MainActivity;
|
||||||
|
import net.DeltaWings.Android.Hangman.Util.GameUtil;
|
||||||
|
|
||||||
public class ConnectionUtil {
|
public class ConnectionUtil {
|
||||||
|
|
||||||
@ -10,23 +12,44 @@ public class ConnectionUtil {
|
|||||||
private String userID = null;
|
private String userID = null;
|
||||||
private String jsp = "jsp";
|
private String jsp = "jsp";
|
||||||
public int percent = 0;
|
public int percent = 0;
|
||||||
|
private boolean single = MainActivity.getInstance().single;
|
||||||
|
private GameUtil gameUtil = null;
|
||||||
|
|
||||||
|
public ConnectionUtil() {
|
||||||
|
//check gamemode
|
||||||
|
if(single) {
|
||||||
|
gameUtil = new GameUtil();
|
||||||
|
} else {
|
||||||
|
//init connection
|
||||||
|
//send user name, generated userID
|
||||||
|
}
|
||||||
|
|
||||||
public ConnectionUtil ConnectionUtil() {
|
|
||||||
|
|
||||||
return this;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void closeConnection() {
|
public void closeConnection() {
|
||||||
|
if(single) {
|
||||||
|
gameUtil = null;
|
||||||
|
} else {
|
||||||
|
//send null username and null userID
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean sendData(List<Object> query) {
|
public boolean sendData(List<Object> query) {
|
||||||
|
if(single) return gameUtil.datasReader(query);
|
||||||
return true;
|
else {
|
||||||
|
//return state
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Object getData() {
|
public Object getData() {
|
||||||
|
if(single) {
|
||||||
|
return gameUtil.datasSender();
|
||||||
|
} else {
|
||||||
|
|
||||||
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
19
app/src/main/res/layout/activity_about.xml
Normal file
19
app/src/main/res/layout/activity_about.xml
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<android.support.constraint.ConstraintLayout
|
||||||
|
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"
|
||||||
|
tools:context="net.DeltaWings.Android.Hangman.AboutActivity">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textView4"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:text="TextView"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"/>
|
||||||
|
</android.support.constraint.ConstraintLayout>
|
@ -12,8 +12,11 @@
|
|||||||
<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_alignParentBottom="true"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
android:layout_centerHorizontal="true"
|
android:layout_centerHorizontal="true"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:layout_below="@+id/appBarLayout"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintHorizontal_bias="0.507"
|
app:layout_constraintHorizontal_bias="0.507"
|
||||||
|
@ -1,10 +1,15 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
|
|
||||||
<style name="AppTheme" parent="android:Theme.Material">
|
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
|
||||||
<!-- Customize your theme here. -->
|
<!-- Customize your theme here. -->
|
||||||
<item name="colorPrimary">@color/colorPrimary</item>
|
<item name="colorPrimary">@color/colorPrimary</item>
|
||||||
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
||||||
<item name="colorAccent">@color/colorAccent</item>
|
<item name="colorAccent">@color/colorAccent</item>
|
||||||
|
<item name="android:navigationBarColor">@android:color/black</item>
|
||||||
|
<item name="android:textColorPrimaryInverse">@android:color/background_light</item>
|
||||||
|
<item name="android:textColorPrimary">@android:color/black</item>
|
||||||
|
<item name="android:textColorSecondary">@android:color/background_dark</item>
|
||||||
|
<item name="android:colorForeground">@android:color/background_light</item>
|
||||||
</style>
|
</style>
|
||||||
</resources>
|
</resources>
|
@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<color name="colorPrimary">#3F51B5</color>
|
<color name="colorPrimary">#062988</color>
|
||||||
<color name="colorPrimaryDark">#303F9F</color>
|
<color name="colorPrimaryDark">#303F9F</color>
|
||||||
<color name="colorAccent">#111984</color>
|
<color name="colorAccent">#111984</color>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -1,20 +1,13 @@
|
|||||||
<resources>
|
<resources>
|
||||||
|
|
||||||
<!-- Base application theme. -->
|
<!-- Base application theme. -->
|
||||||
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
|
|
||||||
<!-- Customize your theme here. -->
|
|
||||||
<item name="colorPrimary">@color/colorPrimary</item>
|
|
||||||
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
|
||||||
<item name="colorAccent">@color/colorAccent</item>
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<style name="AppTheme.NoActionBar">
|
|
||||||
<item name="windowActionBar">false</item>
|
|
||||||
<item name="windowNoTitle">true</item>
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar"/>
|
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar"/>
|
||||||
|
|
||||||
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light"/>
|
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light"/>
|
||||||
|
|
||||||
|
<style name="DeltaWings" parent="Theme.AppCompat">
|
||||||
|
<item name="colorPrimary">@color/colorAccent</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user