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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Ryo Sakaguchi
April 19, 2018
Programming
2.2k
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
鹿野さんに聞く!『TypeScriptコードレシピ集』で磨く実践力
tonkotsuboy_com
4
1k
例外の正しい扱い方 そのエラー try-catchして大丈夫?
jinwatanabe
0
350
関数型プログラミングのメリットって何だろう?
wanko_it
0
160
LLMによるContent Moderationの本番運用の裏側と品質担保への挑戦
suikabar
3
840
なぜ型を書くのか? TSKaigi2026で改めて考える #tskaigi_smarthr
kajitack
0
320
気圧・高度・GPSを記録&可視化するアプリ「Koudo」を作った話
hjmkth
1
350
初めてのKubernetes 本番運用でハマった話
oku053
0
120
なぜ関数型プログラミングで「型」と「証明」が語られるのか #fp_matsuri
kajitack
3
760
IBM Bobを活用したレガシーアプリの最新化
oniak3ibm
PRO
1
250
Webフレームワークの ベンチマークについて
yusukebe
0
200
PHPだって関数型したい 〜できること、できないこと〜 / fp-in-php
jsoizo
0
170
自作OSでスライド発表する
uyuki234
1
3.7k
Featured
See All Featured
The Art of Programming - Codeland 2020
erikaheidi
57
14k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
260
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
65
56k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
3.7k
We Are The Robots
honzajavorek
0
270
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
290
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
420
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
970
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.2k
Paper Plane
katiecoart
PRO
1
52k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.5k
How to Ace a Technical Interview
jacobian
281
24k
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