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
キーボードの切替を いい感じにしたい
Search
Ryo Sakaguchi
April 19, 2018
Programming
2.1k
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
キーボードの切替を いい感じにしたい
potatotips #50
https://github.com/wakwak3125/KeyboardShowHideSample
Ryo Sakaguchi
April 19, 2018
More Decks by Ryo Sakaguchi
See All by Ryo Sakaguchi
なんとなくgRPC-Java を使ってるそこの俺、gRPC-Kotlin に移行したらどうだ?
wakwak3125
0
17
Android Architecture Componentsを使って、改善・効率化するAndroidアプリ開発
wakwak3125
0
1.3k
Test multiple APKs with Robolectric
wakwak3125
0
830
Clip, Elevation and ViewOutlineProvider
wakwak3125
1
1.3k
WebView as Fancy and effective View
wakwak3125
1
1.6k
ViewPager2をちょっとさわってみよう
wakwak3125
0
1.7k
年末だし、振り返るKotlin
wakwak3125
1
1.1k
社内ライブラリのアップデートフロー
wakwak3125
4
3.9k
Wantedly Peopleのリリースフロー
wakwak3125
1
4.8k
Other Decks in Programming
See All in Programming
AI 輔助遺留系統現代化的經驗分享
jame2408
1
1k
Observability in Practice:Grafana 與 Edge Device SRE 的那些事
blueswen
0
180
Semantic Version 単位で戦略を柔軟に変えて、パッケージアップデートを自動化する
daitasu
1
310
act1-costs.pdf
sumedhbala
0
120
エージェンティックRAGにAWSで入門しよう!
har1101
9
1.8k
不変条件と整合性境界—ビジネスが決める設計判断と実現パターン / Invariants and Consistency Boundaries
nrslib
14
5.9k
Dataformのリポジトリを立ち上げるときにまずやること / dataform-day0-2026
snhryt
0
190
Inside Stream API
skrb
1
790
Even G2とAWSで推しのエージェントを召喚しよう!
har1101
1
130
Vite+ Unified Toolchain for the Web
naokihaba
0
360
任せる範囲はこう広がった / How the Scope of AI Delegation Has Expanded
nrslib
0
150
IBM Bobを活用したレガシーアプリの最新化
oniak3ibm
PRO
1
220
Featured
See All Featured
Site-Speed That Sticks
csswizardry
13
1.2k
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.9k
Side Projects
sachag
455
43k
Agile that works and the tools we love
rasmusluckow
331
22k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
260
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Building an army of robots
kneath
306
46k
The Curse of the Amulet
leimatthew05
2
13k
How GitHub (no longer) Works
holman
316
150k
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
240
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
200
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
140
Transcript
©2018 Wantedly, Inc. 2018.4.19 - ΩʔϘʔυͷସΛ ͍͍ײ͡ʹ͍ͨ͠ QPUBUPUJQT 3ZP4BLBHVDIJ !XBLXBL
©2018 Wantedly, Inc. ͔Β୭͔ڭ͑ͯཉ͍͠ པΉ
©2018 Wantedly, Inc. w 3ZP4BLBHVDIJ!XBLXBL w 8BOUFEMZ *OD d
w 8BOUFEMZ1FPQMF About me
©2018 Wantedly, Inc. ͪΐͬͱߟ͑ͯΈͨ Ͳ͏ͬͯ·͔͢ʁ .FTTFOHFSͱ͔Ͱ͋Δͭ w ֆจࣈͱ͔ૹ৴͢Δࣸਅબͨ͠Γͱ͔͢Δͱ͜Ζ w Ϙλϯͱ͔Λλοϓͨ͠Β͍͍ײ͡ʹΓସΘͬͯ
͘ΕΔͭ w J04ͰΑ͘ݟΔ͔ʁ
©2018 Wantedly, Inc. ΩʔϘʔυͷସ దʹΔ߹ attachmentButton.setOnClickListener { if (!pickerContainer.isVisible()) {
val params = window.attributes ImeUtil.hideImeKeyboard(this, editText) pickerContainer.visible() window.attributes = params } else { pickerContainer.gone() ImeUtil.showImeKeyboard(this, editText) } } val attachmentButton = findViewById<ImageView>(R.id.button_plus)
©2018 Wantedly, Inc. ΩʔϘʔυͷସ దʹΔ߹ val attachmentButton = findViewById<ImageView>(R.id.button_plus) attachmentButton.setOnClickListener
{ if (!pickerContainer.isVisible()) { val params = window.attributes ImeUtil.hideImeKeyboard(this, editText) pickerContainer.visible() window.attributes = params } else { pickerContainer.gone() ImeUtil.showImeKeyboard(this, editText) } }
©2018 Wantedly, Inc. ΩʔϘʔυͷସ దʹΔ߹ val attachmentButton = findViewById<ImageView>(R.id.button_plus) attachmentButton.setOnClickListener
{ if (!pickerContainer.isVisible()) { val params = window.attributes ImeUtil.hideImeKeyboard(this, editText) pickerContainer.visible() window.attributes = params } else { pickerContainer.gone() ImeUtil.showImeKeyboard(this, editText) } } όίϯ/ΨίϯΈ͍ͨͳԻ͕ฉ͖͑ͯͦ͜͏
©2018 Wantedly, Inc. ͪΐͬͱߟ͑ͯΈ·ͨ͠
©2018 Wantedly, Inc. ͪΐͬͱߟ͑ͯΈͨ .FTTFOHFSΛࢀߟʹ͢Δ ͬͨ͜ͱ w 7JFXߏͷEVNQͱͬͯΈΔ w BECTIFMMEVNQTZTBDUJWJUZUPQ
w ͻͨ͢ΒΓସ͑ͯΈͨ w ΩʔϘʔυͷߴ͞Λۃʹখ͘͞େ͖ͯ͘͠ସࣗମʹͲ͏੍͍ͬͨݶԽͰߦΘΕ͍ͯΔ͔͔֬Ίͨ w ҙѱʹͳͬͨؾ࣋ͪͰյ͠ʹ͔͔Δ
©2018 Wantedly, Inc. ͪΐͬͱߟ͑ͯΈͨ .FTTFOHFSΛࢀߟʹ͢Δ Θ͔ͬͨ͜ͱ w 7JFXͷߏ w ಛผͳมΘͬͨ$VTUPN7JFXΛ͍ͬͯΔ༷ࢠͳ͔ͬͨɻ
w ͻͨ͢ΒΓସ͑ͨ w ΩʔϘʔυͷཪʹ7JFX͕͋ΔงғؾΛ௫Μͩ w ͱ͍͏͜ͱΩʔϘʔυΛӅ͢ʢด͡Δʣࡍʹߴ͕͞มΘΒͳ͚Εྑ͍ͷͰʁ w ۃͳߴ͞ͷ߹NJONBY)FJHIUΛઃఆ͍ͯ͠Δͷ͔ͿͬյΕΔ͜ͱͳ͔ͬͨ
©2018 Wantedly, Inc. ͬͯΈͨ ΩʔϘʔυΛด͡Δࡍʹߴ͞Λม͑ͳ͍Α͏ʹ͢ΔΞϓϩʔν
©2018 Wantedly, Inc. ΩʔϘʔυͷସ దʹΔ߹ val attachmentButton = findViewById<ImageView>(R.id.button_plus) attachmentButton.setOnClickListener
{ if (!pickerContainer.isVisible()) { val params = window.attributes ImeUtil.hideImeKeyboard(this, editText) toAdjustNothing() pickerContainer.visible() window.attributes = params } else { pickerContainer.gone() toAdjustResize() ImeUtil.showImeKeyboard(this, editText) } }
©2018 Wantedly, Inc. ΩʔϘʔυͷସ ͪΐͬͱஸೡʹΔ߹ val attachmentButton = findViewById<ImageView>(R.id.button_plus) attachmentButton.setOnClickListener
{ if (!pickerContainer.isVisible()) { val params = window.attributes ImeUtil.hideImeKeyboard(this, editText) toAdjustNothing() pickerContainer.visible() window.attributes = params } else { pickerContainer.gone() toAdjustResize() ImeUtil.showImeKeyboard(this, editText) } }
©2018 Wantedly, Inc. ΩʔϘʔυͷସ ͪΐͬͱஸೡʹΔ߹ val attachmentButton = findViewById<ImageView>(R.id.button_plus) attachmentButton.setOnClickListener
{ if (!pickerContainer.isVisible()) { val params = window.attributes ImeUtil.hideImeKeyboard(this, editText) toAdjustNothing() pickerContainer.visible() window.attributes = params } else { pickerContainer.gone() toAdjustResize() ImeUtil.showImeKeyboard(this, editText) } } ΘΓ͔͠εϜʔζʂ
©2018 Wantedly, Inc. UP"EKVTU3FTJ[F 4PGU*OQVU.PEF ͦΕͧΕͲ͏͍͏ಈ͖Λ͢Δͷ͔ fun toAdjustResize() { window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE)
} •LayoutManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE •͜ΕWindowʹΩʔϘʔυͷग़ݱͷࡍʹɺΩʔϘʔυ͕ද͍ࣔͯ͠Δcontentsʹ͔ͿΒͳ͍Α͏ʹ WindowͷResizeΛ͢Δͷ
©2018 Wantedly, Inc. UP"EKVTU/PUIJOH 4PGU*OQVU.PEF ͦΕͧΕͲ͏͍͏ಈ͖Λ͢Δͷ͔ fun toAdjustNothing() { window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_Nothing)
} •LayoutManager.LayoutParams.SOFT_INPUT_ADJUST_Nothing •ΩʔϘʔυͷग़ݱ࣌ʹɺWindowͷߴ͞ௐͳͲΛ·ͬͨ͘͠ͳ͘ͳΔϞʔυɻ ຊʹԿ͠ͳ͍ͷͰɺ௨ৗ࣌ʹ͏ͱcontentsͱ͔Ϳͬͯ͠·͏
©2018 Wantedly, Inc. UP"EKVTU/PUIJOH %FNP"QQ fun toAdjustNothing() { window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_Nothing) }
•LayoutManager.LayoutParams.SOFT_INPUT_ADJUST_Nothing •ΩʔϘʔυͷग़ݱ࣌ʹɺWindowͷߴ͞ௐͳͲΛ·ͬͨ͘͠ͳ͘ͳΔϞʔυɻ ຊʹԿ͠ͳ͍ͷͰɺ௨ৗ࣌ʹ͏ͱcontentsͱ͔Ϳͬͯ͠·͏
©2018 Wantedly, Inc. ͜ͷͭΛదʹΓସ͑Δ ͱɺ͏·͘ߦ͘
©2018 Wantedly, Inc. ແཧཧײ͋ΔͷͰεϚʔτͳ ํ๏ืू͍ͯ͠·͢
©2018 Wantedly, Inc. IUUQTHJUIVCDPNXBLXBL ,FZCPBSE4IPX)JEF4BNQMF ࠓͷαϯϓϧ͜͜ʹ͋Γ·͢
©2018 Wantedly, Inc. 5IBOLT