From 8451167c94e4018dc02e237023b2a0855288214e Mon Sep 17 00:00:00 2001 From: Carlos Galindo Date: Tue, 21 Apr 2015 23:04:23 +0200 Subject: [PATCH] Player load improved --- .../kauron/dungeonmanager/Introduction.java | 24 +- .../kauron/dungeonmanager/MainActivity.java | 159 ++------- .../com/kauron/dungeonmanager/Player.java | 61 ++-- .../java/com/kauron/dungeonmanager/Power.java | 4 +- .../kauron/dungeonmanager/PowerEditor.java | 28 +- .../com/kauron/dungeonmanager/Welcome.java | 37 +- app/src/main/res/drawable-hdpi/fab_ic_add.png | Bin 0 -> 300 bytes app/src/main/res/drawable-mdpi/fab_ic_add.png | Bin 0 -> 269 bytes .../main/res/drawable-xhdpi/fab_ic_add.png | Bin 0 -> 376 bytes .../main/res/drawable-xxhdpi/fab_ic_add.png | Bin 0 -> 611 bytes .../main/res/drawable-xxxhdpi/fab_ic_add.png | Bin 0 -> 594 bytes app/src/main/res/drawable/fab_button.xml | 237 ++++++++++++ .../main/res/layout/activity_introduction.xml | 337 +++++++++--------- .../main/res/layout/activity_power_editor.xml | 266 ++++++++++++-- app/src/main/res/layout/activity_welcome.xml | 1 + app/src/main/res/menu/menu_power_editor.xml | 2 - app/src/main/res/values/colors.xml | 8 +- app/src/main/res/values/dimens.xml | 6 + app/src/main/res/values/strings.xml | 14 + app/src/main/res/values/styles.xml | 2 +- 20 files changed, 733 insertions(+), 453 deletions(-) create mode 100644 app/src/main/res/drawable-hdpi/fab_ic_add.png create mode 100644 app/src/main/res/drawable-mdpi/fab_ic_add.png create mode 100644 app/src/main/res/drawable-xhdpi/fab_ic_add.png create mode 100644 app/src/main/res/drawable-xxhdpi/fab_ic_add.png create mode 100644 app/src/main/res/drawable-xxxhdpi/fab_ic_add.png create mode 100644 app/src/main/res/drawable/fab_button.xml diff --git a/app/src/main/java/com/kauron/dungeonmanager/Introduction.java b/app/src/main/java/com/kauron/dungeonmanager/Introduction.java index 6fde151..85477fa 100644 --- a/app/src/main/java/com/kauron/dungeonmanager/Introduction.java +++ b/app/src/main/java/com/kauron/dungeonmanager/Introduction.java @@ -6,7 +6,6 @@ import android.os.Bundle; import android.support.v7.widget.Toolbar; import android.view.Menu; import android.view.MenuItem; -import android.view.View; import android.widget.ArrayAdapter; import android.widget.EditText; import android.widget.Spinner; @@ -21,7 +20,6 @@ public class Introduction extends ActionBarActivity { private EditText name, level; private EditText fue, con, des, sab, intel, car; private Spinner classSpinner, raceSpinner; - private boolean first; @Override protected void onCreate(Bundle savedInstanceState) { @@ -57,8 +55,6 @@ public class Introduction extends ActionBarActivity { Player.RACE_STRINGS ) ); - - first = getIntent().getExtras() == null || getIntent().getExtras().getBoolean("first_time"); } @@ -91,28 +87,15 @@ public class Introduction extends ActionBarActivity { if(finished()) { finish(); } else { - Toast.makeText( - getApplicationContext(), - R.string.missing_info_error, - Toast.LENGTH_LONG - ).show(); + SnackbarManager.show( + Snackbar.with(getApplicationContext()).text(R.string.missing_info_error), this + ); } return true; } - return super.onOptionsItemSelected(item); } - public void finishButton(View view){ - if(finished()) { - finish(); - } else { - SnackbarManager.show( - Snackbar.with(getApplicationContext()).text(R.string.missing_info_error), this - ); - } - } - private boolean finished() { String nameString = name.getText().toString().trim(); int classInt = classSpinner.getSelectedItemPosition(); @@ -171,6 +154,7 @@ public class Introduction extends ActionBarActivity { ed.putInt("con", con); ed.putInt("des", des); //TEMP + ed.putBoolean("new", true); ed.apply(); } else { return false; diff --git a/app/src/main/java/com/kauron/dungeonmanager/MainActivity.java b/app/src/main/java/com/kauron/dungeonmanager/MainActivity.java index 1692541..e418566 100644 --- a/app/src/main/java/com/kauron/dungeonmanager/MainActivity.java +++ b/app/src/main/java/com/kauron/dungeonmanager/MainActivity.java @@ -4,13 +4,11 @@ import android.app.Activity; import android.app.AlertDialog; import android.content.Context; import android.content.DialogInterface; -import android.content.Intent; import android.content.SharedPreferences; import android.graphics.Color; import android.graphics.PorterDuff; import android.support.v7.app.ActionBarActivity; import android.os.Bundle; -import android.os.Handler; import android.support.v7.widget.Toolbar; import android.text.InputType; import android.view.Menu; @@ -39,7 +37,6 @@ public class MainActivity extends ActionBarActivity { private Button pgCurrent; private TextView currentPg, currentXp, currentCurativeEfforts, lvl; private SharedPreferences p; - private Toolbar toolbar; @Override @@ -47,7 +44,7 @@ public class MainActivity extends ActionBarActivity { super.onCreate(savedInstanceState); //Initializing activity (setting toolbar as actionbar) setContentView(R.layout.activity_main); - toolbar = (Toolbar) findViewById(R.id.toolbar); + Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); setSupportActionBar(toolbar); //Loading player @@ -73,7 +70,6 @@ public class MainActivity extends ActionBarActivity { currentXp = (TextView) findViewById(R.id.currentXp); currentCurativeEfforts = (TextView) findViewById(R.id.currentCurativeEfforts); - //TODO: do not change progressbar background xpBar.getProgressDrawable() .setColorFilter(getResources().getColor(R.color.px_bar), PorterDuff.Mode.SRC_IN); curativeEffortsBar.getProgressDrawable() @@ -303,6 +299,7 @@ public class MainActivity extends ActionBarActivity { pgUpdate(); invalidateOptionsMenu(); } catch (Exception e) { + Toast.makeText(getApplicationContext(), "There was an error", Toast.LENGTH_LONG).show(); } } }); @@ -339,7 +336,7 @@ public class MainActivity extends ActionBarActivity { pgCurrent.setText(String.valueOf(player.getPg())); if (status == Player.MUERTO) { pgCurrent.setTextColor(Color.BLACK); - pgCurrent.setBackgroundColor(Color.RED); + pgCurrent.setBackgroundColor(getResources().getColor(R.color.red)); AlertDialog.Builder alert = new AlertDialog.Builder(this); alert.setTitle(getString(R.string.reset_confirmation_title)); @@ -365,9 +362,9 @@ public class MainActivity extends ActionBarActivity { alert.show(); } else if (status == Player.DEBILITADO) { pgCurrent.setBackgroundColor(android.R.drawable.btn_default); - pgCurrent.setTextColor(Color.RED); - pgBar.getProgressDrawable().setColorFilter(Color.RED, PorterDuff.Mode.SRC_IN); - negPgBar.getProgressDrawable().setColorFilter(Color.RED, PorterDuff.Mode.SRC_IN); + pgCurrent.setTextColor(getResources().getColor(R.color.red)); + pgBar.getProgressDrawable().setColorFilter(getResources().getColor(R.color.red), PorterDuff.Mode.SRC_IN); + negPgBar.getProgressDrawable().setColorFilter(getResources().getColor(R.color.red), PorterDuff.Mode.SRC_IN); if(lastState != Player.SAME) { SnackbarManager.show( Snackbar @@ -377,9 +374,9 @@ public class MainActivity extends ActionBarActivity { } } else if (status == Player.MALHERIDO) { pgCurrent.setBackgroundColor(android.R.drawable.btn_default); - pgCurrent.setTextColor(Color.YELLOW); - pgBar.getProgressDrawable().setColorFilter(Color.YELLOW, PorterDuff.Mode.SRC_IN); - negPgBar.getProgressDrawable().setColorFilter(Color.YELLOW, PorterDuff.Mode.SRC_IN); + pgCurrent.setTextColor(getResources().getColor(R.color.yellow)); + pgBar.getProgressDrawable().setColorFilter(getResources().getColor(R.color.yellow), PorterDuff.Mode.SRC_IN); + negPgBar.getProgressDrawable().setColorFilter(getResources().getColor(R.color.yellow), PorterDuff.Mode.SRC_IN); if(lastState != Player.SAME) { SnackbarManager.show( Snackbar @@ -388,42 +385,28 @@ public class MainActivity extends ActionBarActivity { ); } } else { - pgCurrent.setTextColor(Color.GREEN); + pgCurrent.setTextColor(getResources().getColor(R.color.green)); pgCurrent.setBackgroundColor(android.R.drawable.btn_default); - pgBar.getProgressDrawable().setColorFilter(Color.GREEN, PorterDuff.Mode.SRC_IN); - negPgBar.getProgressDrawable().setColorFilter(Color.GREEN, PorterDuff.Mode.SRC_IN); + pgBar.getProgressDrawable().setColorFilter(getResources().getColor(R.color.green), PorterDuff.Mode.SRC_IN); + negPgBar.getProgressDrawable().setColorFilter(getResources().getColor(R.color.green), PorterDuff.Mode.SRC_IN); } } private void restoreData(){ if (player == null) { - player = new Player( - p.getString("playerName", getString(R.string.adventurer_name)), - p.getInt("classInt", Player.NULL), - p.getInt("raceInt", Player.NULL), - p.getInt("px", 0), - new int[]{ - p.getInt("fue", 10), - p.getInt("con", 10), - p.getInt("des", 10), - p.getInt("int", 10), - p.getInt("sab", 10), - p.getInt("car", 10) - }, - new int[18], - new Power[4]); + player = new Player( p ); } else { - player.setName(p.getString("playerName", getString(R.string.adventurer_name))); - player.setClassInt(p.getInt("classInt", Player.NULL)); - player.setRaceInt(p.getInt("raceInt", Player.NULL)); - player.setPx(p.getInt("px", player.getPx())); + player.setName(p.getString(Player.NAME, player.getName())); + player.setClassInt(p.getInt(Player.CLASS, player.getClassInt())); + player.setRaceInt(p.getInt(Player.RACE, player.getRaceInt())); + player.setPx(p.getInt(Player.PX, player.getPx())); player.setAtk(new int[]{ - p.getInt("fue", 10), - p.getInt("con", 10), - p.getInt("des", 10), - p.getInt("int", 10), - p.getInt("sab", 10), - p.getInt("car", 10) + p.getInt("fue", player.getFue()), + p.getInt("con", player.getCon()), + p.getInt("des", player.getDes()), + p.getInt("int", player.getInt()), + p.getInt("sab", player.getSab()), + p.getInt("car", player.getCar()) }); } pxUpdate(); @@ -440,17 +423,7 @@ public class MainActivity extends ActionBarActivity { pgBar.setMax(player.getMaxPg()); negPgBar.setMax(player.getMaxPg() / 2); -// incrementProgressBar( -// pgBar, currentPg, -// 100, true, player.getMaxPg(), -// true, player.getPg() -// ); curativeEffortsBar.setMax(player.getMaxCurativeEfforts()); -// incrementProgressBar( -// curativeEffortsBar, currentCurativeEfforts, -// 100, true, player.getMaxCurativeEfforts(), -// true, player.getCurativeEfforts() -// ); pgUpdate(); ceUpdate(); //set restored values to the respective fields @@ -553,90 +526,4 @@ public class MainActivity extends ActionBarActivity { dialog.show(); input.requestFocus(); } - - //TODO: fix incrementeProgressBar - //set up a partial barCommand to raise only between the ratios, then a manager, then another - //if pgBar, change color accordingly with the pg - private void incrementProgressBar(final ProgressBar progressBar, final TextView textView, - final int factor, - final boolean setMax, int max, - final boolean setVal, int end) { - if(factor == 1){ - textView.setText( - (progressBar.getProgress() + Player.LEVEL_PX[player.getLevel() - 1]) - + " / " + - (progressBar.getMax() + Player.LEVEL_PX[player.getLevel() - 1]) - ); - } else { - textView.setText( - (progressBar.getProgress()/factor) + " / " + - (progressBar.getMax()/factor) - ); - } - - if(setMax) progressBar.setMax(factor*max); - if(!setVal) return; - if(progressBar.getProgress() - end*factor == 0) return; - final Handler handler = new Handler(); - final int finalEnd = (end < 0 ? 0 : -1) * end * factor; - final int time = Math.max(2000 / Math.abs(progressBar.getProgress() - finalEnd), 1); - new Thread(new Runnable() { - public void run() { - int current = progressBar.getProgress(); - boolean bigger = current < finalEnd; - while ((bigger && current < finalEnd) || (!bigger && current > finalEnd)) { - if(bigger) current += 2; - else current -= 2; - // Update the progress bar and display the - //current value in the text view - final int finalCurrent = Math.abs(current); - handler.post(new Runnable() { - public void run() { - progressBar.setProgress(finalCurrent); - if(factor == 1){ - textView.setText( - (finalCurrent + Player.LEVEL_PX[player.getLevel() - 1]) - + " / " + - (progressBar.getMax() + Player.LEVEL_PX[player.getLevel() - 1]) - ); - } else { - textView.setText((finalCurrent/factor) +" / "+(progressBar.getMax()/factor)); - } - } - }); - try { - // Sleep for 200 milliseconds. - //Just to display the progress slowly - Thread.sleep(time); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - } - }).start(); - } - - -// if(progressBar.getId() == R.id.pgBar) { -// double rate = (double)current / progressBar.getMax() * (negative ? -1:1); -// if (rate <= 0) { -// progressBar.getProgressDrawable() -// .setColorFilter( -// Color.RED, -// PorterDuff.Mode.SRC_IN -// ); -// } else if (rate <= 0.5) { -// progressBar.getProgressDrawable() -// .setColorFilter( -// Color.YELLOW, -// PorterDuff.Mode.SRC_IN -// ); -// } else { -// progressBar.getProgressDrawable() -// .setColorFilter( -// Color.GREEN, -// PorterDuff.Mode.SRC_IN -// ); -// } -// } } \ No newline at end of file diff --git a/app/src/main/java/com/kauron/dungeonmanager/Player.java b/app/src/main/java/com/kauron/dungeonmanager/Player.java index 5e5aee5..782470d 100644 --- a/app/src/main/java/com/kauron/dungeonmanager/Player.java +++ b/app/src/main/java/com/kauron/dungeonmanager/Player.java @@ -1,6 +1,10 @@ package com.kauron.dungeonmanager; -class Player { +import android.content.SharedPreferences; + +import java.io.Serializable; + +class Player implements Serializable { public static final String NAME = "playerName", CLASS = "classInt", RACE = "raceInt", PX = "px"; @@ -107,15 +111,35 @@ class Player { private int level; //TODO: use dice dialogs private int[] atk, def, abilities; + private boolean[] abilitiesTrained; //TODO: implement fully operational powers displayed as cards private Power[] powers; + Player (SharedPreferences p) { + this.name = p.getString(NAME, "Player"); + this.px = p.getInt(PX, 0); + setLevel(); + this.raceInt = p.getInt(RACE, 0); + this.classInt = p.getInt(CLASS, 0); + this.def = new int[4]; + setAtk(new int[] { + p.getInt("fue", 10), + p.getInt("con", 10), + p.getInt("des", 10), + p.getInt("int", 10), + p.getInt("sab", 10), + p.getInt("car", 10)} + ); + setState(); + this.pg = p.getInt( "pg" , maxPg); + this.curativeEfforts = p.getInt( "curativeEfforts" , maxCurativeEfforts ); + + //TODO: load powers from wherever they are saved + } + /** Constructor for creating a new character*/ - Player( - String name, int classInt, int raceInt, - int px, int[] atk, int[] abilities, - Power[] powers - ){ + Player( String name, int classInt, int raceInt, + int px, int[] atk, Power[] powers){ this.name = name; this.px = px; setLevel(); @@ -127,28 +151,22 @@ class Player { pg = maxPg; curativeEfforts = maxCurativeEfforts; - this.abilities = abilities; this.powers = powers; } /** Constructor for restoring the Player in the middle of the game*/ - Player( - int pg, int maxPg, int px, int curativeEfforts, int maxCurativeEfforts, int classInt, - int raceInt, String name, int[] atk, int[] def, int[] abilities, Power[] powers) { - this.pg = pg; - this.maxPg = maxPg; + Player( int pg, int px, int curativeEfforts, int classInt, int raceInt, int[] atk, String name, Power[] powers) { this.px = px; setLevel(); - setState(); - this.curativeEfforts = curativeEfforts; - this.maxCurativeEfforts = maxCurativeEfforts; + setAtk(atk); this.classInt = classInt; this.raceInt = raceInt; + setClass(); this.name = name; - this.atk = atk; - this.def = def; - this.abilities = abilities; this.powers = powers; + this.pg = pg; + this.curativeEfforts = curativeEfforts; + setState(); } int getPx() {return px;} @@ -167,11 +185,8 @@ class Player { int getLevel() {return level;} void setLevel() { - for (int i = 0; i < LEVEL_PX.length; i++){ - if(px < LEVEL_PX[i]) { - level = i; return; - } - } + for (int i = 0; i < LEVEL_PX.length; i++) + if(px < LEVEL_PX[i]) {level = i; return;} level = LEVEL_PX.length; } diff --git a/app/src/main/java/com/kauron/dungeonmanager/Power.java b/app/src/main/java/com/kauron/dungeonmanager/Power.java index 97bf043..0914c78 100644 --- a/app/src/main/java/com/kauron/dungeonmanager/Power.java +++ b/app/src/main/java/com/kauron/dungeonmanager/Power.java @@ -1,6 +1,8 @@ package com.kauron.dungeonmanager; -class Power { +import java.io.Serializable; + +class Power implements Serializable{ /**frequencies*/ public static final int OPORTUNIDAD = 1, A_VOLUNTAD = 2, ENCUENTRO = 3, DIARIO = 4; public static final String[] FREQ = {"Nada", "Oportunidad", "A voluntad", "Encuentro", "Diario"}; diff --git a/app/src/main/java/com/kauron/dungeonmanager/PowerEditor.java b/app/src/main/java/com/kauron/dungeonmanager/PowerEditor.java index ba48561..00e7681 100644 --- a/app/src/main/java/com/kauron/dungeonmanager/PowerEditor.java +++ b/app/src/main/java/com/kauron/dungeonmanager/PowerEditor.java @@ -2,8 +2,8 @@ package com.kauron.dungeonmanager; import android.support.v7.app.ActionBarActivity; import android.os.Bundle; -import android.view.Menu; -import android.view.MenuItem; +import android.support.v7.widget.Toolbar; +import android.view.View; public class PowerEditor extends ActionBarActivity { @@ -14,28 +14,10 @@ public class PowerEditor extends ActionBarActivity { protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_power_editor); + setSupportActionBar((Toolbar) findViewById(R.id.toolbar)); } - - @Override - public boolean onCreateOptionsMenu(Menu menu) { - // Inflate the menu; this adds items to the action bar if it is present. - getMenuInflater().inflate(R.menu.menu_power_editor, menu); - return true; - } - - @Override - public boolean onOptionsItemSelected(MenuItem item) { - // Handle action bar item clicks here. The action bar will - // automatically handle clicks on the Home/Up button, so long - // as you specify a parent activity in AndroidManifest.xml. - int id = item.getItemId(); - - //noinspection SimplifiableIfStatement - if (id == R.id.action_settings) { - return true; - } - - return super.onOptionsItemSelected(item); + public void saveClick(View view) { + //TODO: save powers } } diff --git a/app/src/main/java/com/kauron/dungeonmanager/Welcome.java b/app/src/main/java/com/kauron/dungeonmanager/Welcome.java index cffc331..9e183b1 100644 --- a/app/src/main/java/com/kauron/dungeonmanager/Welcome.java +++ b/app/src/main/java/com/kauron/dungeonmanager/Welcome.java @@ -76,24 +76,10 @@ public class Welcome extends ActionBarActivity { for ( int i = elements; i < n; i++ ) { SharedPreferences sav = getSharedPreferences(p.getString("player" + i, ""), MODE_PRIVATE); if (sav.contains(Player.NAME)) - adapter.add( - new Player( - sav.getString(Player.NAME, "player" + i), - sav.getInt(Player.CLASS, 0), - sav.getInt(Player.RACE, 0), - sav.getInt(Player.PX, 0), - new int[] { - sav.getInt("fue", 10), - sav.getInt("con", 10), - sav.getInt("des", 10), - sav.getInt("int", 10), - sav.getInt("sab", 10), - sav.getInt("car", 10) - }, - new int[18], - new Power[4] - )); + adapter.add( new Player( sav ) ); } + //int pg, int maxPg, int px, int curativeEfforts, int maxCurativeEfforts, int classInt, + //int raceInt, String name, int[] atk, int[] def, int[] abilities, Power[] powers } else if ( n != 0 ) { playerList.setVisibility(View.VISIBLE); findViewById(R.id.help_text).setVisibility(View.VISIBLE); @@ -103,22 +89,7 @@ public class Welcome extends ActionBarActivity { //TODO: fill the information for the player creation SharedPreferences sav = getSharedPreferences(p.getString("player" + i, ""), MODE_PRIVATE); if (sav.contains(Player.NAME)) - players[i] = new Player( - sav.getString(Player.NAME, "player" + i), - sav.getInt(Player.CLASS, 0), - sav.getInt(Player.RACE, 0), - sav.getInt(Player.PX, 0), - new int[] { - sav.getInt("fue", 10), - sav.getInt("con", 10), - sav.getInt("des", 10), - sav.getInt("int", 10), - sav.getInt("sab", 10), - sav.getInt("car", 10) - }, - new int[18], - new Power[4] - ); + players[i] = new Player( sav ); } playerList.setAdapter(new PlayerAdapter(this, players)); diff --git a/app/src/main/res/drawable-hdpi/fab_ic_add.png b/app/src/main/res/drawable-hdpi/fab_ic_add.png new file mode 100644 index 0000000000000000000000000000000000000000..4a072bbf13971760b1dd31499cd4b3313a4d7fe9 GIT binary patch literal 300 zcmeAS@N?(olHy`uVBq!ia0vp^Dj>|k1|%Oc%$NbBSc;uILpXq-h9ji|$mcBZh%9Dc z;CKeYjPeVX_5lSYOI#yLg7ec#$`gxH8OqDc^)mCai<1)zQuXqS(r3T3kpe1O>FMGa z64Cm0sw3AS2Oih^5rTVKyY=3Nq=grlg{Zpp%fI%0s^l`^)wW>I=fdN*9Xl&^vMZ z1)D?zcfn;Y-UH2rOM4gDX@2z*ncw}j&~}mZ0>*a-Hg5}v`TeS8f(wUd%Y+u|g*&6a qY0nMpyZO@K@ZD2R9*5>$;C{VUckl6J&vKxn89ZJ6T-G@yGywq2o^AR7 literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-mdpi/fab_ic_add.png b/app/src/main/res/drawable-mdpi/fab_ic_add.png new file mode 100644 index 0000000000000000000000000000000000000000..e4249ed59216748115c89524d5343f925609d74c GIT binary patch literal 269 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`GjEX7WqAsj$Z!;#Vf4nJ zu)YUj#)hQ5bAW=9C9V-A!TD(=<%vb94CUqJdYO6I#mR{Use1WE>9gP2NC6dfdAc}; zcyzvfEH=|)eXw>4uTPvrRW%QW6Sju@yE{MbM61(R?`6ql&-#y+V+#1w1 zV^ZMeTax0me*{%#uzp}xDDgR)zWFE{}-Vx#~7 literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-xhdpi/fab_ic_add.png b/app/src/main/res/drawable-xhdpi/fab_ic_add.png new file mode 100644 index 0000000000000000000000000000000000000000..aec47a052f3db53d013a0e438cf8db58e5c2bded GIT binary patch literal 376 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDA1|-9oezpTCmSQK*5Dp-y;YjHK@;M7UB8wRq zxbK26V;!TU3{X(A#5JNMI6tkVJh3R1p}f3YFEcN@I61K(RWH9NefB#WDWIaSo-U3d z8I5me+HxIo5O9m{G2gKLGfR?USM0k9$`O@v?-wT|Cazz)b?(|oZss%s$`XI@7)(yu;b)o&#IVsS{4JLVr1C zHb@BvBr|3CIP`L^Fl02{cl@R026nrt8d9HrRfVqH{4QcK!@C2!R~|g_IWm=bj_ss{ zHyM{N^S#f}n|P#a8<4)+plUyHOHWo@eE4VG0*%))joIx|njdoBUa%C`D*CR@UwTf$ zZHc(rf@2_;z%6^4nJ z2%Z69Msr_25ul)CiEBhjaDG}zd16s2LwR|*US?i)adKios$PCk`s{Z$QVa}?4?JBQ zLn`LHoo(xP*g?Q8evZRb<0Vdu7M>A(A!yp};1R=I$myk0wa&qlT{PWes(kyQK9NOh z?Df0eYVK2yoF;sF-kvi)Z(`H8+|4u0>{`g&(Z|ZEN|px(mStT-|JS`qR|wzbl)q} zE@c<-Cp@b*Dl}G4IAH7XKu9tov47e=T;~_x)L^bLPzJjLrq8)ya9jTku!+L)9woxxVem0ZE`spHl#F$mh?weM`@6zFnu5yl?;Nc5$zSNd2zUZQt)To}cXU z#b0TP(+llPZXp+eClC1=+pSsj41s}irBIlhn+dH6r6c$MW3!>i)kqV-SAPRk1SytqBPfC+-Z)78&qol`;+0D4nJ zi0=Yn#xH#320%f{64!{5;QX|b^2DN4hVt@qz0ADq;^f4FRK5J7^x5xhq!<_&&wIK! zhE&XXd)v^D$x+7bBmWiQh#OVR{t0WB_I}^+Sz?>qVZYqmwLRhsOfM=kh;g4xQ&!tu z|ET!kUm>SCyao?99#-R<{Ip22aM>4@Z*v(F*cv1m(imo7W3+!^VcX?ZbW3u!YUPj5 zGevyee*JG)t|C5n<8zhi2V%Tpn(*nyV=zc6jJIIIlML?jo42o;U7SDZ&enf%Yw|u{ z`@6?r+shk~lOCUov75B#OGRJqndEs-Oixz7FV9=L%XaVYlk?Z*9ohDMvdZ-XukS4r zSg@p-y>r&MvQU|u~kL+Um%(Fs!F5}g$zYI^N&sx1O^ZCE!8}Ijhm9+NX{A_!z zYUS-u*|}EN{yms>j-h^$$sMZ`zp^qWZ2af(-aaC}X!;LTE@Or>3Zu+ literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable/fab_button.xml b/app/src/main/res/drawable/fab_button.xml new file mode 100644 index 0000000..4ca30fc --- /dev/null +++ b/app/src/main/res/drawable/fab_button.xml @@ -0,0 +1,237 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/layout/activity_introduction.xml b/app/src/main/res/layout/activity_introduction.xml index 711099b..5ab057a 100644 --- a/app/src/main/res/layout/activity_introduction.xml +++ b/app/src/main/res/layout/activity_introduction.xml @@ -13,191 +13,186 @@ android:layout_width="match_parent" android:layout_height="wrap_content"> - - - - + - - - + + + android:inputType="textPersonName|textCapWords" + android:layout_weight="0.5" + android:id="@+id/editNameIntro" + android:hint="@string/adventurer_name" + android:nextFocusDown="@+id/editPxIntro" + android:nextFocusForward="@+id/editPxIntro"/> - - - - - - - - - - - - - - - - - - - - - - - - - - - - -