Merge pull request #64 from dddddd-mmmmmm/issue-48
issue-48: hide keyboard when switching to now playing
This commit is contained in:
commit
d5b56eecdd
|
@ -171,6 +171,7 @@ public class SubsonicFragmentActivity extends SubsonicActivity implements Downlo
|
|||
panelSlideListener = new SlidingUpPanelLayout.PanelSlideListener() {
|
||||
@Override
|
||||
public void onPanelSlide(View panel, float slideOffset) {
|
||||
Util.hideKeyboard(panel);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -41,9 +41,12 @@ import android.text.util.Linkify;
|
|||
import android.util.Log;
|
||||
import android.util.SparseArray;
|
||||
import android.view.Gravity;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
import android.widget.ListView;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
import android.app.Activity;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.StringRes;
|
||||
|
@ -1135,4 +1138,10 @@ public final class Util {
|
|||
|
||||
return random;
|
||||
}
|
||||
|
||||
public static void hideKeyboard(View view) {
|
||||
InputMethodManager imm = (InputMethodManager) view.getContext().getSystemService(Activity.INPUT_METHOD_SERVICE);
|
||||
|
||||
imm.hideSoftInputFromWindow(view.getWindowToken(), 0);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue