Skip to content
This repository has been archived by the owner on Jul 25, 2019. It is now read-only.

Commit

Permalink
Make it close the soft keyboard after tapping next
Browse files Browse the repository at this point in the history
  • Loading branch information
austintaylor committed Mar 17, 2014
1 parent bab0554 commit de86864
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.uservoice.uservoicesdk.ui;

import android.annotation.SuppressLint;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.Context;
import android.support.v4.app.FragmentActivity;
Expand All @@ -11,6 +12,7 @@
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.AdapterView.OnItemClickListener;
import android.widget.BaseAdapter;
Expand Down Expand Up @@ -273,6 +275,8 @@ protected void onButtonTapped() {
state = State.INIT_LOADING;
notifyDataSetChanged();
Deflection.setSearchText(query);
InputMethodManager imm = (InputMethodManager)context.getSystemService(Activity.INPUT_METHOD_SERVICE);
imm.toggleSoftInput(InputMethodManager.HIDE_IMPLICIT_ONLY, 0);
Article.loadInstantAnswers(query, new DefaultCallback<List<BaseModel>>(context) {
@Override
public void onModel(List<BaseModel> model) {
Expand Down

0 comments on commit de86864

Please sign in to comment.