android-input-method

Hiding keyboard after calling new Activity that shows a ProgressDialog

纵然是瞬间 提交于 2019-12-20 15:38:12
问题 I'm having trouble with the on screen keyboard. I have an activity with an EditText which shows the keyboard, and a button to go to a second activity. The second activity shows a ProgressDialog on its onCreate() , does stuff, and dismisses the ProgressDialog . The problem is that while the ProgressDialog is displayed, so is the keyboard. I would like the keyboard to disappear before creating the ProgressDialog . I searched thorougly both StackOverflow and other sites, but nothing seems to

Hide Soft keyboard on return key press

吃可爱长大的小学妹 提交于 2019-12-20 11:50:58
问题 I've searched half a dozen other answers on SO, but haven't found one that works. All I'm trying to do is dismiss the soft keyboard when the user presses the enter button. (The equivalent of the insanely easy iOS 'resignKeyboard' call.) In the following code, the onEditorAction method does not get called. I've set up an EditText view in my XML file and the code in my fragment is as follows: @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle

how to call an activity when getting incoming call.

霸气de小男生 提交于 2019-12-20 10:57:33
问题 Hi all i want to invoke a my own activity over the default incoming call activity.. i have done this with using broadcast receivers i am invoking my activity when getting incoming call. but it is working fine for first time from second time when i get incoming call then default incoming call activity is coming over my activity . i don't know what is the problem can any one please help me .. Manifest: <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com

In Android Custom Keyboard, how to change Alphabets Keyboard to Symbols Keyboard?

天涯浪子 提交于 2019-12-20 03:50:11
问题 While Navigate User from Alphabets Keyboard to Symbols Keyboard, Layout Alignment gets spoiled. By Default, Layout takes 5dp padding & User can't see the Last Column Keys. Note: Images shown in below. I handled Key Actions to Navigate User from Alphabets Keyboard to Symbol Keyboard in the onKey Method override fun onKey(primaryCode: Int, keyCodes: IntArray?) { when (primaryCode) { KEYCODE_ALPHABETS -> { keyboardView?.keyboard = Keyboard(this, R.xml.keyboard) } KEYCODE_SYMBOLS_1 -> {

Softkeyboard not showing in AlertDialog for phone only

独自空忆成欢 提交于 2019-12-18 09:18:50
问题 Why the softkeyboard is showing only on the tablet is a mystery ! Here is the code that I have used. AlertDialog.Builder builder = new AlertDialog.Builder(CurrentActivityName.this); builder.setTitle(“Title”); builder.setMessage(“Message”); final EditText input = new EditText(CurrentActivityName.this); builder.setView(input); builder.setPositiveButton(R.string.allow, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { //my code } });

View-specific IME?

时间秒杀一切 提交于 2019-12-18 07:03:06
问题 I have a custom view for which I want the user to be able to enter characters from an app-defined set of characters. To do this, as I understand it, I need to write an input method service. The user not only needs to install it, but then needs to enable the IME in the Settings > Language & keyboard, and then select the custom IME for use in the view. This seems really crazy. I want this IME to be used for just one view in one application. I don't want it to be available system-wide or force

View-specific IME?

痞子三分冷 提交于 2019-12-18 07:02:16
问题 I have a custom view for which I want the user to be able to enter characters from an app-defined set of characters. To do this, as I understand it, I need to write an input method service. The user not only needs to install it, but then needs to enable the IME in the Settings > Language & keyboard, and then select the custom IME for use in the view. This seems really crazy. I want this IME to be used for just one view in one application. I don't want it to be available system-wide or force

Cannot resolve symbol showsoftinput

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-17 17:14:56
问题 I'm trying to force the numeric keypad to show when my activity and EditText load. It seems there's a pretty straightforward answer given here and elsewhere: you say EditText yourEditText= (EditText) findViewById(R.id.yourEditText); InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); imm.showSoftInput(yourEditText, InputMethodManager.SHOW_IMPLICIT); Fine then. So I do this and I include the imports: import android.content.Context; import android.os

when using AlertDialog.Builder with EditText, the Soft Keyboard doesn't pop

微笑、不失礼 提交于 2019-12-17 10:20:10
问题 I am using AlertDialog.Builder in order to create an input box, with EditText as the input method. Unfortunately, the Soft Keyboard doesn't pop, although the EditText is in focus, unless you explicitly touch it again. Is there a way to force it to pop? I've tried the following, after the (AlertDialog.Builder).show(); but for no avail. InputMethodManager mgr = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); mgr.showSoftInput(input, InputMethodManager.SHOW_FORCED); Anyone

How to download a file from a server and save it in specific folder in SD card in Android?

十年热恋 提交于 2019-12-17 07:13:41
问题 I have one requirement in my Android application. I need to download and save file in specific folder of SD card programmatically. I have developed source code, which is String DownloadUrl = "http://myexample.com/android/"; String fileName = "myclock_db.db"; DownloadDatabase(DownloadUrl,fileName); // and the method is public void DownloadDatabase(String DownloadUrl, String fileName) { try { File root = android.os.Environment.getExternalStorageDirectory(); File dir = new File(root