This week's book giveaway is in the Open Source Projects forum.
We're giving away four copies of Spark in Action and have Jean-Georges Perrin on-line!
See this thread for details.
Win a copy of Spark in Action this week in the Open Source Projects forum!

HaoZhe Xu

Ranch Hand
+ Follow
since Nov 03, 2003
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by HaoZhe Xu

Is there anyway I can change the style of text on tab bar to bold when it is selected? I tried selector, but it seems it's only for changing color.

Thanks!
9 years ago

Dave MacLean wrote:You said your image was a map. Is it not a map from Earth?



It is a map, but the file is just a plain png file.
9 years ago
Thanks for your reply, but I'm not sure if I can provide my own image to MapView?
9 years ago
Hi, I need to show an image which is actually a map with coloured areas, also I need to be able to:
1. zoom in and out using two fingers
2. scroll the image as it is bigger than screen
3. clicks on the image, get clicked area pixel value(color), so that I know which area the user clicks

I searched many hours, tried many approaches:
1. Write a class that extends View, and display a Bitmap, I found a thread in the forum about it, but there is no zoom, and the scroll is not natural.
2. Use a WebView to display HTML file that contains the image, so there is zoom and scroll functionalities, however, I cannot control the limit of zoom in/out, also, when the user clicks, I'm not sure if I can get the position on the image map by adding scrollX, scrollY with touchX, touchY. As the image may be scaled up/down, also, there may be paddings that WebView adds to its content.

This really drives me crazy, can anyone help?

Thanks in advance!
9 years ago
Hi, I need to display an image(a map), and allow users to drag and zoom, also, when user clicks on an area on the map, information of that area is displayed. I wonder is there any standard way(such like imageview wrapped in an activity) of doing this, or do I have to create an activity that has imageview in it? I searched and read some of others questions/answers, found that WebView is a good way to display image, but I need to do some operations on the image(map) like I said, is it possible for WebView?

Thanks!
9 years ago
I use ActivityGroup to manage activities, I want to add animation when change activity, the code I used to change to next activity is:



And inside startChildActivity:



TabGroupActivity is just an ActivityGroup, provides some useful methods. With the above code, what/where do I add to enable animation?

Thanks!
9 years ago
Thanks for your reply, another question, is it possible to make a link to a map location so when you click the link it opens a map view that shows that location?

Thanks!
9 years ago
Is there anyway I can open web when user clicks on TextView, in a new window without leaving the app, it's like in iPhone when you click on an URL it shows you a new browser window, but there is a BACK button you can click to go back to previous screen?

Thanks!
9 years ago
I just need plain slide in and slide out animation for Fragment transition, below is my code: slide_in_right.xml:







The result looks very stranges, when the transition starts, the current fragment disappears without animation, the entering fragment comes(from left) like a scrolling paper. What's wrong with my animation xml code?

Thanks!
9 years ago
I guess you have to create your own by either extending a class in javax.microedition.lcdui(something like Custom*) or creating fresh new UI using Canvas
11 years ago
You should explain more clearer:

1 Do you use only one thread for everything? If so, and after you connect to server and waiting for IO, that blocks the thread so you won't be able to create a new file

2 Do you mean RMS data or local file via JSR 75 File Connection API?

3 What error message/exception do you get? Can you try to catch some exceptions and post the results?
11 years ago
Hello, I've been using Netbeans in Linux for a few years but I find it too slow compared to Eclipse, I tried Eclipse but I'm not sure how to configure it for J2ME just like in Netbeans I can create a new micro edtion project, and as I am using Linux, can anyone help?
Hello everyone, I got SCJP SCJD and SCWCD 4 years ago, then I studied bachelor degree(CS) at university, during my bachelor degree, I studied J2ME by myself, I did not follow it's tutorial book as I only want to learn J2ME so I can write J2ME programs, as practices, I've done a bit work, MTextReader and BlueBuddy, you can check it on my website Olnex.net. Now I have half a year to go for a diploma degree(after bachelor), I just wonder should I take the SCMAD exam because I can write it on my resume to find a job after graduate, if I should, what kind of books/materials should I study(as I studied J2ME instead of SCMAD although they have some common areas). If I take the exam now, I don't think I can get a good mark, but I don't want to spend much time studying for it.
What do you recommand?
Thanks a lot!!!
Hello everyone, I have to create a server in a midlet and connect to the server mobile phone with another client mobile phone, when I use:
(ServerSocketConnection)Connector.open("socket://";); // or specify a port number
getLocalAddress returns 127.0.0.1, which is just the localhost, so how do I create a server socket that has an inbound address(in a 3G network or GPRS network)?

I also tried push registry, however, it seems to be the same, I followed the instruction in:
http://developers.sun.com/mobility/midp/articles/pushreg/

the question is, what is the address that others can connect to you?

Thanks a lot!
11 years ago
I am writing a MIDlet that support pointer events, I wonder how do I test pointer events in emulator, more specifically, J2ME Wireless Toolkit, the hasPointerEvent method always returns false, maybe I should modify some configuration files?
Thanks a lot!
12 years ago