[Help] EditText in notification draw - Android Q&A, Help & Troubleshooting

I'm trying to put a edittext box in the notification draw, so far it displays fine but I cannot interact with it e.g. click inside and start typing. I've out my XML code inside status_bar_expanded.xml. Like I said, it displays fine but is unusable.
Thanks for any help

Related

Replacing Text Editing bounding arrows?

Hi guys,
I find the Editing text bounding arrows frustrating to use on Galaxy SII (press hold on text until those orange arrows are shown). Most of the times its impossible to precisely drag the handle very you want, further more you have to be very accurate on where on the arrows you put your finger otherwise it won't move, basically its a hit and miss situation most of the times.
On HTC, its incredibly easy, once the equivalent of arrows (circle type handles) are shown, dragging them is super fast and easy and you have magnifying glass showing exactly where you'll land.
is there a way to replace the way Galaxy sII drag and drop editing action is done with that of HTC or is there a way to improve it?
+1 for this

[Q] Painting multiline text on image

Hi,
I'm trying to develop a simple application to add a caption into a image, but I have a problem that I've no idea how to solve it.
The app is simple: I click on a TextView, an AlertDialog pops-up with a EditText, I insert some text, click at "ok" and it sets that text as the textview.
Then comes my problem: I click on a save button and it saves the image with that caption on my sd card. If it's a short text, everything's fine, but on text's that have more than one line it shows everything on only one line. So, if it's a long text, instead of breaking it according to the image's width and continuing into a new line, it just keeps going off the screen.
I'm using canvas.drawText to do it, but it doesn't support line breaks so I'm pretty lost about this.
Is there another way to do this that supports line break? Or a way to break the string into a new line and then use drawText?
I found a simple solution.
Instead of drawing the text on the image, I just drawed the view. I got almost the same result and in a simple way!:laugh:
displaying it as a view is a great idea, but I would suggest one more thing - you can measure the text and draw it in next lines.

[Q] Disable ScrollView scrolling in EditText.

So I was able to solve the last 2 problems I had without help, but I'll try once more for this problem:
I have an EditText inside a ScrollView. However, I want to ScrollView to stop working when an external keyboard is attached, so that the keyboard would do all the scrolling. Apparently, however, that's not as easy as it seems.
I already ran a proper setOnTouchListener to disable gesture scrolling; however, if I hold the DOWN arrow until the cursor is below the screen, the ScrollView scrolls my EditText before I get the OnKeyUp signal to do it myself. Is there a way to stop it from doing that?
Thanks.

Get text from external keyboard connected to tablet

Hi,
I want to get some text from a keyboard connected to a tablet but I don't want to use an EditText.
With the following event I can handle keys like enter, space-bar, return, arrows but not characters like 'a','b', etc...
public boolean dispatchKeyEvent(KeyEvent e) {
Log.d("KEYBOARD",e.toString());
return true;
};
I need to wait for the user to input some text but I want it invisible to the user. I open a msgbox, ask for some text and only after manage the text I show it to the user. Basically I need some event like the one above but for all keys.
Thanks

How to get key/motion input on an overlay view and not break games?

Hi all. So I have a problem I just can't seem to be able to fix.
I have an overlay view that I draw on top of other apps that I start in a service in order to get KeyEvents and MotionEvents from my bluetooth input device and based on the motion or key press, I want to generate a touch. (I already have an AccessibilityService for this and it works as long as my overlay view is not touchable)
In order to get the inputs I have to have the view focusable and in order to simulate touches it has to be not touchable.
This is how I add my view:
HTML:
final WindowManager.LayoutParams overlayParams = new WindowManager.LayoutParams(
WindowManager.LayoutParams.WRAP_CONTENT,
WindowManager.LayoutParams.WRAP_CONTENT,
WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY,
WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE,
PixelFormat.TRANSLUCENT);
The problem I noticed is that having the view basically focusable, breaks games. They either just show blank or freeze at the starting logo screen or such.
Any idea how I can get the input from my device and not break games?
I did try to get them in AccessibilitySystem, and while I can get KeyEvents, I didn't find a way to also get MotionEvents...
Any ideas are welcomed.
Thank you.

Categories

Resources