I have simple custom view with EditText and the copy/paste popup is not showing on Oreo. It is working on Android 7, it is even working on my Emulator running Android 8 Oreo, but it is not working on real device with Android Oreo (Google Pixel, Nexus 5X). When I long press on my custom view with EditText, the popup menu with copy/paste options is not displayed at all on real device (again, it is working on Android 7 and lower and on Emulator running Oreo). But when I fill some text in the EditText, and then do a long press, the copy/paste popup show up even on Oreo on my device.
Really weird behaviour. I copied all my logic in my custom view so just the simple EditText is there and still no result. I think that maybe it is about new auto fill feature that breaks it down?
So I found that the problem is, when the EditText has set negative side margin.
Sample layout that is not showing copy/paste popup on Android Oreo (real device only):
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="-4dp"
android:layout_marginRight="-4dp"/>
I created new issue: https://issuetracker.google.com/issues/65575880
If you have any method like this in your Application, please rename it.
protected int getUserId() {
return getCurrentUserRepository().getId();
}
Related
I've been thrown into trying to fix bugs in an app I didn't write, and I'm not all that familiar with Android. I'm having problems with text boxes not updating with keyboard inputs. Here's whats happening:
In android 10 (only) when I click on a text box, type stuff with the soft keyboard, nothing shows up in the textbox until the soft key board is minimized. But it works 100% fine in Android 5.1, 6, 8.1. (Also, compiling app with SDK for Android 8.1 or 10 makes no difference). The text box is never covered or hidden by the keyboard, it just remains empty until the keyboard is minimized.
The only thing that works is if I make the keyboard floating type, or if I position the textbox way at the top of the layout such that Android does not need to pan or resize the view to accommodate both the box and the default keyboard. A floating keyboard works anywhere, even partially over top of this text box.
I have tried every possible parameter combination I can find in the manifest and layout xml files, including android:windowSoftInputMode , android:fitsSystemWindows , android:isScrollContainer , android:gravity , android:paddingBottomandroid:configChanges
The fact this is -only- an issue for Android 10 is suspicious.
For anyone that finds this in the future: the issue turned out to be that hardware acceleration needed to be turned on. See EditText in Android doesn't show text when typing while using the on-screen keyboard
I've just had a customer deliver me a test phone to deploy my app on. This is a ZTE R84 which runs Google Android v5.0.2. Only on this device and OS I am experiencing an issue with TextFields in Tableviews.
Basically when I have the Keyboard type set to DEFAULT and try to edit the text in the field on this device, the field loses focus immediately. If I set the keyboard type to Titanium.UI.KEYBOARD_TYPE_NUMBER_PAD, it works as expected.
If I take the field outside of the TableView, then I have no problem whatsoever.
Open to suggestions about how I fix this one, other than sending the phone back to my customer...
I believe you can get rid of this issue by setting windowSoftInputMode property of that window which contains the tableview to Ti.UI.Android.SOFT_INPUT_ADJUST_PAN
"Window" : {
windowSoftInputMode : Ti.UI.Android.SOFT_INPUT_ADJUST_PAN
}
So I want to have a keyboard in my app that has emoji just like Whatsapp or Hangouts. How can I do that? I want to leave my key keyboard as it is I just want to add tabs to put emojis. I would think it would be easily supported by the soft keyboard but I can find nothing so far. Anyone could tell how to do it?
UPDATE:
The keyboard with emoji is included in Android KitKat and can be accessed by long pressing the new line button in the keyboard. The Hangouts keyboard however has the emoji icon visible instead of the "new line" key. If someone knows how to make this the default (either in layout or programmatically) I will take that as the correct answer.
As #dbar pointed out, the answer is:
android:inputType="textShortMessage"
But in my case, I was already using textMultiLine, so I had to use the both of them together:
android:inputType="textMultiLine|textShortMessage"
Looks like this:
I'm not sure about the Exact android version, but this should work only on Android 4.1 and above
Finally the answer was:
android:inputType="textShortMessage"
The new line key becomes a key to take out the emoji keyboard. The only quibble is the 'new line' key from the keyboard disappears with this configuration (before you could long press to choose between emoji/new line but now it's only emoji).
In Google Hangout, the emoji button is not on the keyboard (at least on my phone which is already using a third party keyboard), it's inside of the TextEdit box, and so it's part of the application itself (Gabe, I'm talking about the latest Google Hangout on top of KitKat with emoji support, all the current screenshots I found of Google Hangout do not show what I'm seeing on my phone, so this must be a very recent feature).
This is actually pretty easy to do, placing an ImageButton to the right of a TextView inside a RelativeLayout (the RelativeLayout which is made to look like a TextView with a custom background).
Then, it's just a matter of hiding the keyboard when clicking on that ImageButton and replacing it with a panel full of emojis when that happens (like in this open source emoji android keyboard, which is under a creative commons non-commercial license).
There is no functionality to add tabs to any generic keyboard. Certain keyboards may support it, but it isn't a common feature. You could write your own fully custom keyboard, but that's a lot of work and will piss off many users.
Also, I'm not sure what you mean about by like in hangouts. I use hangouts- it doesn't do anything odd with my keyboard. It stays as Swype, there's no special emoji tab. It may be a feature of your favorite keyboard based on the input type (I assume both use input type textShortMessage). But it isn't a generic feature.
I am developing a keyboard based on android LatinIME, the problem is that I cannot click on anything behind InputView. (In android keyboard this view is visible and clickable through when doing google search for example).
To be precise this is the view that can be clicked through in original keyboard from input-view.xml
<View
android:id="#+id/key_preview_backing"
android:layout_width="match_parent"
android:layout_height="#dimen/key_preview_backing_height" />
I turned on visual debug by setting sVISUALDEBUG in LatinIMELogger.java to true so I can see these are in transparent red.
Any possible suggestion about what can be broken so it works this way?
I resolved this issue. The problem was that in compatibility.InputMethodService.Insets in android 2.1 doesn't support TOUCHABLE_INSETS_REGION constant, so I had to changed it TOUCHABLE_INSETS_VISIBLE to enable clicking through invisible views of my keyboard (i.e. SuggestionsView)
As a noob I wrote an app with lots of layout screens and it worked OK in emulation but when I ran it on my Droid Incredible the soft keyboard popping up changed the layout of a LinearLayout I was using - shoving some elements aside and changing the height of others! I fixed it by adding android:windowSoftInputMode="adjustPanā€¯ to the Activity element of the manifest but I really would have preferred to discover this problem in emulation and not on a real phone.
So, is there a popup soft keyboard in the Emulator and if so how do I invoke it?
yes there is, you only need to click on an EditText box with your mouse and it will open.
Yes, of course. You can go to the emulator's edit page, do not choose the "Use handware keyboard".