Re: [android-developers] Eclipse launch emulator error...

2012-01-26 Thread Greg Krimer
Try creating a new workspace. On Jan 26, 2012 10:06 AM, stringa sstri...@gmail.com wrote: Hello. There was a time where I tried to setup an emulator launch option in Eclipse, since then, I have removed the string. I keep getting the following error. I've reinstalled the SDK, I've deleted

Re: [android-developers] Re: again like all : The application ... (process ...) has stopped unexpectedly. Please try again

2011-06-19 Thread Greg Krimer
Hi aMeeN The LogCat view is your friend. The cause of the error will always be displayed there. To display the LogCat view in the current perspective in Eclipse go to Window-Show View-Other-Android-LogCat. When I ran your code, I saw this in the LogCat view: 06-19 21:34:29.586:

[android-developers] Re: Button in Custom View

2009-04-06 Thread Greg Krimer
Activity.findViewById() is different from View.findViewById(). The former uses the View set via setContentView() as the root and the later uses this View as the root. In other words, in order for ... findViewById(R.id.checkbox); ... to return a non-null View the button must be a child of your

[android-developers] Re: Anybody can help me with the control style?

2009-04-05 Thread Greg Krimer
Hi, A good place to start is to look at the ApiDemos application to see if there is anything there close to what you want. The best I found is com.example.android.apis.view.Animation2, which uses a ViewFlipper to transition from one view to another with various animations. It's not exactly what

[android-developers] Re: onDraw calling frequency

2009-04-05 Thread Greg Krimer
allocation in Java. =) On Apr 4, 10:54 am, Ikon ayanafr...@gmail.com wrote: Does that really help? I mean, is GC that bad? On Apr 4, 4:03 am, Greg Krimer gkri...@gmail.com wrote: That sounds fine to me. Just remember to respect the clip rectangle (canvas.getClipBounds()) and ideally not spend

[android-developers] Re: static vs non-static inner classes

2009-04-04 Thread Greg Krimer
wondering if someone can shed some light on this comment in the Android source code. Thanks, Greg On Mar 10, 4:08 pm, fadden fad...@android.com wrote: On Mar 9, 7:17 pm, Greg Krimer gkri...@gmail.com wrote: I have been finding it convenient to extend Handler in many of my activities to handle

[android-developers] Re: Handler and MessageQueue question

2009-04-04 Thread Greg Krimer
Hi Taísa, I am reversing the order of your questions. Did you say the main thread has its own handler?! So, if mine no more exists, the it will handle that message? As Dianne said, your handler is not associated with the activity. The behavior of your handler is not influenced by the state

[android-developers] Re: Image download issue

2009-04-04 Thread Greg Krimer
Your code looks fine to me. I have used similar code without problem. Is it possible that some of your images are corrupt? Check the logs. When BitmapFactory.decodeStream() returns null it logs a single-line error message such as: 04-04 00:55:14.184: DEBUG/skia(31069): xxx jpeg error 53

[android-developers] Re: onDraw calling frequency

2009-04-04 Thread Greg Krimer
That sounds fine to me. Just remember to respect the clip rectangle (canvas.getClipBounds()) and ideally not spend time computing Paints for areas outside the clip. Also, don't create a new Paint object in onDraw(). Create the Paint object once, store it in your view and re-use it on every draw

[android-developers] Re: How to use traceview to analyze performance problems?

2009-03-19 Thread Greg Krimer
My strategy for analyzing traces is to simply drill down on the child with the largest percentage until I get to a method called from my activity or the callstack is exhausted without reaching any of my methods. In the warm trace, for example, starting at the top level I drill down on the

[android-developers] Re: openInputStream problem

2009-03-19 Thread Greg Krimer
What do you mean readBytes never gets set to -1? Is the code going into an infinite loop? Or are you stepping though it in a debugger. In the later case, it would take a *very* long time for readBytes to be set to -1 because you are reading and writing one byte at a time. I am not sure if this

[android-developers] Re: shared Jar files between different project

2009-03-19 Thread Greg Krimer
Hi, I am confused. Which project is running A or B? Is com.example.A.test1 in project A or B? What is the type of the object that you do create? Try this: Object tmp = c.newInstance(); System.out.println(tmp); Is framework/base in project A or B? Finally, and this may not be important at all,

[android-developers] Injecting HTTP header into all requests issued by the emulator

2009-03-17 Thread Greg Krimer
Hi everyone, Is there an easy way to inject a header into all HTTP request sent from the emulator, including HTTP requests made by my app and also by the built-in web browser? I need this ability to model the behavior of a carrier gateway. I tried running the emulator through Fiddler as a proxy

[android-developers] Re: ListView for XML data

2009-03-17 Thread Greg Krimer
Well, I have not seen an example of exactly what you're doing, but it's pretty easy. Since the data is not in an array or cursor, I would extend BaseAdapter to create my own adapter for this data to drive the list view. The data should probably be in some sort of collection that the adapter can

[android-developers] Re: How to dismiss the AlertDialog without buttons after clicking on any item in the Alert Dialog

2009-03-15 Thread Greg Krimer
If you don't want buttons then you probably don't want to use AlertDialog because an AlertDialog has to have at least one button. Instead, use the Dialog class that AlertDialog extends. A Dialog can display any view hierarchy you want. You can then attach listeners to one or more views in your

[android-developers] Re: android session veriable

2009-03-09 Thread Greg Krimer
You might consider putting session state into your own application object. Make your own application class by extending android.app.Application and specifying the application class in your manifest. Every activity can access the application object by calling getApplication(). On Mar 9, 9:46 am,

[android-developers] Re: Getting Mobile number from phone is not working. PLEASE HELP

2009-03-09 Thread Greg Krimer
Did you add the following permission to your manifest: uses-permission android:name=android.permission.READ_PHONE_STATE / Can you check the log to see if you have an error? On Mar 9, 8:55 am, c6bro ch...@upload.co.uk wrote: Hi, I am using the below to get the mobile number of the sim card

[android-developers] Re: How can I create a custom composite widget in android

2009-02-26 Thread Greg Krimer
I think you just need to declare the android namespace. Try RelativeLayout xmlns:android=http://schemas.android.com/apk/res/ android android:id=@+id/carousel_row_layout android:gravity=left android:layout_width=fill_parent

[android-developers] Re: ListView and focusing

2009-02-20 Thread Greg Krimer
since the default one is opaque) or make your list items' background support the selected state. Also, instead of setting a single solid color, you should use colors that support states. On Mon, Feb 16, 2009 at 6:59 PM, Greg Krimer gkri...@gmail.com wrote: Hi, can you check out

[android-developers] Re: TextView with autoLink

2009-02-19 Thread Greg Krimer
Hi, I think the behavior you are observing is by design. Have a look at this thread: http://groups.google.com/group/android-developers/browse_thread/thread/3d96af1530a7d62a/9f9919a4b604c104?lnk=gstq=clickable+focusable#9f9919a4b604c104 On Feb 19, 2:21 pm, Gil virgildobjans...@gmail.com wrote:

[android-developers] Re: How to tame CPU usage?

2009-02-19 Thread Greg Krimer
Hi Mariano, have you tried profiling your app? The profiler is the ideal tool to tackle a fuzzy performance problem like this, I would think. You can even upload the trace file here allowing us to analyze it. This is probably nothing new, but when profiling try to exercise the area that's

[android-developers] Re: Setting margins for an imageview using code

2009-02-18 Thread Greg Krimer
want to set alignParentBottom to true.. We have a constructor like -- RelativeLayout.LayoutParams(Context c, AttributeSet attrs) --... Can u please tell me how to use attribute set?? or ne other method for setting align parentbottom to true? On Feb 17, 1:04 pm, Greg Krimer gkri...@gmail.com

[android-developers] Re: Setting margins for an imageview using code

2009-02-17 Thread Greg Krimer
See the section on Layout Params here: http://developer.android.com/guide/topics/ui/declaring-layout.html I think you need to call setLayoutParams() on your image view and pass in an instance of the layout params that corresponds to the view group containing your image view. For example, if your

[android-developers] Re: HttpURLConnection returns corrupt data on Dev phone

2009-02-17 Thread Greg Krimer
Can you check the return value of: is.read(bitmapData2); There is no guarantee that you will get all the bytes in one call to read, even with the buffer. As a quick fix try this: (new DataInputStream(is)).readFully(bitmapData2) If that works, I still would recommend writing your own

[android-developers] Re: DDMS does not list processes

2009-02-16 Thread Greg Krimer
DDMS is indeed the tool for the job. You may want to check out Romain's recent post on the subject on the Android blog: http://android-developers.blogspot.com/2009/02/track-memory-allocations.html I think you have to configure something to get your app to be seen by DDMS on a real device. I

[android-developers] Re: File explorer

2009-02-16 Thread Greg Krimer
There are several free file-browserish apps on the Android Market. Search for file and you will get a list of them. But keep in mind that in Android each application gets a private directory /data/data/ package name/ the contents of which you will not be able to examine without root access. You

[android-developers] Re: ListView and focusing

2009-02-16 Thread Greg Krimer
Hi, can you check out this thread to see if it is the same problem you are having: http://groups.google.com/group/android-developers/browse_thread/thread/ccb475c855e8785a/05a180ddac2c702c Basically, try setting the text color to an explicit value (as opposed to a style). Also, have a look at:

[android-developers] Re: Cannot use custom style that inherit from translucent android theme

2009-02-16 Thread Greg Krimer
Did you mean: style name=MyTranslucent parent=android:Theme.Translucent.NoTitleBar/style Anyway, I can confirm that it indeed does not work. But this does (in the sense that the title bar is absent): style name=MyTranslucent parent=android:Theme.NoTitleBar/ style How odd. I'd like to know

[android-developers] Re: Can we call R.java acreoss the packages?

2009-02-15 Thread Greg Krimer
The R class is created in the package that is associated with your application, Pack1 I am assuming. To access it from another package you do the same thing that you would do with any other public class that you wish to access outside of the package in which it resides: either fully-qualify it

[android-developers] Re: Problem in going in back/previous activity

2009-02-15 Thread Greg Krimer
Transitioning to a previous activity via the Back hard-key should be handled by Android for you (unless you are capturing the Back key event yourself, which does not sound like what you are doing because onPause() of your second activity is getting called). The only way I have screwed this up is

[android-developers] Re: SaxParser with POST to URL

2009-01-23 Thread Greg Krimer
Hi Mark, if you are asking how to make a POST request then I would have a look at the the java.net.URL and java.net.HttpURLConnection classes. Here is the gist of it: URL u = new URL(http://your.remote.api...;); HttpURLConnection http = (HttpURLConnection) u.openConnection();// create an