Make an android app. (Day 5)

I have been studying with the following text since the other day.

*** Technical MASTER First Android App Development 2nd Edition Android Studio 2 Compatible *** TECHNICAL MASTER はじめてのAndroidアプリ開発 第2版 Android Studio 2対応

Text box

Show hints

<EditText
   ~Omission~
   android:hint="Please enter your name."
   ~Omission~
/>

Input widget

//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){}
        });

sppner_dialog.mp4.gif

date

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.

I tried to make something

With what I've done so far, I tried to make something like an app.

Illustration shop image search 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 ***.

Rock-paper-scissors app

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. スクリーンショット 2018-04-03 14.23.24.png

Afterword

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

Make an android app. (Day 5)
Make an android app. (First day)
Make an instagram clone app ④
Is it an Android app?
Make an instagram clone app ③
Make an instagram clone app ①
App development beginners tried to make an Android calculator app
How to make an app using Tensorflow with Android Studio
Make an executable jar using Android Studio
I want to make an ios.android app
I made an Android app for MiRm service
How to make an crazy Android music player
Android app Spectrum Analyzer
About Android App Components
Android app personal development kickoff
Let's make the app better
ROS app development on Android
Android app decompile ⇒ fix ⇒ recompile
The basics of the process of making a call with an Android app
I tried to make an Android application with MVC now (Java)
Import device images with Android app
Make an FPS counter in Swift
Create an app with Spring Boot 2
Create an app with Spring Boot
Notes on calling Installer on Android App
I made a matching app (Android app)
[Android] How to make Dialog Fragment
[Android] I made a pedometer app.
How to make an app with a plugin mechanism [C # and Java]