Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!

Nehel Patel

Greenhorn
+ Follow
since Feb 09, 2010
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 Nehel Patel

Hi,

I have an Arraylist<Order>
Order object contains Order no, name and status as a string.

I want to poulate arraylist<order> in a table format with order no, name and status as columns.

i have used ListView with ArrayAdapter<Order> but i am getting only rows, i want to display as a table.
Please help me, which layout I have to use, and how to display on UI.

Currently I am displaying it like this,



and in adapter I have written like this,



I have attached UI , how it looks. Please help me to display in table form.

Thanks
Nehel
11 years ago
Hi all,

jboss-5.0.1.GA and tomcat 5 both are running on my linux machine. Tomcat is running on 8080 port and jboss on 8081. i Have deployed my war on both the servers. After 2 or 3 hrs of time my jboss server is shutting down automatically by itself. Is it because both server are running on same machine? Please give some solution.

The logs last generated is:
-----------------------------------Log------------------------------------------------------------------------------------------
2010-09-21 10:08:58,428 INFO [org.jboss.bootstrap.microcontainer.ServerImpl] (JBoss Shutdown Hook) Runtime shutdown hook called, forceHalt: true
2010-09-21 10:08:58,429 DEBUG [org.jboss.web.tomcat.service.deployers.TomcatService] (JBoss Shutdown Hook) Saw org.jboss.system.server.stopped notification, stopping connectors
2010-09-21 10:08:58,437 INFO [org.apache.coyote.http11.Http11Protocol] (JBoss Shutdown Hook) Pausing Coyote HTTP/1.1 on http-0.0.0.0-8081
2010-09-21 10:08:58,450 INFO [org.apache.coyote.http11.Http11Protocol] (JBoss Shutdown Hook) Stopping Coyote HTTP/1.1 on http-0.0.0.0-8081
2010-09-21 10:08:58,511 INFO [org.apache.coyote.ajp.AjpProtocol] (JBoss Shutdown Hook) Pausing Coyote AJP/1.3 on ajp-0.0.0.0-8010
2010-09-21 10:08:58,513 INFO [org.apache.coyote.ajp.AjpProtocol] (JBoss Shutdown Hook) Stopping Coyote AJP/1.3 on ajp-0.0.0.0-8010
---------------------------------------------------------------------------------------------------------------------------------

Thanks
11 years ago
Hi,

I am adding watermark image to existing pdf file using java code. I have used below link for this.
http://www.java2s.com/Code/Java/PDF-RTF/AddWatermarkImagetoanExistingPDFFile.htm
with this code watermark image is getting added on some pdfs but not in all pdfs.
I have observed that watermark image is not displayed on pdfs which contains links or buttons.
Is there any other way to add watermark on such type of pdfs?

Thanks & Regards,
Nehel
11 years ago
Hey I got the solution




I did this and now I am getting Spanish characters correctly instead of junk characters.
output: strSpanish : Atrévete a Soñar (how I wanted ) :-)

I have reffered below link
http://java.sun.com/developer/technicalArticles/Intl/HTTPCharset/
11 years ago
I have not done any encoding. Let me know if I neet to to do any encoding. This is simple text (string) coming from server and I am displaying on android UI.
11 years ago
Hi All,

I am parsing the xml which i am getting from serverside, and displaying the string on Android UI.

At one tag of xml I am getting some special characters "Atrévete a Soñar". On android phone and wordpad it shows same, But If I open same xml in mozilla it shows same string as "Atrévete a Soñar". I want to display this on Android UI same like how it shows in mozilla. Is there any string conversion code in JAVA by which I can do this?

Thanks in advance
Nehel
11 years ago
Hi All,

I want to add image in Alertdialog other than setIcon... means with setIcon I am displaying one image, but with actual message I want to display one more image in dialog. How can I do this? Please help

Thanks & Regard,
Nehel
12 years ago
Hi monu, Thanks for the reply...

I have tried the option which is given in the link. I copied sdk's drawable image and xml in res/drawable of my project, but still color of progressbar is not changing.
12 years ago
Hi,

I am trying to draw progress bar in my android application using linear layout in xml.


The progress bar is coming in white colour on emulator, but when I run same code on htc, progress bar is coming in green color, and on G1 it is with yellow color. I want all in Yellow colour. How can I give Colour?? or is there any method by which I can use my own image for progress bar?
I have tried android:progressDrawable="@drawable/progress_bar" in xml but its not working. Please help

Regards
12 years ago
Thanks for the reply ulf and Monu...

I will convert it first ...
12 years ago
Hi,

I want to play video file which is in '.AVI' format, placed in 'res/raw' folder of my android project.

Please send me the link which contains example for this or a code snippet so that I can implement this in my application.

Regards
12 years ago
Hi,

I think you need to add the following line to your AndroidManifest.xml

<uses-permission android:name="android.permission.INTERNET" />

and one more thing, replace 'localhost' in your URL with your machine IP.

try it...
12 years ago
A method is said to be overridden when one is in parent class and another is in child class with the same name, same return type, same parameter.

But Here you are defining getNum() twice with same arguments(None Arguments) which should not be. Compiler will not know at run time which getNum() should be called. Methods can not be differentiated only on basis of return type.

So method should be defined only once with same name and same arguments. With same name but different arguments, you can define as many methods.
12 years ago
Try following...
convert input to Integer, If it is not int value then it will directly go in catch block...

12 years ago
You need to import this in your code...

import java.io.BufferedReader;
import java.io.InputStreamReader;
12 years ago