Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
はてなにおけるモダンAndroidアプリ開発入門
Search
cockscomb
December 03, 2014
Programming
0
15k
はてなにおけるモダンAndroidアプリ開発入門
@ Hatena Engineer Seminar #3
cockscomb
December 03, 2014
Tweet
Share
More Decks by cockscomb
See All by cockscomb
jq at the Shortcuts
cockscomb
1
1.7k
GraphQL放談
cockscomb
4
1.9k
GraphQL Highway
cockscomb
28
8.2k
吉田を支える技術
cockscomb
0
2.1k
コーポレートサイトを静的化してAmplify Consoleにデプロイする
cockscomb
0
3.3k
ユーザインターフェイスと非同期処理
cockscomb
5
1.8k
GUIアプリケーションの構造と設計
cockscomb
10
10k
イカリング2におけるシングルページアプリケーション
cockscomb
2
7.4k
あなたの知らない UIKit の世界 — UITableView に UITextView を置きたい
cockscomb
1
7.3k
Other Decks in Programming
See All in Programming
AI時代におけるSRE、 あるいはエンジニアの生存戦略
pyama86
6
1.1k
Why Jakarta EE Matters to Spring - and Vice Versa
ivargrimstad
0
1.1k
macOS でできる リアルタイム動画像処理
biacco42
9
2.4k
Outline View in SwiftUI
1024jp
1
330
subpath importsで始めるモック生活
10tera
0
300
弊社の「意識チョット低いアーキテクチャ」10選
texmeijin
5
24k
タクシーアプリ『GO』のリアルタイムデータ分析基盤における機械学習サービスの活用
mot_techtalk
4
1.4k
役立つログに取り組もう
irof
28
9.6k
What’s New in Compose Multiplatform - A Live Tour (droidcon London 2024)
zsmb
1
470
Contemporary Test Cases
maaretp
0
140
Macとオーディオ再生 2024/11/02
yusukeito
0
370
cmp.Or に感動した
otakakot
2
150
Featured
See All Featured
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
Building Better People: How to give real-time feedback that sticks.
wjessup
364
19k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
364
24k
Faster Mobile Websites
deanohume
305
30k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
28
8.2k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
31
2.7k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
246
1.3M
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
126
18k
Documentation Writing (for coders)
carmenintech
65
4.4k
How To Stay Up To Date on Web Technology
chriscoyier
788
250k
Measuring & Analyzing Core Web Vitals
bluesmoon
4
120
Transcript
כגזחֶֽ ٌتٝ"OESPJE،فٔ涪Ⰵ DPDLTDPNC !)BUFOB&OHJOFFS4FNJOBS
JEDPDLTDPNC
JEDPDLTDPNC ˖ ،فٔ؛٦ءّٝؒٝآص، ˖ J04"OESPJE8FC،فٔ؛٦ءّٝ⡲ ˖ כגזـؚٗث٦ي
WWDC14
None
ͰखʹೖΕΑ͏ כגזـؚٗ
• Motivation • Process • Development • Engineers
None
Motivation
None
–Anonymous ˑ״999ך"OESPJE،فٔת˒
0UIFST "OESPJE J04
None
X
Build Flagships ⛵
None
Process
None
None
˖ ل٦ػ٦فٗزة؎فדⰋגך歗䲽ֹ⳿ׅ ˖ 歗ך銲稆峤ְ⳿ׅ ˖ 歗ה歗ךאזָך濨湼זֻׅ ˖ فٗزة؎فדِ٦ؠؽٔذ؍ذأزׅ ˖ זץֻ傍ְ媮ꥡד鐰⣣ׅ
˖ ذأزך穠卓החفٗزة؎ف⥜姻ׅ
剢 抟 宏 加 ꆃ أفٔٝز 鎘歗 أفٔٝز ٖؽُ٦
剢 抟 宏 加 ꆃ أفٔٝز 鎘歗 ِ٦ؠؽٔ ذ؍ذأز 鎘歗
ِ٦ؠؽٔ ذ؍ذأز ؙٕٔ٦ز ِ٦ؠؽٔ ذ؍ذأز أفٔٝز ٖؽُ٦
None
None
˖ أؙٓيؿٖ٦يٙ٦ؙח⛦ֿהד嚂ׅ ˖ ِ٦ؠؽٔذ؍ذأزד䧭卓然钠ׅ ˖ 䙼ְ鴥דֹֽ《ꤐֻ ˖ أفٔٝزהِ٦ؠؽٔذ؍ذأزず劍ׅ ˖ 竰竲涸ז何㊣ך؎ذٖ٦ءّٝ㔐ׅ
None
Development
.BUFSJBM%FTJHO ˖ "QQ$PNQBU ˖ 'SBHNFOU
.BUFSJBM%FTJHO ˖ HPPHMFDPNEFTJHO ˖ "QQ$PNQBU ˖ "DUJPO#BS"DUJWJUZ ˖ 5IFNF"QQ$PNQBU ˖
תתָל
'SBHNFOU ˖ 'SBHNFOU ˖ 'SBHNFOU5SBOTBDUJPO ˖ 'SBHNFOU.BOBHFS ˖ عو
Fragment fragment = getSupportFragmentManager().findFragmentById(R.id.container); if (fragment == null) {
fragment = SomeFragment.newInstance(); getSupportFragmentManager().beginTransaction() .replace(R.id.container, fragment) .commit(); }
'SBHNFOUعوه؎ٝز ˖ 'SBHNFOUך䗁⯋ ˖ 'SBHNFOUךⰅ㶨 ˖ getChildFragmentManager ˖ onActivityResult ˖
IllegalStateException ˖ commitAllowingStateLoss
כגזـؚٗך箟꧊ٌ٦س ˖ 鋅תת箟꧊ ˖ כגז鎸岀 ˖ .BSLEPXO
鋅תת箟꧊ ˖ )5.-ךcontenteditable • execCommand("formatBlock", false, "H1") ˖ 8FC7JFXךغ٦آّٝח״ ˖
$ISPNFדرغحؚ"OESPJE⟃꣬
כגז鎸岀٥.BSLEPXO ˖ ♨㻝ח㹋鄲
ֿֿכ鋅⳿׃ח׃ְ] 劤俑דׅկ
ֿֿכ鋅⳿׃ח׃ְ] 劤俑דׅկ
ֿֿכ鋅⳿׃ח׃ְ] 劤俑דׅկ
ֿֿכ鋅⳿׃ח׃ְ] 劤俑דׅկ
ֿֿכ鋅⳿׃ח׃ְ] 劤俑דׅկ
מהאך갪湡 סאך갪湡 אך갪湡
מהאך갪湡 סאך갪湡 אך갪湡
מהאך갪湡 סאך갪湡 אך갪湡
מהאך갪湡 סאך갪湡 אך갪湡
מהאך갪湡 סאך갪湡 אך갪湡
㣐ⴖזֿהכ䓼锃׃ְ
㣐ⴖזֿהכC䓼锃C׃ְ
㣐ⴖזֿהכ䓼锃׃ְ
♨㻝ח㹋鄲כꨇ׃ְ ˖ 牞כ稢鿇ח㺊 ˖ ֽו˘˘ ˖ 䩛דְְ然钠׃ֻזְ ˖ ךדծ ˖
⽃⡤ذأز剅ֻ
public void testGetLineRanges() throws Exception { String text = "ABCDEFG\n"
+ "HIJKLMN\n" + "OPQRSTU\r\n" + "VWXYZ"; { List<BaseCommand.Range> lineRanges = BaseCommand.getLineRanges(text, new BaseCommand.Range(8, 9)); assertContentsInOrder(lineRanges, new BaseCommand.Range(8, 16)); assertEquals("HIJKLMN\n", text.subSequence(8, 16)); } }
public void testDecorateWrappingInline() throws Exception { String text = "ABCDEFG\n"
+ "HIJKLMN\n"; ArrayList<String> decorators = Lists.newArrayList("<b>", "</b>"); { Editable editable = Editable.Factory.getInstance().newEditable(text); BaseCommand.Range newRange = BaseCommand.decorateWrappingInline( editable, new BaseCommand.Range(2, 4), decorators ); assertEquals("AB<b>CD</b>EFG\n" + "HIJKLMN\n", editable.toString()); assertEquals(new BaseCommand.Range(5, 7), newRange); } }
⽃⡤ذأز ˖ ٗآحؙךذأز剅ֻ ˖ הծ ˖ 6*ָזֻגفؚٗٓيך姻䔲䚍ָ嗚鏾דֹ ˖ ךדծ ˖
ذأز鸐؝٦س剅ֻֽד״ְ ˖ 牞כذأزח㺊
،ؕؐٝزה"1* ˖ "DDPVOU.BOBHFS ˖ /FUXPSL$MJFOU
"DDPVOU.BOBHFS ˖ "OESPJEך،ؕؐٝز盖椚ءأذي ˖ ،ؕؐٝز盖椚䬄韋⻉ ˖ 钠鏾ز٦ؙٝך《䖤䬄韋⻉ ˖ ،فٔדⰟ剣
AccountManager accountManager = AccountManager.get(this); // ΞΧϯτΛՃ Account account = new
Account("cockscomb", "jp.ne.hatena"); accountManager.addAccountExplicitly(account, "Passw0rd!", null); // ΞΧϯτΛऔಘ Account[] accounts = accountManager.getAccountsByType("jp.ne.hatena");
accountManager.getAuthToken( account, "jp.ne.hatena.token", true, new AccountManagerCallback<Bundle>() { @Override public void
run(AccountManagerFuture<Bundle> future) { try { // τʔΫϯऔಘ Bundle result = future.getResult(); String authToken = result.getString( AccountManager.KEY_AUTHTOKEN ); } catch (OperationCanceledException | IOException | AuthenticatorException e) { // ΤϥʔϋϯυϦϯά } } }, null);
"DDPVOU.BOBHFS כגזؚٗ؎ٝ盖椚
8FC"1* ˖ 駈זֽל⡲ ˖ 1FSMד剅ְג1VMM3FRVFTU
)551/FUXPSLJOH ˖ 圫ղז鼅䫛肇 ˖ )UUQ63-$POOFDUJPO ˖ )UUQ$MJFOU ˖ 7PMMFZ ˖
0L)UUQ ˖ 3FUSPU
7PMMFZ ˖ (PPHMF醡 ˖ &BTZ 'BTU/FUXPSLJOHGPS"OESPJE ˖ "DDPVOU.BOBHFSה鸬䵿
public void getEntries( Response.Listener<JSONObject> listener, Response.ErrorListener errorListener ) { Request<JSONObject>
request = new JsonObjectRequest( Request.Method.GET, HOST_HATENA + "/my/entries", listener, errorListener ) { @Override public Map<String, String> getHeaders() throws AuthFailureError { HashMap<String, String> headers = new HashMap<>(); headers.put("X-Session-Key", mAuthenticator.getAuthToken()); return headers; } }; RequestQueue requestQueue = Volley.newRequestQueue(mContext); requestQueue.add(request); }
3FUSPU ˖ 4RVBSF醡 ˖ "UZQFTBGF3&45DMJFOUGPS"OESPJEBOE+BWB
public class BlogClient { private static final String API_URL =
"https://blog.hatena.ne.jp"; public interface BlogService { @GET("/my/entries") void getEntries( Callback<List<EntryResponse>> callback ); @POST("/my/entries") void postEntry( @Body DeviceRequest entry, Callback<EntryResponse> callback ); @Multipart @POST("/my/images") void uploadProfileIcon( @Part("image") TypedFile image, @Part("title") String title, Callback<ImageResponse> callback ); } public static BlogService getSessionClient(Account account) { RestAdapter restAdapter = new RestAdapter.Builder()
ͰखʹೖΕΑ͏ כגזـؚٗ
None
˒˒˒˒˒ ˒˒˒˒˒
None
Engineers
id:cockscomb id:aereal id:nobuoka id:hakobe932 id:funnelbit id:sakahara id:yashigani_w
ـؚٗث٦ي ـحؙو٦ؙث٦ي
أو٦ز⠓
أو٦ز⠓ ˖ ✼ְךأو٦زׁ釈獥ִ⠓ ˖ ث٦يדⴓ倖ָׁז长㉏겗鍑寸 ˖ 䪮遭ךⰟ剣 ˖ ث٦ي埆倖ׅ《穈
id:cockscomb id:aereal id:nobuoka id:hakobe932 id:funnelbit id:sakahara id:yashigani_w
Join Us id:cockscomb id:aereal id:nobuoka id:hakobe932 id:funnelbit id:sakahara id:yashigani_w You
None