I am working on an open source project and I am kind of stumped. Whenever the titles are being displayed in another language the titles begin to be cut off as you can see in the attached picture. Has anyone experience similar problems, and how would.you fix it?
you can see how some items are getting cut off
It seems that the problem is the size of the text, whenever it's too big the view get messed up. Maybe you can limit the text to two lines if you are able too and use ellipsize to add the dots at the end.
Related
I have developed an app using codename one.I have made registration form which having six textfield and a button.After focusing first textfield keyboard appears on screen then textfield size and formatting changes.I have attached screenshot.It was working fine but since 2 -3 days after updating libraries at the time of build those issues came in place.
Textfield size and formatting should remain original after keyboard appears.
Please help me to solve this issue???
A text field must be within a scrollable Y container otherwise you will experience undefined behavior that might work on some cases but fail on others. We need the scrollability so we can give room for the keyboard and resize the components.
It's possible that theming changes discussed here impacted your UI making it larger and effectively forcing this. Regardless of that the solution is still adding scrollablity.
I have seen some apps for which push notifications only display the app icon on the left and the message content on the right, with no title nor time. Also the message content takes the entire space and can occupy up to 3 lines.
.
When I don't supply any title nor text, my message still appears below where the title and time should be. It can only occupy one line and ends up showing only the beginning, with some ellipsis at the end.
I already looked at BigView and BigTextStyle, but it doesn't look like it's what I want, as even if I don't supply a title nor time, the notification message doesn't move up. Also I don't want the user to have to expand the notification to see the whole text.
Is there any simple way to achieve what I want? Or do I have to create a custom layout? I'm using Phonegap and have very limited Android knowledge.
Here is the code I'm currently using: https://github.com/phonegap-build/PushPlugin/blob/master/src/android/com/plugin/gcm/GCMIntentService.java (see the createNotification method).
I wasn't able to find any easy way to do that, like tweaking existing objects. I guess it always requires creating a CustomNotification, which I did: I created a RemoteViews to display things exactly the way I wanted.
I have a following issue with laying out text on Android. I'm basically trying to have two lines of text with minimal spacing and each should be styled differently. I've had quite good working solution with two singlelined TextViews one placed below the other, but I've been still getting a little bit cropped text on certain devices..
So I decided to switch to just one TextView an use Spannables instead which should be generally a better solution in all circumstances.
That means I needed to remove the single line property from my TextView -> in order to be able to wrap the line before starting the second Spannable..But there is an issue when is the text displayed at the first line actually longer than it..TextView wraps Automaticaly which is an unwanted behavior. Below you can see several screenshots, which should you better tell what I'm trying to achieve and where I'm now.
The first image shows new layout with spannables and you can see there the wrapped line as well.
The second image is the initial version of the layout woth two textviews layed out verically in a LinearLayout.
There is also a problem it's actually an appwidget, that means I do not have an access to that textview instance directly. I have been thinking about ditching textviews at all and instead use just ImageView and render all manually on canvas..That seems like an overkill to me, so I'm looking for a better solution. Unfortunately I'm kind of out of ideas and knowledge:)
Thank you
If you want to prevent a multi-word string from wrapping, you can replace the spaces with non-breaking spaces ('\u00A0'). TextView treats these as word characters, but renders them as spaces.
I have used this forum when I didn't know how to do something, but now I have decided to begin participating in it.
I would like to know how could I do a dropdown text (maybe it has a specific name and that's why I don't find any results on the internet). I mean, I have some tags in the screen (About, Company, Contact, ...). Each of these tags has a down arrow on the right side, and when I click it, it has to display (and hide if it's clicked again).
Here are the links with the images of what I want to do.
http://i45.tinypic.com/4fzoso.png
http://i47.tinypic.com/2u5886q.png
Thank you in advance!
You should use an ExpandableListView component.
There is a tutorial for it here.
Finally I did it with ImageViews and TextViews using the property android:visibility. Now that it's a static version is working properly. I hope that it continues working well when taking the information from the DB
I'm working on an 'IDE' for Android - it could be useful for editing short scripts / making quick adjustments to files. At the moment I'm just using a simple EditText, but I am wanting to add several features, for example Line Numbering down the left hand side of the EditText and Code Highlighting.
Does anyone have any suggestions about how to approach this? For the code highlighting, I'm guessing I'll need to write my own subclass of EditText. For the line numbering, could I have a thin vertical TextView that has the same text size as the EditText??
Yes, I'm aware editing code on a mobile sized screen is painful.
Thanks!
The stock Email application uses an html view (android.webkit.WebView) to wrap even text emails in html. Perhaps rendering the code into html and displaying in a WebView would be a good way to get syntax highlighting.
For line numbering, the thin TextView beside the EditText seems reasonable. You might want to encapsulate it into your own View class that handles both subviews - and allows line numbers to be turned on and off (and perhaps does other good things like keep text size of both equal)
I think an ide for Android is a good idea. Would be nice to be able to code on an airplane without having to get the tray table involved =)