Custom ActionMode for TextView doesn't work on all devices - android

I implemented a TextView with a custom ActionMode.Callback, where I add an item to the menu if certain criteria is met. This works like a charm on most devices (N4, N7, GS4) but now I noticed that it doesn't work on The LG G2. I don't have other devices to test it on, but LG has implemented the default TextView- ActionMode in a way that the menu is not shown in the actionbar, but on top of the selected text (much like it happens on iOS afaik) and I'm wondering whether somebody else had this experience and how I could solve it?
(Maybe it would also help to let me know of other apps that use a custom TextView action mode, so I can check, whether they work properly on this device, I couldn't think of one yet...)
Thanks,
j

I found several other posts about the same behavior on HTC (sense) devices, and there was not a solution which somehow forces those stupid custom android versions to behave the way it's supposed to...
So I ended up adding the functionality in another way :(

Related

Hide navigation bar on rooted android device

I have a custom rooted android tablet working on Android M version. We built a kiosk application and next step is removing navigation bar completely, while our application is working. Also, when administrator close our application, navigation bar should appear again.
Before asking this question, I researched on Internet and find a lot of people have this problem. However, answers to theirs question were generally, making application to work in full-screen mode or in immersive full-screen mode.
These answers didn't help me at all, because user still can fling on screen and navigation bar would show again. These solutions are probably the best that can be done with an unrooted device, but in my case I need a better solution and my device is rooted.
Also, I saw this answer link, but after using this command my desktop went black, and couldn't reboot android system again. Happily I have recovery USB so my device is working again. :)
I found another answer link, and like others, didn't help me because I need to reboot system after adding line of code (qemu.hw.mainkeys = 1). Also, solution that I looking for is fully dynamical and done by code.
I am really convinced that this isn't mission impossible, because we had old tablet (also rooted) with button in back, which can hide and show navigation bar without rebooting it.
Any help is appreciated.
I can't help you with your problem, but provide a little more information.
The company im working for is using devices in kiosk mode, but we have custom android devices from a hardware producer, which provides a custom HAL interface. We can set the kiosk mode via that interface.
My guess is it cant be done easily, if it was easy, we would have not gone that way. Hope it helps.

How to make an editable/typeable widget (like the Google Now search box)?

My first guess was to try EditText but it's not available for an AppWidget.
I did some research and found out that it's only possible on some selected HTC devices and that is not the solution I seek.
However I can see just the behaviour I want in the Google Now search widget - I tap on it and a keyboard appears. I can't seem to do it though.
Is there a way to do that? Or is it just reserved for Google-stuff and a couple devices which have such a mechanism implemented?

Immersive like feature in JB and ICS

I am developing an Application where I need to go completely full screen. In kitkat its very easy by using Immersive tag. But since not all devices support kitkat I need to take JB and ICS (atleast) into consideration.
Well although there is a way of hiding navigation bar and status bar in JB and ICS it becomes visible as soon as the user interacts. This certainly does not looks good. It also takes one extra touch.
I did a lot of searching on net and was surprised that there is no way we can achieve it. I was hoping to find some trick or hack but nothing.
I am pretty sure that before kitkat came there were games which used full screen so I guess there should be a way (like Temple Run and Andgry Birds). Can some one please guide me in correct direction.
P.S: I am looking solution for devices which are not rooted.
Thanks :)
Use a full screen theme, or set it from code as described here https://developer.android.com/training/system-ui/status.html
As I already pointed out in the comments, this will give you full screen. Not the immersive mode as seen on KitKat where the user can easily unhide the status bar. If you're going with the theme approach it's probably best to set a not full screen theme on API19+ (KitKat) and tell it to use Immersive mode from there on.

how to avoid dialog skinning for certain android roms

In my app I have a custom dialog that works great on my stock gingerbread rom. I checked my app out on my friend's Atrix, and there is this extra border that looks to be consistent with the rest of the ui (sorry, dont have an Atrix here to test it out). The same thing happens when i use my app on a Droid 1 with stock froyo (theres a thicker, grey border). Is there a way to get rid of this?
The only way to get rid of it is by overriding all the styles used in a dialog. Most of the time this is not necessary... a dialog on the Atrix will look like every other dialog on the Atrix, so the user doesn't really notice the difference. If you need a specific look to match your app, however, you need to style it.

Different keyboard layouts in Android

I just took a look on different devices and their soft keyboards. They are all looking a bit different. I attach two screenshots. One is from my HTC Desire (Android 2.2), another one from Emulator (Android 2.3).
As you can see on the device the enter key is on device just a symbol, on emulator it is "send".
Can I change it somehow?
I had this problem a year ago, my problem was that the numeric keypad is very different from each provider (not only on style but on the buttons that are shown)
In my personal experience is a pain to try to change that, you would need to create your own SoftKeyboard class with your own images.
If it's not an important issue I recommend to just pass over it, or find a keyboard type that satisfies your needs.
However, I don't know if in the newest versions of Android you get an easier way to customize keyboards.
Good luck on there :)

Categories

Resources