How to type something else rather than what is typed in EditText in Android - android-edittext

I want to make one application in android where the user is typing in EditText.
But the user does not see what is actualy getting typed, rather it sees a different text in that EditText.

It would be great if you could elaborate on the realtime usage.
However if you want to mask the input, you can use android:inputType="textPassword" in the EditText.
Alternately, you can capture the input using setOnKeyListener and set the value accordingly.

Related

Cognos Report Studio Text box prompt not function proporly

I use conditional block to show different text box prompt when user choose different filter in my first prompt page. Now, I set the text box with same setting(no required, multi-select:yes, multi-line:yes, other are no) and similar filter script in my queries. However, when I run the report, I can't get the same output. My first text box miss right half of text space. How can I fix it? Thanks!
Click here for the first screen shot.
Click here for the second screen shot.
A sample report spec would be helpful but based on the screen shot, one of two things is happening:
The first prompt does not actually have the multi-select option set.
OR
The filter item in the actual query that the first prompt is populating is not multi-select friendly.
An example of #2 would be if you tried to set enable multi-select values but then the filter it is populating into is set to something like:
[table].[field] = ?firstPrompt?
Instead of:
[table].[field] in (?firstPrompt?)
If this isn't the case, definitely edit in a simple sample report specification so we can see more of what you're doing.

Delphi - Activating the Hint from another control of Application

I'm trying to activate Hint from control of different application created from delphi upon focus, I'm using hook to identify the focused control, and then use WM_MOUSEMOVE, which I think will activate the Hint of that control, the handle would be the Control itself and the lParam is the Left and Top of the Control. The Control activate the OnMouseMove Event, but the Hint never shows. but when I use SetCursorPos, Hint show, but I need to show the Hint with out the cursor move on that Control. Can you please help me with this? Thank you in advance... by the way I'm using Delphi XE4
Among the really asked question is how to show the hint of a control that resides on another application (i am afraid without hook that application can not be done), the title is "Delphi - Activating the Hint from another control of Application".
First is first: That can be done without knowing what language the other app was done, but it is very complex to put it here (and i am not an expert on such way of coding, also i hate apps that work that way).
Second: The main idea is to hook the other application, search on Google some code of that apps, that can show you a rectangular hole square of the object the mouse is passing over, that application while doing it is iconized (i do not remember the name of it).
Waht such app does: As you move the mouse over the screen it overlays a rectangular over the control that mouse is over, then if you press the key to print screen, that small region is the only thing that goes to clipboard; on of such apps i saw had an extra funcion, they can move such controls if you press cursors on keyboard, also can hide/enable/disable such control... more, it can also make controls that are invisible to be visible, etc... i saw it working on my computer, and hey, for fun it is pretty and to DeBug or get extra things on some apps is also great (make some menĂºs to be visible and enabled and then can use such funtions).
Please, please, understand i am agaist piracy and also against using such apps to let code to be run... some apps need pay for letting some menus enabled, but they have the code there, no need to change EXE to have/use that menus; just using this kind of apps makes that limited apps to be unlimited (just enable or show hidden menus and voila).
Note: To unhide menus, mouse point is not needed to be over the app, can be anywhere and is not moved.
The idea i want to say is: Any app can move, alter any control on any other app (at least on Windows) that is running, so maybe there can be a way to show such hint.
In the past i had use such app (sorry i do not remember the name) for DeBug my own apps, so i do not need to recompile in such cases where something was wrongly hidden, also work with buttons, labels, texts, combos, memos, etc.
Now my small problem is: I just need exactly what title say, but i can not make it to work.
Must be:
Mouse position must be irrelevant (it also must be able to be outside the application)
Just when a button that has focus is pressed with keyboard (Space or Enter) or just after some code somewhere on my application, i want to show the Hint of a specific TEdit for a short period of time.
I did not get Hint to be shown; not unless mouse point is over such TEdit but i want/need mouse pointer to not be over it, neither it to jump to the TEdit.
Idea Conept for that Hint to be shown: After doing some code that changes something, show extra info associated.
Example:
A button with that loads a file using an open dialog, filename is put on a ReadOnly TEdit (so it let user copy the text, but not change it); i want extra info that i punt on .Hint of such TEdit to be shown inmediatly.
That hint use is for not overload window with a lot of fields (TLabels) for showing such file data.
Simple idea: such Hint shows TimeStamp and size of the selected file.
P.D.: Not much related (since i am trying with a normal plain text hint), but hints can also store a full HTML page and with 3rd party tools be shown as an HTMLhint, so they can show a lot info of that file (also its content, etc) in a web based format; as i say i first try with standard plain text hints.
In order to show hint programatically you need to call TApplications ActivateHint method to which you specify the position parameter.
http://docwiki.embarcadero.com/Libraries/XE3/en/Vcl.Forms.TApplication.ActivateHint
Based on position parameter Application automatically finds which controll is at that position and shows its hint.
NOTE: Position parameter screen coordinates in pixels and not your controll coordinates. So you will have to use ClientToScreen method to change your coordinates apropriately.
You can see simple example of how to use this here: https://stackoverflow.com/a/15031208/3636228
Now if you need to do this from another application then you will have to add some comunication mechanizm to these two application so that one could send a proper message to tell the other to show the hint at specific position. But this does require you to be able to change both applications.
EDIT: This works with VCL applications but I'm not sure if it would work with FireMonkey applications.

Blackberry input field that mimics the input field of Android

I'm trying to make a login screen for Blackberry with input fields for username and password that look like the the editText field of android. Basically, there should be a well defined background and default prompt text in a different color when no text has been input. Unfortunately, I couldn't find a default field provided by blackberry. I'm currently using an EditField and a PasswordEditField with BorderFactory to provide the demarcation. Is anyone aware of such libraries or some other open source efforts by someone to do so? Please point me to any tutorial, etc too.
Thanks!
You will need to write your own custom field which extends EditField.
http://docs.blackberry.com/en/developers/deliverables/11958/Create_a_custom_field_508117_11.jsp
My suggestions are:
Override the Field.paint() method to place the label inside the text box (rather than to the left of it which is the default behaviour). This is where your instruction to the user can go, ie the 'Username' or 'Password' text.
Override the Field.onFocus() method to remove the instruction from the text box. Conversely override the Field.onUnfocus() method to add it back in if the user moves to another text box without entering any text.

J2me Blackberry Numeric Input

I am developing a blackberry application using j2me and LWUIT (blackberry port). Everything works great except for the TextField in numeric mode. Basically when you have focus on the TextField you have to first go into "NUMERIC" mode (by pressing alt + aA) in order to input, which is not user friendly and a problem.
The proposed solution is to use a TextArea instead that allows you to open a NATIVE type input box. The problem there is that the user needs to focus the field and then press the fire button which again is unfriendly.
Does anyone know of any simple solutions?
The few solutions i have in mind (but not sure how to do them):
1) Capture any keypress on the TextArea and go into NATIVE mode, instead of just the fire key.
2) Put the blackberry input mode into numeric using code for the whole form.
Any advice will be appreciated.
Many Thanks,
Paul
I'm not sure whether this solution is one that would appeal to your needs or not, but you could add j2me onKeyPress handling that "translates" the letter keypresses into the numbers that correspond to the same key and adds the "correct" number to the textfield instead of what the user actually pressed. Do keep in mind that such a solution would require you to worry portability issues as far as not all blackberry models using the same keyboard layout (qwerty vs. reduced qwerty for example) and handling the variation in layouts sufficiently.
Okay well to answer my own question.
I overrided the keyRelease method on a TextArea. And in this method if the keypress is not an arrow key i the call editString method (this causes the native textfield to open). The only downside to this is that it will always miss the first keypress in the text box.

How can I show the numeric virtual keyboard on the Blackberry Storm?

I'm having some difficulty showing the virtual keyboard I want for the Blackberry Storm. I have an option to toggle the keyboard's visibility on a certain screen. Whenever the user types a number, it's handled by the screen, rather than any particular field (there are no textfields on this screen). This much works fine. I can show and hide the keyboard when the user chooses to.
My question is this: How do I make the keyboard that shows up the same as what would appear had the focus been on a BasicEditField with a numeric filter applied, without using a BasicEditField for the input?
I don't think BlackBerry has exposed any APIs to allow for programmatic control over the type of virtual keyboard that is shown. I seem to remember reading about it in the BB forums (although unfortunately I can't find it now).
One thing you could try doing is using a BasicEditField with a numeric field, but place it offscreen so that it isn't visible. When you want to capture numeric input from the user, put focus on that element. I haven't tried this, it's just a thought.

Resources