[Q] Painting multiline text on image - Android Q&A, Help & Troubleshooting

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.

Related

Text messaging area bigger

How do I/can I make the area where I type my text messages have more space? Right now I can see a couple incoming and outgoing messages and about 1 line worth to type my message - I could care less if I can't see any. I need more space to type my message!
darkerhelmet said:
How do I/can I make the area where I type my text messages have more space? Right now I can see a couple incoming and outgoing messages and about 1 line worth to type my message - I could care less if I can't see any. I need more space to type my message!
Click to expand...
Click to collapse
Are there ways to enlarge the sms typing area?
you can use the freeware "TOTAL COMMANDER" and edit the file thread_sms.html. You can do a search to easily find it...windows directory.
look for this part:
<inbox:content id="COMPOSESUBECT" width="98%" height=35 spell...
and play around with the number in height (in this case 35). change to 70 and get 3 lines for text replies. Just change the numbers and see what works for you.
*you need to soft reset after editing the file.
Source: http://forum.ppcgeeks.com/showthread.php?t=42141
not trying to high jake your thread but its kinda related to what i would like to know,.......
is their away to make the keyboard bigger ?
Followed TechButterfly's suggestion and got the two lines I really needed. Too bad this does not work like the Palm Pre, which dynamically adjust the height.
Didn't want to start a new thread. So I thought I'd ask my text related question here. Is there anyway to increase the amount of text viewable before they are like archived, and I have to click older in my threaded text box

Contacts - viewing and editing

Does anyone know if there is a tool available to view/edit contacts NOTES so that you see more than just one line at a time (esp when viewing).
If there is a large note attached to the contact it's very annoying when you can only see a line (or line and half in case of editing). Virtually impossible to find the information you are looking for.
When editing I find I can see one line and then bottom part of the line on top. If I try to scroll across the line at the top sometime dissappears because its virtually impossible to scroll by movinng your finger in a perfect horrizontal line.
Ideally I would like to be able to view an entire page of the NOTES field.

Bug in browser text areas

I found a very annoying bug in the stock browser (not present in Dolphin).
When writing in a big text area (such as the one to input this message) it happens that the text goes automatically to a new line when reaching the end of the screen, so you should able to see all the text.
This behavior is correct, but there's an ugly bug that causes the screen to automatically scroll right (as if the text was only in one line), so at a certain point I'm no more able to see the text I'm writing, because while the text is placed in a new line, the scroll forces me to view a blank area. There's definitely no way to disable this, and even if you scroll back to the area in which the text can be seen, when pressing the text area to write another word you are automatically scrolled back to the wrong position.
Do you experience this problem too?
[EDIT]
Ok actually this is a known bug in android, and this is the URL http://code.google.com/p/android/issues/detail?id=9828
Ever since i strted using dolphin hd, nevr used my stock browser

[Help] EditText in notification draw

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

[APP] Reader for Android Wear (standalone text viewer/ebook reader)

Though Reader has all the needed functions (view text, scroll, navigate, remember position, change font size), please note that this is one of the first versions early in development.
To view and start reading a file, transfer it from your phone by selecting Reader when opening txt file or sharing text content. Only the last received file is saved in Reader.
To change font size, use "pinch to zoom".
Large viewed file is split to multiple pages. Double tap when near the top or bottom of a page to move back/forward. Long tap to dictate page number using voice.
Possible use cases:
Actual standalone ebook reader (file size doesn't matter, sending 1 MB ebook is fine)
Cheat sheet (utilizing small font size)
Grocery list or other note (shared from phone note app)
Download (Free)
Are there any requirements for the text file?
Already sent 3 different files and none were displayed.
Dat0r said:
Are there any requirements for the text file?
Already sent 3 different files and none were displayed.
Click to expand...
Click to collapse
There aren't any special requirement except for just plain text in UTF-8. If you won't succeed, let me know the exact steps you took and file you used.
Any file I try fails. Even 1 letter UTF-8.
It must be something wrong with my phone. I think it does not send the file.
Samsung Gear Live + SGS2 CM11 with recent nightlies.
Dat0r said:
Any file I try fails. Even 1 letter UTF-8.
It must be something wrong with my phone. I think it does not send the file.
Samsung Gear Live + SGS2 CM11 with recent nightlies.
Click to expand...
Click to collapse
Because it's development version, I left some debug lines in the app. If you open any txt file in Reader on phone, it prints the content of the file to logcat so you can check this to verify whatever the file is read correctly before it's sent to watch.
Code:
12-31 18:36:21.608 7348-7348/? D/Reader﹕ onCreate
12-31 18:36:21.658 7348-7348/? D/Reader﹕ file:///storage/emulated/0/download/kun8.txt
12-31 18:36:21.658 7348-7348/? D/Reader﹕ Příliš žluťoučký kůň úpěl ďábelské ódy.
12-31 18:36:21.658 7348-7348/? D/Reader﹕ android.intent.action.VIEW
12-31 18:36:21.758 7348-7348/? D/Reader﹕ onConnected: null
The app is installed on watch, right?
I logged possible transfer on phone side using logcat.
Transfer failed.
Then I logged possible transfer on watch side.
Transfer succeded. And succeded only once.
Next logged transfer on watch side failed as usual.
Logs look pretty much the same. But when transfer succeded
reader launched and displayed text as expected.
Second time it didn't launch. When I launched it manually there was the information screen "To view..."
Procedure was the same all the time. Sending file to reader using totalcmd.
Do you need those log files ?
Great App!!
It will be nice to do that the text scroll with be with the watch movement
Amazing app.
I'm kinda new to android wear and using the LG G Watch.
Is there any way to make this app to evade going to idle mode without tapping the screen?
Thanks!
@moneytoo
We can chance pages with double tap but can we change pages with swipe? because if i want to change page i need to go bottom of the page and if didnt go and double tap the page, page is only going back not forward. Other that its good and useful.
Thanks.
There's still no Moon+ Reader for Android Wear but the are at least two more 'readers' on the Play Store you can check out if you're avid readers:
Wear Reader by Jacoh (free, for speed reading) and Wear Reader by Jajaz.org (paid).
@cataplof
This was one of my initial ideas. I realized that it might be too akward to scroll down I still intend to try that.
@NeoDaemon
The wear app timeout is 30 seconds. Do you need longer timeout because of reading or you want to just have a text visible for longer period of time without the need to relaunch Reader (cheat sheet/grocery list)?
@zhackary
I understand that some better navigation among pages would be useful. Initially I wanted a swipe but I was worried it would conflict with app dismissing swipe. So far I'm thinking of a progress bar for setting a page on second screen in Reader (accessible using swipe).
NeoDaemon said:
Amazing app.
I'm kinda new to android wear and using the LG G Watch.
Is there any way to make this app to evade going to idle mode without tapping the screen?
Thanks!
Click to expand...
Click to collapse
you can use StayLit Wear App (Paid) its working like charm with moto360 for this purpesses.
https://play.google.com/store/apps/details?id=com.phonephreak.extendedlight
But if you use LG G R i dont recommend too much.(Because of burning problem)
@NeoDaemon
The wear app timeout is 30 seconds. Do you need longer timeout because of reading or you want to just have a text visible for longer period of time without the need to relaunch Reader (cheat sheet/grocery list)?
Click to expand...
Click to collapse
The second option i think, longer timeouts would be very useful. 1min 2min 5min 10min, for example.
Thanks!
NeoDaemon said:
The second option i think, longer timeouts would be very useful. 1min 2min 5min 10min, for example.
Thanks!
Click to expand...
Click to collapse
Hey guys, loving this app (as its the only reader I can really find), but I guess what I'm looking for is something more along the lines of a Spritz-based reader - I would think that one word at a time would lend itself well to a watchface. Anybody have any ideas?
Just to give you an idea of the kind of reader I'm talking about, I use Balto Speed Reader on my Nexus 6, which you can find here on the Play Store: https://play.google.com/store/apps/details?id=balto.wolf.speedreading&hl=en
uberSkeptic said:
Hey guys, loving this app (as its the only reader I can really find), but I guess what I'm looking for is something more along the lines of a Spritz-based reader - I would think that one word at a time would lend itself well to a watchface. Anybody have any ideas?
Just to give you an idea of the kind of reader I'm talking about, I use Balto Speed Reader on my Nexus 6, which you can find here on the Play Store: https://play.google.com/store/apps/details?id=balto.wolf.speedreading&hl=en
Click to expand...
Click to collapse
http://forum.xda-developers.com/showpost.php?p=58435824&postcount=10
Brilliant! Many thanks!
Finally!
Thank you...I love this app!
Hello.
I love your app.
Do you mind adding some options like changing font color & background color?
It would be great because for cheat sheet white font is a bit too much visible.
Anyway great job.
issues on moto 360
Hello
Since the last update can't view anything, only shows a back screen and a scroll bar in the middle of the watch, so? How can solve that
I use a moto 360 5.0.2 and a moto g 2013 4.4.4
I transfer a small text in utf8 and the same issue.
Where will the file go after transmit?
Is it stored in the android wear?
How can I remove those files?
SurvivorC said:
Where will the file go after transmit?
Is it stored in the android wear?
How can I remove those files?
Click to expand...
Click to collapse
Start with long tap in Reader...

Categories

Resources