Soumettre la recherche
Mettre en ligne
夜子まま塾講義3(androidで電卓アプリを作る)
•
1 j'aime
•
7,382 vues
Masafumi Terazono
Suivre
電卓アプリを題材にAndroidプロジェクトの作成からクラスの編集まで
Lire moins
Lire la suite
Technologie
Business
Signaler
Partager
Signaler
Partager
1 sur 33
Télécharger maintenant
Télécharger pour lire hors ligne
Recommandé
Actor Concurrency
Actor Concurrency
Alex Miller
Mobile Fest 2018. Александр Корин. Болеутоляющее
Mobile Fest 2018. Александр Корин. Болеутоляющее
MobileFest2018
Deterministic simulation testing
Deterministic simulation testing
FoundationDB
Promise: async programming hero
Promise: async programming hero
The Software House
Lo Mejor Del Pdc2008 El Futrode C#
Lo Mejor Del Pdc2008 El Futrode C#
Juan Pablo
자바스크립트 비동기 코드(Javascript asyncronous code)
자바스크립트 비동기 코드(Javascript asyncronous code)
Kongson Park
Max Koretskyi "Why are Angular and React so fast?"
Max Koretskyi "Why are Angular and React so fast?"
Fwdays
How Data Flow analysis works in a static code analyzer
How Data Flow analysis works in a static code analyzer
Andrey Karpov
Recommandé
Actor Concurrency
Actor Concurrency
Alex Miller
Mobile Fest 2018. Александр Корин. Болеутоляющее
Mobile Fest 2018. Александр Корин. Болеутоляющее
MobileFest2018
Deterministic simulation testing
Deterministic simulation testing
FoundationDB
Promise: async programming hero
Promise: async programming hero
The Software House
Lo Mejor Del Pdc2008 El Futrode C#
Lo Mejor Del Pdc2008 El Futrode C#
Juan Pablo
자바스크립트 비동기 코드(Javascript asyncronous code)
자바스크립트 비동기 코드(Javascript asyncronous code)
Kongson Park
Max Koretskyi "Why are Angular and React so fast?"
Max Koretskyi "Why are Angular and React so fast?"
Fwdays
How Data Flow analysis works in a static code analyzer
How Data Flow analysis works in a static code analyzer
Andrey Karpov
Is your C# optimized
Is your C# optimized
Woody Pewitt
Encoder + decoder
Encoder + decoder
COMSATS Abbottabad
(18.03.2009) Cumuy Invita - Iniciando el año conociendo nuevas tecnologías - ...
(18.03.2009) Cumuy Invita - Iniciando el año conociendo nuevas tecnologías - ...
Microsoft Argentina y Uruguay [Official Space]
Let the type system be your friend
Let the type system be your friend
The Software House
Promises generatorscallbacks
Promises generatorscallbacks
Mike Frey
Writing SOLID C++ [gbgcpp meetup @ Zenseact]
Writing SOLID C++ [gbgcpp meetup @ Zenseact]
Dimitrios Platis
重構—改善既有程式的設計(chapter 9)
重構—改善既有程式的設計(chapter 9)
Chris Huang
Functional solid
Functional solid
Matt Stine
Es.next
Es.next
kevinsson
Functional JavaScript for everyone
Functional JavaScript for everyone
Bartek Witczak
追求Jdbc on oracle最佳性能?如何才好?
追求Jdbc on oracle最佳性能?如何才好?
maclean liu
Chapter 7 functions (c)
Chapter 7 functions (c)
hhliu
Developer Experience i TypeScript. Najbardziej ikoniczne duo
Developer Experience i TypeScript. Najbardziej ikoniczne duo
The Software House
Mutation Testing at BzhJUG
Mutation Testing at BzhJUG
STAMP Project
TypeScript - All you ever wanted to know - Tech Talk by Epic Labs
TypeScript - All you ever wanted to know - Tech Talk by Epic Labs
Alfonso Peletier
Async js - Nemetschek Presentaion @ HackBulgaria
Async js - Nemetschek Presentaion @ HackBulgaria
HackBulgaria
The Ring programming language version 1.5.1 book - Part 175 of 180
The Ring programming language version 1.5.1 book - Part 175 of 180
Mahmoud Samir Fayed
The Ring programming language version 1.9 book - Part 99 of 210
The Ring programming language version 1.9 book - Part 99 of 210
Mahmoud Samir Fayed
The Ring programming language version 1.7 book - Part 85 of 196
The Ring programming language version 1.7 book - Part 85 of 196
Mahmoud Samir Fayed
Mutate and Test your Tests
Mutate and Test your Tests
STAMP Project
京都Gtugコンパチapi
京都Gtugコンパチapi
Masafumi Terazono
AndroidからWebサービスを使う
AndroidからWebサービスを使う
Masafumi Terazono
Contenu connexe
Tendances
Is your C# optimized
Is your C# optimized
Woody Pewitt
Encoder + decoder
Encoder + decoder
COMSATS Abbottabad
(18.03.2009) Cumuy Invita - Iniciando el año conociendo nuevas tecnologías - ...
(18.03.2009) Cumuy Invita - Iniciando el año conociendo nuevas tecnologías - ...
Microsoft Argentina y Uruguay [Official Space]
Let the type system be your friend
Let the type system be your friend
The Software House
Promises generatorscallbacks
Promises generatorscallbacks
Mike Frey
Writing SOLID C++ [gbgcpp meetup @ Zenseact]
Writing SOLID C++ [gbgcpp meetup @ Zenseact]
Dimitrios Platis
重構—改善既有程式的設計(chapter 9)
重構—改善既有程式的設計(chapter 9)
Chris Huang
Functional solid
Functional solid
Matt Stine
Es.next
Es.next
kevinsson
Functional JavaScript for everyone
Functional JavaScript for everyone
Bartek Witczak
追求Jdbc on oracle最佳性能?如何才好?
追求Jdbc on oracle最佳性能?如何才好?
maclean liu
Chapter 7 functions (c)
Chapter 7 functions (c)
hhliu
Developer Experience i TypeScript. Najbardziej ikoniczne duo
Developer Experience i TypeScript. Najbardziej ikoniczne duo
The Software House
Mutation Testing at BzhJUG
Mutation Testing at BzhJUG
STAMP Project
TypeScript - All you ever wanted to know - Tech Talk by Epic Labs
TypeScript - All you ever wanted to know - Tech Talk by Epic Labs
Alfonso Peletier
Async js - Nemetschek Presentaion @ HackBulgaria
Async js - Nemetschek Presentaion @ HackBulgaria
HackBulgaria
The Ring programming language version 1.5.1 book - Part 175 of 180
The Ring programming language version 1.5.1 book - Part 175 of 180
Mahmoud Samir Fayed
The Ring programming language version 1.9 book - Part 99 of 210
The Ring programming language version 1.9 book - Part 99 of 210
Mahmoud Samir Fayed
The Ring programming language version 1.7 book - Part 85 of 196
The Ring programming language version 1.7 book - Part 85 of 196
Mahmoud Samir Fayed
Mutate and Test your Tests
Mutate and Test your Tests
STAMP Project
Tendances
(20)
Is your C# optimized
Is your C# optimized
Encoder + decoder
Encoder + decoder
(18.03.2009) Cumuy Invita - Iniciando el año conociendo nuevas tecnologías - ...
(18.03.2009) Cumuy Invita - Iniciando el año conociendo nuevas tecnologías - ...
Let the type system be your friend
Let the type system be your friend
Promises generatorscallbacks
Promises generatorscallbacks
Writing SOLID C++ [gbgcpp meetup @ Zenseact]
Writing SOLID C++ [gbgcpp meetup @ Zenseact]
重構—改善既有程式的設計(chapter 9)
重構—改善既有程式的設計(chapter 9)
Functional solid
Functional solid
Es.next
Es.next
Functional JavaScript for everyone
Functional JavaScript for everyone
追求Jdbc on oracle最佳性能?如何才好?
追求Jdbc on oracle最佳性能?如何才好?
Chapter 7 functions (c)
Chapter 7 functions (c)
Developer Experience i TypeScript. Najbardziej ikoniczne duo
Developer Experience i TypeScript. Najbardziej ikoniczne duo
Mutation Testing at BzhJUG
Mutation Testing at BzhJUG
TypeScript - All you ever wanted to know - Tech Talk by Epic Labs
TypeScript - All you ever wanted to know - Tech Talk by Epic Labs
Async js - Nemetschek Presentaion @ HackBulgaria
Async js - Nemetschek Presentaion @ HackBulgaria
The Ring programming language version 1.5.1 book - Part 175 of 180
The Ring programming language version 1.5.1 book - Part 175 of 180
The Ring programming language version 1.9 book - Part 99 of 210
The Ring programming language version 1.9 book - Part 99 of 210
The Ring programming language version 1.7 book - Part 85 of 196
The Ring programming language version 1.7 book - Part 85 of 196
Mutate and Test your Tests
Mutate and Test your Tests
Similaire à 夜子まま塾講義3(androidで電卓アプリを作る)
京都Gtugコンパチapi
京都Gtugコンパチapi
Masafumi Terazono
AndroidからWebサービスを使う
AndroidからWebサービスを使う
Masafumi Terazono
Good code
Good code
Jane Prusakova
Andy lib解説
Andy lib解説
Masafumi Terazono
Vavr Java User Group Rheinland
Vavr Java User Group Rheinland
David Schmitz
Priming Java for Speed at Market Open
Priming Java for Speed at Market Open
Azul Systems Inc.
Imagine a world without mocks
Imagine a world without mocks
kenbot
L05if
L05if
Kgr Sushmitha
Exceptions irst
Exceptions irst
jkumaranc
JavaTalks: OOD principles
JavaTalks: OOD principles
stanislav bashkirtsev
C#, What Is Next?
C#, What Is Next?
Pieter Joost van de Sande
Whats new in_csharp4
Whats new in_csharp4
Abed Bukhari
Transaction is a monad
Transaction is a monad
Jarek Ratajski
Decision CAMP 2014 - Charles Forgy - Affecting rules performance
Decision CAMP 2014 - Charles Forgy - Affecting rules performance
Decision CAMP
Writing Good Tests
Writing Good Tests
Matteo Baglini
Software transactional memory. pure functional approach
Software transactional memory. pure functional approach
Alexander Granin
Hypercritical C++ Code Review
Hypercritical C++ Code Review
Andrey Karpov
Chainer-Compiler 動かしてみた
Chainer-Compiler 動かしてみた
Akira Maruoka
Chapter 2 Java Methods
Chapter 2 Java Methods
Khirulnizam Abd Rahman
Chapter 2 Method in Java OOP
Chapter 2 Method in Java OOP
Khirulnizam Abd Rahman
Similaire à 夜子まま塾講義3(androidで電卓アプリを作る)
(20)
京都Gtugコンパチapi
京都Gtugコンパチapi
AndroidからWebサービスを使う
AndroidからWebサービスを使う
Good code
Good code
Andy lib解説
Andy lib解説
Vavr Java User Group Rheinland
Vavr Java User Group Rheinland
Priming Java for Speed at Market Open
Priming Java for Speed at Market Open
Imagine a world without mocks
Imagine a world without mocks
L05if
L05if
Exceptions irst
Exceptions irst
JavaTalks: OOD principles
JavaTalks: OOD principles
C#, What Is Next?
C#, What Is Next?
Whats new in_csharp4
Whats new in_csharp4
Transaction is a monad
Transaction is a monad
Decision CAMP 2014 - Charles Forgy - Affecting rules performance
Decision CAMP 2014 - Charles Forgy - Affecting rules performance
Writing Good Tests
Writing Good Tests
Software transactional memory. pure functional approach
Software transactional memory. pure functional approach
Hypercritical C++ Code Review
Hypercritical C++ Code Review
Chainer-Compiler 動かしてみた
Chainer-Compiler 動かしてみた
Chapter 2 Java Methods
Chapter 2 Java Methods
Chapter 2 Method in Java OOP
Chapter 2 Method in Java OOP
Plus de Masafumi Terazono
初心者向けSpigot開発
初心者向けSpigot開発
Masafumi Terazono
Minecraft dayの報告
Minecraft dayの報告
Masafumi Terazono
BungeeCordeについて
BungeeCordeについて
Masafumi Terazono
Spongeについて
Spongeについて
Masafumi Terazono
Kobe.py 勉強会 minecraft piスライド
Kobe.py 勉強会 minecraft piスライド
Masafumi Terazono
Minecraftと連携するSlackちゃんという会話Botを作った話
Minecraftと連携するSlackちゃんという会話Botを作った話
Masafumi Terazono
初心者〜中級者 Android StudioによるAndroid勉強会資料(スライド)
初心者〜中級者 Android StudioによるAndroid勉強会資料(スライド)
Masafumi Terazono
夜子まま塾 2015年1月23日 進行用資料
夜子まま塾 2015年1月23日 進行用資料
Masafumi Terazono
Thetalaps
Thetalaps
Masafumi Terazono
Android wear勉強会2
Android wear勉強会2
Masafumi Terazono
夜子まま塾@鹿児島
夜子まま塾@鹿児島
Masafumi Terazono
セーラーソン振り返り
セーラーソン振り返り
Masafumi Terazono
関西Nfc lab勉強会 宣伝
関西Nfc lab勉強会 宣伝
Masafumi Terazono
関西支部 第二回 NFCLab勉強会
関西支部 第二回 NFCLab勉強会
Masafumi Terazono
日本Androidの会 中国支部資料
日本Androidの会 中国支部資料
Masafumi Terazono
Android+NFC 日本Androidの会神戸支部 勉強会
Android+NFC 日本Androidの会神戸支部 勉強会
Masafumi Terazono
関西支部Android勉強会(ロボットxnfc)
関西支部Android勉強会(ロボットxnfc)
Masafumi Terazono
関西Unity勉強会
関西Unity勉強会
Masafumi Terazono
夜子まま塾講義12(broadcast reciever)
夜子まま塾講義12(broadcast reciever)
Masafumi Terazono
夜子まま塾講義11(暗黙的intent)
夜子まま塾講義11(暗黙的intent)
Masafumi Terazono
Plus de Masafumi Terazono
(20)
初心者向けSpigot開発
初心者向けSpigot開発
Minecraft dayの報告
Minecraft dayの報告
BungeeCordeについて
BungeeCordeについて
Spongeについて
Spongeについて
Kobe.py 勉強会 minecraft piスライド
Kobe.py 勉強会 minecraft piスライド
Minecraftと連携するSlackちゃんという会話Botを作った話
Minecraftと連携するSlackちゃんという会話Botを作った話
初心者〜中級者 Android StudioによるAndroid勉強会資料(スライド)
初心者〜中級者 Android StudioによるAndroid勉強会資料(スライド)
夜子まま塾 2015年1月23日 進行用資料
夜子まま塾 2015年1月23日 進行用資料
Thetalaps
Thetalaps
Android wear勉強会2
Android wear勉強会2
夜子まま塾@鹿児島
夜子まま塾@鹿児島
セーラーソン振り返り
セーラーソン振り返り
関西Nfc lab勉強会 宣伝
関西Nfc lab勉強会 宣伝
関西支部 第二回 NFCLab勉強会
関西支部 第二回 NFCLab勉強会
日本Androidの会 中国支部資料
日本Androidの会 中国支部資料
Android+NFC 日本Androidの会神戸支部 勉強会
Android+NFC 日本Androidの会神戸支部 勉強会
関西支部Android勉強会(ロボットxnfc)
関西支部Android勉強会(ロボットxnfc)
関西Unity勉強会
関西Unity勉強会
夜子まま塾講義12(broadcast reciever)
夜子まま塾講義12(broadcast reciever)
夜子まま塾講義11(暗黙的intent)
夜子まま塾講義11(暗黙的intent)
Dernier
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
wesley chun
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
The Digital Insurer
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
Malak Abu Hammad
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
Khem
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
wesley chun
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
Puma Security, LLC
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
Radu Cotescu
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Miguel Araújo
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
Enterprise Knowledge
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
HampshireHUG
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
Rafal Los
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
Anna Loughnan Colquhoun
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
Delhi Call girls
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
Igalia
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
Delhi Call girls
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
UK Journal
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
ThousandEyes
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
sudhanshuwaghmare1
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
Maria Levchenko
Dernier
(20)
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
夜子まま塾講義3(androidで電卓アプリを作る)
1.
Now Loading. Please
Wait ... Re:Kayo-System Co.,Ltd. 2012 2 22
2.
Re:Kayo-System Co.,Ltd. 2012
2 22
3.
Re:Kayo-System Co.,Ltd. 2012
2 22
4.
Re:Kayo-System Co.,Ltd. 2012
2 22
5.
Re:Kayo-System Co.,Ltd. 2012
2 22
6.
Re:Kayo-System Co.,Ltd. 2012
2 22
7.
Re:Kayo-System Co.,Ltd. 2012
2 22
8.
Re:Kayo-System Co.,Ltd. 2012
2 22
9.
Re:Kayo-System Co.,Ltd. 2012
2 22
10.
Re:Kayo-System Co.,Ltd. 2012
2 22
11.
Re:Kayo-System Co.,Ltd. 2012
2 22
12.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/ android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" > <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/hello" /> </LinearLayout> Re:Kayo-System Co.,Ltd. 2012 2 22
13.
Re:Kayo-System Co.,Ltd. 2012
2 22
14.
Re:Kayo-System Co.,Ltd. 2012
2 22
15.
Re:Kayo-System Co.,Ltd. 2012
2 22
16.
Re:Kayo-System Co.,Ltd. 2012
2 22
17.
Re:Kayo-System Co.,Ltd. 2012
2 22
18.
Re:Kayo-System Co.,Ltd. 2012
2 22
19.
package ykmjuku.android.sample.app;
public class Calculater { StringBuilder mInputNumber = new StringBuilder(); String mOperator; int mResult = 0; private boolean isNumber(String key) { try { Integer.parseInt(key); return true; } catch (NumberFormatException e) { } return false; } Re:Kayo-System Co.,Ltd. 2012 2 22
20.
private boolean isSupportedOperator(String
key) { if (key.equals("+")) { return true; } else if (key.equals("-")) { return true; } else if (key.equals("*")) { return true; } else if (key.equals("/")) { return true; } return false; } Re:Kayo-System Co.,Ltd. 2012 2 22
21.
private void doCalculation(String
ope) { if (ope.equals("+")) { mResult = mResult + Integer.parseInt(mInputNumber.toString()); } else if (ope.equals("-")) { mResult = mResult - Integer.parseInt(mInputNumber.toString()); } else if (ope.equals("*")) { mResult = mResult * Integer.parseInt(mInputNumber.toString()); } else if (ope.equals("/")) { mResult = mResult / Integer.parseInt(mInputNumber.toString()); } mInputNumber = new StringBuilder(); } Re:Kayo-System Co.,Ltd. 2012 2 22
22.
public String putInput(String
key) { if (isNumber(key)) { mInputNumber.append(key); return mInputNumber.toString(); } else if (isSupportedOperator(key)) { if (mOperator != null) { doCalculation(mOperator); mOperator = null; } else if (mInputNumber.length() > 0) { mResult = Integer.parseInt(mInputNumber.toString()); mInputNumber = new StringBuilder(); } mOperator = key; return mOperator; } else if (key.equals("=")) { if (mOperator != null) { doCalculation(mOperator); mOperator = null; } return Integer.toString(mResult); } else { // return null; } } } Re:Kayo-System Co.,Ltd. 2012 2 22
23.
(bit)
boolean 1 true/false FALSE char 16 0 FFFF 0 byte 8 -128 127 0 short 16 -32768 32767 0 int 32 0 long 64 0 float 32 0.0 double 64 0.0 Re:Kayo-System Co.,Ltd. 2012 2 22
24.
Re:Kayo-System Co.,Ltd. 2012
2 22
25.
Re:Kayo-System Co.,Ltd. 2012
2 22
26.
try {
Integer.parseInt(key); return true; } catch (NumberFormatException e) { } return false; Re:Kayo-System Co.,Ltd. 2012 2 22
27.
Ykmjuku002Activity
”OK” Re:Kayo-System Co.,Ltd. 2012 2 22
28.
package ykmjuku.android.sample.app;
import android.app.Activity; import android.os.Bundle; import android.text.Editable; import android.text.TextWatcher; import android.util.Log; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.EditText; import android.widget.TextView; public class Ykmjuku002Activity extends Activity implements TextWatcher, OnClickListener { EditText mEditText1; TextView mTextView1; Button mButton1; Calculater mCalculater = new Calculater(); Re:Kayo-System Co.,Ltd. 2012 2 22
29.
/** Called when
the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); mTextView1 = (TextView)findViewById(R.id.textView1); mEditText1 = (EditText)findViewById(R.id.editText1); mButton1 = (Button)findViewById(R.id.button1); mEditText1.addTextChangedListener(this); mButton1.setOnClickListener(this); } Re:Kayo-System Co.,Ltd. 2012 2 22
30.
public void afterTextChanged(Editable
s) { String input = s.toString(); Log.d("Ykmjuku002Activity", "input="+input); if(input.length()>0){ String dispText = mCalculater.putInput(input); if(dispText!=null){ mTextView1.setText(dispText); } s.clear(); } } public void beforeTextChanged(CharSequence s, int start, int count, int after) { // TODO Auto-generated method stub } public void onTextChanged(CharSequence s, int start, int before, int count) { // TODO Auto-generated method stub } Re:Kayo-System Co.,Ltd. 2012 2 22
31.
public void onClick(View
v) { String dispText = mCalculater.putInput("="); if(dispText!=null){ mTextView1.setText(dispText); } mEditText1.setText(null); } } Re:Kayo-System Co.,Ltd. 2012 2 22
32.
Re:Kayo-System Co.,Ltd. 2012
2 22
33.
Re:Kayo-System Co.,Ltd. 2012
2 22
Télécharger maintenant