Dennis Smith V

Greenhorn
+ Follow
since Jul 10, 2010
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Dennis Smith V

So iText totally works. Problem being its GNU licensed, meaning they could try to get the source code for my web app. Hell I'd be happy to just pay for the thing but they don't even have prices on thier website. You know the old saying if you have to ask how much something is, you cannot afford it.
14 years ago
So I'm trying to put a barcode into a PDF. So far it "kinda" works. I'm using zxing and pdfbox.

This places a barcode on the PDF, but it the barcode looks more like a maze. It's not filled in correct. I've saved the image alone and it looks fine.

Anyone do this? I would prefer *not* to have to make this a 2 step process.. ie make the image save it on the file system, then insert it into a pdf. I'd be open to using a different PDF generation lib (not GNU) if someone knows a better one.

Thank you for any assistance.



14 years ago
Thanks Ulf, the Painless threading link was helpful to me. Looks like I was doing it the painful way
14 years ago
BTW I did this and came up with with a very nice reusable abstract Activity. onRightSwipe, onLeftSwipe and some abstract methods that will be called with in a separate thread to deal with loading dialogs. In the process I cut the code on my main activity in 1/2.
14 years ago
Thanks for the input Ulf. But in this case, I'm only handling one view. It's just a view that allows users to move from image to image using swipes, it loads images via text input or voice input, if the user likes the image they can long press the image and it will set as a wall paper. (of course with a prompt)

I've had the night to think about it, and I could throw some of this into an abstract class and that would be clean a reusable. Something like an abstract swipe activity which requires you to implement left and right swipes. I could throw all of the gesture stuff there and maybe even some of the threaded loading screens which I could make generic.
14 years ago
Ok, I'm up to the he knows enough to be dangerous with Android. The problem is, I seem to be creating huge Activities. Handle a fling or 2, a few menu items, create some threads so I can show loading dialogs, a long press... I'm up to 270 lines and I'm not 1/2 done. With my real job, this easy enough, create a few logic classes, spring inject them and I'm good.

So I understand I can create other classes to handle events and such my activity doesn't need to implement OnGestureListener, OnDismissListener, I could do that in other classes. But even then that seems like the classes are still tightly coupled. Maybe that is just the way it needs to be. I really don't know.

Any good books you can recommend for me to look at? TBH I really do not learn how to do things in books, I learn doing and googling. But reading books for code philosophy I find very helpful.
14 years ago