I'm looking for a possibility to customize my keyboard-keys. In the following picture you can see the result i'd like to reach:
keyboard-key result
Optional: When I multitap on a key, the keyPreview should step through the list of characters of this key (nice to have).
Problem:
If I use the label-attribute of a key, the text of the label only appears in the center of a key. But I need to put the A in the top-left-corner, the B to top-middle, etc.). I also tried the keyIcon-Attribute, but then the keyPreview showed only the keyIcon, and not each character, when I multi-tap on the button.
Currently I'm 'designing' my keyboard with <Keyboard ..><Row ..><Key /></Row></Keyboard>-XML, not with a LinearLayout or a similar layout. Maybe I need to switch to a LinearLayout?
Any ideas?
Related
I downloaded a code and the source is written in this format:
<android.support.design.widget.TextInputEditText/>
instead of:
<EditText/>
I tested both of them and i didn't see the difference, so I want to know if there's a difference between these two ways of declaring a widget in Android.
<android.support.design.widget.TextInputEditText/>
Creates a Field with an EditText with more functions like show the placeholder up the edit text when you're typing in.
https://gyazo.com/844d6c0fe8aace1ef671859823d39a58
https://gyazo.com/bf891de7807955e76bf487e3a07a6317
Only difference is: in landscape mode you can see the hint in TextInputEditText1, whereas you can't see in EditText.
I have a simple TextView, where I put a string like that: "Curăță corect urechile copilașului tău!". But I see the string on display like this "Cură ă corect urechile copilașului tău!" - just space between chars, where must be a "ț" symbol.
I checked the string in TextView by TextView.getText(), and I get my original string.
This is a screenshot, also the same problem in first title:
Try to set text in TextView using HTML. I hope this will work and may help you out.
myTextView.setText(Html.fromHtml("your_string"));
There is still space for the letters, so perhaps it's an issue with the styling.
Change the style to default, do the letters show up?
Try adding a shadow to the textviews and see if the shadow exists (maybe the letters are somehow transparent, or the same color as the background?)
It is more related to a font issue, default Android font doesn't support some characters. You need to try from a different font.
You can try from the following (but I think its not free)
http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=FontDownloads
I have an Edit text field and set his inputType to "textPassword".
The default view shows little dot icons. I would like to increase their size. I assume that there's no "largeTextPassword" option and you should set this up yourself.
I made a new large dot icon and would like to place it in instead of the regular one. Now I use the setText() method to insert the text into it. How do I combine between those values?
I'v tried to increase the textSize but the padding drove me crazy on different screen sizes.
I'v tried to use the setCompoundDrawablesWithIntrinsicBounds(R.drawable.dot, 0, 0, 0) method but still, I'm not sure this the right way.
If someone can shed some light on this would be great.
Don't use android:inputType="textPassword" because this will replace the characters with the default dot character.
Add a TextWatcher and, as the user types, store/append the new character in/to a String and replace that character in the EditText with an ImageSpan of your own.
I am creating an app in android and I am parsing text. After I parse the text, the text appears fine. However, I don't want all of the text to appear (i.e. all lines to appear together).
Example -
Text that appears in app:
A Turing machine is a device that manipulates symbols on a strip of tape according to a table of rules.
What I want to show:
A Turing machine is a device that manipulates [more...].
So when the user taps on the [more...], the rest of the text will appear in a new window.
How do I incorporate the "[more...]" part?
Thanks =)
declare in your text view properties in the layout file
android:ellipsize="true"
that should do it.
use android:singleLine = "true" and
fix the width of your textview like android:layout_width = "150dp", then append [more...] at the end of text and make it as link, which should be clickable
Refer to this, to do what you want...
I am using and EditText to display my app's EULA. The EditText is marked singleLine=false and enabled = false.
When I ev.setText='....', the text appears slightly shifted 1 and 1/2 characters to the left plus down 1 and 1/2 lines. That is, the text is not registered/displayed properly to the top left corner. Any ideas?
Why an EditText? Seems like a TextView would be the more proper vehicle to display that.
As for the text position, it sounds like you have padding (or margins, or both) specified in the XML.
The following code works:
myEtLoginEula.setEnabled(false);
myEtLoginEula.setVisibility(View.VISIBLE);
myEtLoginEula.setText(myJS.getString("EULAText").replace("<br>","\n") + "\n");
myEtLoginEula.setScroller(new Scroller(getBaseContext()));
myEtLoginEula.setVerticalScrollBarEnabled(true);
myEtLoginEula.setMovementMethod(new ScrollingMovementMethod());
I was previously setting the text, .setText(myJS...) after the .setMovementMethod. It does not like that. I had originally obtained all this months back from another SO question regarding scrolling. Seems to work now. I will revisit TextViewinstead of EditTextas well. Thanks for your patience as I am newbie to SO responding!