Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
InstiApp
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
RAHUL SHARMA
InstiApp
Commits
c4a4c6fc
Commit
c4a4c6fc
authored
Jul 11, 2018
by
Varun Patil
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Close keyboard on search
parent
1b6b3c50
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
app/src/main/java/app/insti/fragment/MapFragment.java
app/src/main/java/app/insti/fragment/MapFragment.java
+10
-1
No files found.
app/src/main/java/app/insti/fragment/MapFragment.java
View file @
c4a4c6fc
package
app.insti.fragment
;
import
android.app.Activity
;
import
android.content.Context
;
import
android.content.res.Configuration
;
import
android.graphics.Color
;
...
...
@@ -34,6 +35,7 @@ import android.view.MotionEvent;
import
android.view.View
;
import
android.view.ViewGroup
;
import
android.view.inputmethod.EditorInfo
;
import
android.view.inputmethod.InputMethodManager
;
import
android.widget.AdapterView
;
import
android.widget.ArrayAdapter
;
import
android.widget.EditText
;
...
...
@@ -919,7 +921,14 @@ public class MapFragment extends Fragment implements TextWatcher,
}
private
void
hideKeyboard
()
{
InputMethodManager
imm
=
(
InputMethodManager
)
getActivity
().
getSystemService
(
Activity
.
INPUT_METHOD_SERVICE
);
//Find the currently focused view, so we can grab the correct window token from it.
View
view
=
getActivity
().
getCurrentFocus
();
//If no view currently has focus, create a new one, just so we can grab a window token from it
if
(
view
==
null
)
{
view
=
new
View
(
getActivity
());
}
imm
.
hideSoftInputFromWindow
(
view
.
getWindowToken
(),
0
);
}
@Override
...
...
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