Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
FreshRSS-Android
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
30
Issues
30
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Christophe Henry
FreshRSS-Android
Commits
734d24ae
Commit
734d24ae
authored
Apr 25, 2019
by
Christophe Henry
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fix-hide-keyboard' into 'develop'
Fix Keyboard not hidden before login See merge request
!33
parents
54c49a3a
d7eb6f65
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
3 deletions
+12
-3
app/src/main/java/fr/chenry/android/freshrss/activities/LoginActivity.kt
...va/fr/chenry/android/freshrss/activities/LoginActivity.kt
+12
-3
No files found.
app/src/main/java/fr/chenry/android/freshrss/activities/LoginActivity.kt
View file @
734d24ae
...
...
@@ -5,6 +5,7 @@ import android.animation.AnimatorListenerAdapter
import
android.content.Context
import
android.content.Intent
import
android.os.Bundle
import
android.os.ResultReceiver
import
android.view.View
import
android.view.inputmethod.EditorInfo
import
android.view.inputmethod.InputMethodManager
...
...
@@ -19,7 +20,11 @@ import fr.chenry.android.freshrss.store.Store
import
fr.chenry.android.freshrss.utils.InstanceUrl
import
fr.chenry.android.freshrss.utils.Try
import
fr.chenry.android.freshrss.utils.e
import
fr.chenry.android.freshrss.utils.whenNotNull
import
fr.chenry.android.freshrss.utils.whenNull
import
kotlinx.android.synthetic.main.activity_login.*
import
nl.komponents.kovenant.deferred
import
nl.komponents.kovenant.resolve
import
nl.komponents.kovenant.ui.failUi
import
nl.komponents.kovenant.ui.successUi
import
java.util.Properties
...
...
@@ -134,11 +139,15 @@ class LoginActivity : AppCompatActivity() {
}
private
fun
hideKeyboard
()
{
val
deferred
=
deferred
<
Unit
,
Exception
>()
val
view
=
this
.
currentFocus
view
?.
let
{
view
.
whenNotNull
{
val
imm
=
getSystemService
(
Context
.
INPUT_METHOD_SERVICE
)
as
InputMethodManager
imm
.
hideSoftInputFromWindow
(
it
.
windowToken
,
0
)
}
imm
.
hideSoftInputFromWindow
(
it
.
windowToken
,
0
,
object
:
ResultReceiver
(
null
)
{
override
fun
onReceiveResult
(
resultCode
:
Int
,
resultData
:
Bundle
?)
=
deferred
.
resolve
()
})
}.
whenNull
{
deferred
.
resolve
()
}
deferred
.
promise
.
get
()
}
private
fun
showProgress
(
show
:
Boolean
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment