This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="utf-8"?> | |
| <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> | |
| <!-- Title for the application. [CHAR LIMIT=12] --> | |
| <string name="app_name">Sólo Java</string> | |
| <!-- Hint text display in the empty field for the user's name [CHAR LIMIT=20] --> | |
| <string name="name">Nombre</string> | |
| <!-- Hint text display in the empty field for the user's name [CHAR LIMIT=20] --> | |
| <string name="toppings">Ingredientes</string> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * This method is called when the plus button is clicked. | |
| */ | |
| public void increment(View view) { | |
| if (quantity == 100) { | |
| // Show an error message as a toast | |
| Toast.makeText(this, "You cannot have more than 100 coffees", Toast.LENGTH_SHORT).show(); | |
| // Exit this method early because there's nothing left to do | |
| return; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" | |
| xmlns:tools="http://schemas.android.com/tools" | |
| android:layout_width="match_parent" | |
| android:layout_height="match_parent" | |
| tools:context=".MainActivity"> | |
| <LinearLayout | |
| android:layout_width="match_parent" | |
| android:layout_height="match_parent" | |
| android:orientation="vertical" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.example.android.justjava; | |
| import android.os.Bundle; | |
| import android.support.v7.app.AppCompatActivity; | |
| import android.view.View; | |
| import android.widget.CheckBox; | |
| import android.widget.TextView; | |
| /** | |
| * This app displays an order form to order coffee. |