I am a Delphi programmer and have written, over the years, hundreds of classes and routines which I can use in every Delphi program I write. This library is called dlib and can be used in every Delphi program by putting this folder in my library path and using one of the units in the uses section of a Delphi
Tag: android
Android Socket + ObjectOutputStream not working correctly
I am developing a client/server program where the client is an android device. The server has a listener class that reads an object from the input stream. I created a client software for another COMPUTER that sends a small object over a local network. Computer to Computer works perfectly fine, i read the object and printed the contents. However, the
Clone textview to append it to a ViewGroup
I have a ViewGroup defined in XML with a view inside, at onCreate time I’d like to have a variable of those. I don’t want to go through the hassle of using a listview+adapter cause its clearly overkill as I know the list won’t change since onCreate() This is more or less the code I’d like to have. But it
Switch between a TextView and EditText
Is this possible to interchange a TextView and an EditText. Like display the text when needed, but allow editing when needed. Is there a method (as in NON-XML) way of editing a TextView or non-editing a EditText? Answer Is this possible to interchange a TextView and an EditText. Put both in your layout in the same spot. Make one invisible.
View’s getWidth() and getHeight() returns 0
I am creating all of the elements in my android project dynamically. I am trying to get the width and height of a button so that I can rotate that button around. I am just trying to learn how to work with the android language. However, it returns 0. I did some research and I saw that it needs to
Differences among various bool types?
What are the differences among bool, boolean and Boolean in Java/Android? Answer bool does not seem to exist, at least I can’t find references to it. boolean is a primitive boolean type, not an object. Boolean is the wrapper object for a boolean.
How to change text when scanning barcodes with Zxing via intent in Android?
Is it possible to change the prompt text that says “place the barcode inside the viewfinder…” when launching the Barcode scanner (zxing) via intent ? I want to have a prompt in my language, how should I do that? Answer Yes, plain and simple:
Content-Length header already present
I am using the Apache HttpClient (4.1) included in Android to execute a HttpPut. I have verified that I only have 1 content-length header. However, every time I send the request, I get a protocol exception about the Content-Length header already specified. Caused by: org.apache.http.ProtocolException: Content-Length header already present at org.apache.http.protocol.RequestContent.process(RequestContent.java:70) at org.apache.http.protocol.BasicHttpProcessor.process(BasicHttpProcessor.java:290) Any ideas? Answer I’ve not used HttpClient
How do I pass a R.drawable as a parameter so I can get images parsed
I try to save a unique image to each object but I get this error, how should the constructor look for it to work that way? The constructor Beer(String, int, int) is undefined Answer and like said before: Or you can send the int as parameter: and:
How to join tables using sqlite in android
I am trying to find out how to do a simple table join on my two tables using a sqlite database in an android application. Is the simplest way to use CursorJoiner or is there any easier way? Answer In the implementation of SQLiteDatabase and SQLiteQueryBuilder you will see that it is possible to pass the tables you want to