I have been studying with the following text since the other day.
*** Technical MASTER First Android App Development 2nd Edition Android Studio 2 Compatible ***
<EditText
~Omission~
android:hint="Please enter your name."
~Omission~
/>
//Spinner acquisition
Spinner sp = (Spinner)findViewById(R.id.spnOs);
//Register an event spinner for a spinner
sp.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener(){
@Override
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
Spinner sp = (Spinner)parent;
//Get a selection and display its value in toast
Toast.makeText(MainActivity.this,
String.format("Choices:%s", sp.getSelectedItem()),
Toast.LENGTH_SHORT).show();
}
//Processing when the item is not selected (empty this time)
public void onNothingSelected(AdapterView<?> parent){}
});
To get the date
SimpleDateFormat format = new SimpleDateFormat("yyyy/MM/dd", Locale.JAPAN);
** Caution **: The month should be capitalized as MM
. It is strange if it is lowercase.
With what I've done so far, I tried to make something like an app.
I wanted to be able to display the keyword search results of the illustration shop in WebView. However, it cannot be displayed as ʻERR_NAME_NOT_RESOLVED`. .. .. ~~ If you have a kind hearted person, please let me know because posted to tetail! ~~ I received an answer from teratail, but the code itself was correct, and it was *** a network environment problem ***.
At the same time as pressing the gu
, choki
, and par
buttons, the rock-paper-scissors results of yourself and COM are displayed.
I tried to make an app that counts the history of wins and losses at the top.
However, due to time constraints, we couldn't reach the point where we could calculate the judgment result, so we carried it over to a later date.
I tried to make an app, but I realized that I wasn't ready to make anything yet. From the next time, we will proceed to Chapter 4 and learn how to make a list.
Recommended Posts