Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Kotlinでアプリ書いてみた

2d739f38514c90611f34e8f2b3473cdf?s=47 masaozi3
August 22, 2018

 Kotlinでアプリ書いてみた

Kotlinを書いてみたく、バーコードリーダーを使って書籍検索をするぞっていうアプリを書きました。
そのうちのバーコードリーダー部分のお話です。

2d739f38514c90611f34e8f2b3473cdf?s=128

masaozi3

August 22, 2018
Tweet

More Decks by masaozi3

Other Decks in Programming

Transcript

  1. 1 l B

  2. t & 5BUB P ING 0 S 56 o :

    S N 1JBNG \ 1 Uj h a ISS - .MBRB & R 2 & && .74 21 U L P 8 STP
  3. • όʔίʔυͰ u • sy u b c • @

    ING /:4\ K Z X G - BB RTG I A 3 & && .74 21 U L P 8 STP
  4. • 4 0 u • sy u b y c

    • 3 GL 0 KR /:4\5BDKR N 6 SLIN 8 ETL \ G - BB RTG I A & ! 4 & && .74 21 U L P 8 STP
  5. • όʔίʔυͰ u • sy u b c • @

    ING /:4\ K Z X G - BB RTG I A 5 & && .74 21 U L P 8 STP
  6. X A 6 & && .74 21 U L P

    8 STP
  7. 7 & && .74 21 U L P 8 STP

    • w m s n • 3 GL k s • TILE G BEL d i JNQMFNFOUBUJPODPNKPVSOFZBQQTJOHBOESPJEFNCFEEFE
  8. B P G startButton = findViewById(R.id.captureButton) startButton?.setOnClickListener { IntentIntegrator(this).initiateScan() }

    i B A 8 & && .74 21 U L P 8 STP 8BIN/DSIUIS j
  9. override fun onActivityResult(requestCode: Int, resultCode: Int, intent: Intent) { val

    scanResult = IntentIntegrator.parseActivityResult(requestCode, resultCode, intent) if (scanResult == null) { return } else { val editText = findViewById<EditText>(R.id.editText) editText.setText(scanResult.contents) } } 9 & && .74 21 U L P 8 STP N/DSIUIS RTLS B P G
  10. override fun onActivityResult(requestCode: Int, resultCode: Int, intent: Intent) { val

    scanResult = IntentIntegrator.parseActivityResult(requestCode, resultCode, intent) if (scanResult == null) { return } else { val editText = findViewById<EditText>(R.id.editText) editText.setText(scanResult.contents) } } k B s I 10 & && .74 21 U L P 8 STP N/DSIUIS RTLS B P G
  11. override fun onActivityResult(requestCode: Int, resultCode: Int, intent: Intent) { val

    scanResult = IntentIntegrator.parseActivityResult(requestCode, resultCode, intent) if (scanResult == null) { return } else { val editText = findViewById<EditText>(R.id.editText) editText.setText(scanResult.contents) } } B K gZ3 I 11 & && .74 21 U L P 8 STP N/DSIUIS RTLS B P G
  12. r 12 & && .74 21 U L P 8

    STP
  13. l l 13 & && .74 21 U L P

    8 STP
  14. ly 14 & && .74 21 U L P 8

    STP
  15. • j 4 0 u y • @ ING i

    jmm ly • p m • u p g G 15 & && .74 21 U L P 8 STP  B
  16. e k g r sy 16 & && .74 21

    U L P 8 STP