Commit be3293a4 authored by Kaelan Willauer's avatar Kaelan Willauer

finished pizzappp

parent 9a768c13
......@@ -8,7 +8,9 @@
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:screenOrientation="sensor"
android:theme="@style/Theme.PizzaParty">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
......
......@@ -42,7 +42,6 @@ public class MainActivity extends AppCompatActivity {
mNumAttendEditText.addTextChangedListener(new TextWatcher() {
@Override
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
}
@Override
......@@ -62,7 +61,7 @@ public class MainActivity extends AppCompatActivity {
R.array.hunger_array, android.R.layout.simple_spinner_item);
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
mHowHungrySpinner.setAdapter(adapter);
// mHowHungrySpinner.setSelection(0,false); // does not work as intended?
//mHowHungrySpinner.setSelection(0,false); // does not work as intended?
mHowHungrySpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
......@@ -108,7 +107,7 @@ public class MainActivity extends AppCompatActivity {
int totalPizzas = calc.getTotalPizzas();
// Place totalPizzas into the string resource and display
String totalText = getString(R.string.total_pizzas, totalPizzas);
String totalText = getString(R.string.total_pizzas) + " " + totalPizzas;
mNumPizzasTextView.setText(totalText);
}
}
......
......@@ -52,6 +52,7 @@
<TextView
android:id="@+id/answerTextView"
android:freezesText="true"
android:text="@string/total_pizzas"
android:layout_width="match_parent"
android:layout_height="wrap_content"
......
......@@ -6,7 +6,7 @@
<string name="light">Light</string>
<string name="medium">Medium</string>
<string name="ravenous">Ravenous</string>
<string name="total_pizzas">Total pizzas: %d</string>
<string name="total_pizzas">Total pizzas:</string>
<string name="calculate">Calculate</string>
<string-array name="hunger_array">
<item>Light</item>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment