[android-developers] Re: Making ListView stop on a finger press
Any one? It's just that the List View isn't receiving the touch events for some reason (being consumed by the Button/TextView above), although it still scrolls if I flick the finger. On a tap I need the listview to receive the touch events so that the scroll is controlled. Any ideas? On Feb 7, 2:35 pm, Gw1921 wrote: > Okay more on this - it seems my custom view for each row inside the > list is grabbing the touch event and not passing it through to the > list. I have set "setItemsCanFocus" on the ListView to True (as its > required) and now I can't make the listview stop it's scrolling on a > tap. It only stops when it stops scrolling eventually. > > Any idea how I can pass the touch back to its parent? I've tried > returning "false" from a TouchListener as well but no luck > > On Feb 7, 11:56 am, Gw1921 wrote: > > > How can I make the ListView immediately stop scrolling on a finger > > down event? It keeps scrolling if I give it a big swipe and doesn't > > stop immediately if my finger is pressed down again. Any idea? Thanks > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Making ListView stop on a finger press
Okay more on this - it seems my custom view for each row inside the list is grabbing the touch event and not passing it through to the list. I have set "setItemsCanFocus" on the ListView to True (as its required) and now I can't make the listview stop it's scrolling on a tap. It only stops when it stops scrolling eventually. Any idea how I can pass the touch back to its parent? I've tried returning "false" from a TouchListener as well but no luck On Feb 7, 11:56 am, Gw1921 wrote: > How can I make the ListView immediately stop scrolling on a finger > down event? It keeps scrolling if I give it a big swipe and doesn't > stop immediately if my finger is pressed down again. Any idea? Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Making ListView stop on a finger press
How can I make the ListView immediately stop scrolling on a finger down event? It keeps scrolling if I give it a big swipe and doesn't stop immediately if my finger is pressed down again. Any idea? Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Memory Leaks, sigh
Yes I did, thanks. There was indeed a problem with using static variables to store reference to certain views which were being overwritten/modified when the view was stopped/restarted/destroyed. Thanks On Feb 4, 10:18 pm, Alexey wrote: > Did you read that > ?http://android-developers.blogspot.com/2009/01/avoiding-memory-leaks > > On Feb 4, 12:46 pm, Gw1921 wrote: > > > Hi > > > I'm trying to track down memory leaks in my application. It seems the > > total amount of memory the app really needs is perhaps around 3MB > > (Maximum, on average it's around 2.1MB). There's only one activity in > > the whole app which uses max amount of memory. > > > However, every time I switch from that activity back to the main entry- > > point activity (which shows the user an index of available options), > > it seems the previous activity was not garbage collected. I have the > > following concerns: > > > 1. I'm not sure if this is because I've kept a reference to some > > global resource in the previous activity that it's not being collected > > 3. I'm not sure if this is how Android works, i.e. GC on activities > > are delayed. > > > I'm using a lot of drawables (included as assets and resource) in the > > other memory-hogging activity. Am I supposed to 'reset' the views > > somehow in order to remove the reference to these globally accessible > > resources? I'm also reading a number of files from the SD Card (saved/ > > created in a separate activity). > > > Or am I supposed to somehow ensure that the activity is 'killed' in a > > way? In order to get back to the main Index (from which the user > > navigates to the other activity), I'm simply calling startActivity(new > > Intent("com.blah.MAININDEX")); > > > Any help would be much appreciated. I'm not sure if I completely > > understand how references are incremented and decremented for a given > > view in Android. > > > Thanks > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Moving back to a specific Activity always
Hi I've got four activities A, B, C and D where A is the main entry screen. No matter how I navigate to B, C or D (via A->B or A->C-B etc), I want the back button to always go to activity A. What flag can I set to do this specifically? Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Profiling Tools?
Great! Found the problem (I didn't know this was a problem). I was starting the same activity I was in from a button press from within the activity (thought that was easier than re-initializing everything). Apparently the new activity was being launched before the previous one got a 'onDestroy' and to my surprise after the new activity (the same class) launched, onDestroy was being called on the new instance!! This was causing a severe leak which I've now fixed and total allocated heap doesn't go above 2MB (phew!) Thanks again. On Feb 4, 8:12 pm, Romain Guy wrote: > Actually it is in DDMS, just not in the DDMS view of the Eclipse > plugin. You will have to run the standalone version. > > > > On Wed, Feb 4, 2009 at 11:28 AM, Gw1921 wrote: > > > Ouch :( > > > The documentation in that case needs updating too: > > >http://code.google.com/android/reference/ddms.html > > > Is there a way to get hold of an alpha-release of this SDK? I can't > > think of narrowing down to these memory leaks without going down the > > painful path of converting hprof files > > > Thanks for your time. > > > On Feb 4, 7:25 pm, Romain Guy wrote: > >> Argh I just remembered it's not part of the SDK yet. Sorry :( > > >> On Wed, Feb 4, 2009 at 11:21 AM, Gw1921 wrote: > > >> > That definitely looks useful :) > > >> > However I can't find it for the life of me. > > >> > Is this an optional tool/view one can install in Eclipse? I only see > >> > this "Threads", "Heap", "File Explorer" and on the left, "Devices" > > >> > Am on Mac OS X > > >> > On Feb 4, 7:18 pm, Romain Guy wrote: > >> >> You want to use the Allocation Tracker tab instead. See attached > >> >> screenshot. > > >> >> On Wed, Feb 4, 2009 at 11:14 AM, Gw1921 > >> >> wrote: > > >> >> > Thanks again Romain for the prompt reply, much appreciated! > > >> >> > Okay I may be looking at the wrong view as I'm unable to "click" > >> >> > anything. I see a "Heap" view and below that view there's a Bar Chart > >> >> > of some sort. Clicking on the bars or the labels in the Heap View, > >> >> > such as "data objects" doesn't do anything. I was assuming the bar > >> >> > chart is in fact the allocation view as I can't seem to find anything > >> >> > such as an Allocation View otherwise (as mentioned in the docs). > > >> >> > Also, does pressing the "back" button move to the previous Activity on > >> >> > the stack and 'destroy' the current one? Is it in theory supposed to > >> >> > reclaim all used memory in the currect activity as that seems to be > >> >> > the culprit. > > >> >> > Cheers > > >> >> > On Feb 4, 7:05 pm, Romain Guy wrote: > >> >> >> When you click on an allocation in DDMS it shows you the stack trace > >> >> >> for that allocation. > > >> >> >> On Wed, Feb 4, 2009 at 11:00 AM, Gw1921 > >> >> >> wrote: > > >> >> >> > Thanks again, this looks interesting. Also, where can we find > >> >> >> > explanation of fields displayed under the Allocation View. For > >> >> >> > example, "data objects" in our case are piling up and killing the > >> >> >> > app. > >> >> >> > What exactly are these and how can I trace back to where these were > >> >> >> > allocated? > > >> >> >> > Cheers! > > >> >> >> > On Feb 4, 6:34 pm, Romain Guy wrote: > >> >> >> >> There's been a discussion recently about heap analysis. There is > >> >> >> >> a way > >> >> >> >> to send a signal to running processes to get a heap dump. > >> >> >> >> Unfortunately the format of the dump is currently compatible only > >> >> >> >> with > >> >> >> >> an internal tool. Andy McFadden wrote a conversion tool that > >> >> >> >> turns the > >> >> >> >> heap dumps into "standard" hprof dumps that can be opened and > >> >> >> >> analyzed > >> >> >> >> by MAT, VisualVM, JProfiler,
[android-developers] Re: Profiling Tools?
Excellent :) Thanks! On Feb 4, 8:12 pm, Romain Guy wrote: > Actually it is in DDMS, just not in the DDMS view of the Eclipse > plugin. You will have to run the standalone version. > > > > On Wed, Feb 4, 2009 at 11:28 AM, Gw1921 wrote: > > > Ouch :( > > > The documentation in that case needs updating too: > > >http://code.google.com/android/reference/ddms.html > > > Is there a way to get hold of an alpha-release of this SDK? I can't > > think of narrowing down to these memory leaks without going down the > > painful path of converting hprof files > > > Thanks for your time. > > > On Feb 4, 7:25 pm, Romain Guy wrote: > >> Argh I just remembered it's not part of the SDK yet. Sorry :( > > >> On Wed, Feb 4, 2009 at 11:21 AM, Gw1921 wrote: > > >> > That definitely looks useful :) > > >> > However I can't find it for the life of me. > > >> > Is this an optional tool/view one can install in Eclipse? I only see > >> > this "Threads", "Heap", "File Explorer" and on the left, "Devices" > > >> > Am on Mac OS X > > >> > On Feb 4, 7:18 pm, Romain Guy wrote: > >> >> You want to use the Allocation Tracker tab instead. See attached > >> >> screenshot. > > >> >> On Wed, Feb 4, 2009 at 11:14 AM, Gw1921 > >> >> wrote: > > >> >> > Thanks again Romain for the prompt reply, much appreciated! > > >> >> > Okay I may be looking at the wrong view as I'm unable to "click" > >> >> > anything. I see a "Heap" view and below that view there's a Bar Chart > >> >> > of some sort. Clicking on the bars or the labels in the Heap View, > >> >> > such as "data objects" doesn't do anything. I was assuming the bar > >> >> > chart is in fact the allocation view as I can't seem to find anything > >> >> > such as an Allocation View otherwise (as mentioned in the docs). > > >> >> > Also, does pressing the "back" button move to the previous Activity on > >> >> > the stack and 'destroy' the current one? Is it in theory supposed to > >> >> > reclaim all used memory in the currect activity as that seems to be > >> >> > the culprit. > > >> >> > Cheers > > >> >> > On Feb 4, 7:05 pm, Romain Guy wrote: > >> >> >> When you click on an allocation in DDMS it shows you the stack trace > >> >> >> for that allocation. > > >> >> >> On Wed, Feb 4, 2009 at 11:00 AM, Gw1921 > >> >> >> wrote: > > >> >> >> > Thanks again, this looks interesting. Also, where can we find > >> >> >> > explanation of fields displayed under the Allocation View. For > >> >> >> > example, "data objects" in our case are piling up and killing the > >> >> >> > app. > >> >> >> > What exactly are these and how can I trace back to where these were > >> >> >> > allocated? > > >> >> >> > Cheers! > > >> >> >> > On Feb 4, 6:34 pm, Romain Guy wrote: > >> >> >> >> There's been a discussion recently about heap analysis. There is > >> >> >> >> a way > >> >> >> >> to send a signal to running processes to get a heap dump. > >> >> >> >> Unfortunately the format of the dump is currently compatible only > >> >> >> >> with > >> >> >> >> an internal tool. Andy McFadden wrote a conversion tool that > >> >> >> >> turns the > >> >> >> >> heap dumps into "standard" hprof dumps that can be opened and > >> >> >> >> analyzed > >> >> >> >> by MAT, VisualVM, JProfiler, etc. You will information > >> >> >> >> there:http://groups.google.com/group/android-developers/browse_thread/threa... > > >> >> >> >> On Wed, Feb 4, 2009 at 10:29 AM, Gw1921 > >> >> >> >> wrote: > > >> >> >> >> > Thanks for that Romain. I read your article as well - very > >> >> >> >> > informative. I'll have a look at DDMS as you've suggested as I'm > >> >> >> >
[android-developers] Re: Profiling Tools?
Ouch :( The documentation in that case needs updating too: http://code.google.com/android/reference/ddms.html Is there a way to get hold of an alpha-release of this SDK? I can't think of narrowing down to these memory leaks without going down the painful path of converting hprof files Thanks for your time. On Feb 4, 7:25 pm, Romain Guy wrote: > Argh I just remembered it's not part of the SDK yet. Sorry :( > > > > On Wed, Feb 4, 2009 at 11:21 AM, Gw1921 wrote: > > > That definitely looks useful :) > > > However I can't find it for the life of me. > > > Is this an optional tool/view one can install in Eclipse? I only see > > this "Threads", "Heap", "File Explorer" and on the left, "Devices" > > > Am on Mac OS X > > > On Feb 4, 7:18 pm, Romain Guy wrote: > >> You want to use the Allocation Tracker tab instead. See attached > >> screenshot. > > >> On Wed, Feb 4, 2009 at 11:14 AM, Gw1921 wrote: > > >> > Thanks again Romain for the prompt reply, much appreciated! > > >> > Okay I may be looking at the wrong view as I'm unable to "click" > >> > anything. I see a "Heap" view and below that view there's a Bar Chart > >> > of some sort. Clicking on the bars or the labels in the Heap View, > >> > such as "data objects" doesn't do anything. I was assuming the bar > >> > chart is in fact the allocation view as I can't seem to find anything > >> > such as an Allocation View otherwise (as mentioned in the docs). > > >> > Also, does pressing the "back" button move to the previous Activity on > >> > the stack and 'destroy' the current one? Is it in theory supposed to > >> > reclaim all used memory in the currect activity as that seems to be > >> > the culprit. > > >> > Cheers > > >> > On Feb 4, 7:05 pm, Romain Guy wrote: > >> >> When you click on an allocation in DDMS it shows you the stack trace > >> >> for that allocation. > > >> >> On Wed, Feb 4, 2009 at 11:00 AM, Gw1921 > >> >> wrote: > > >> >> > Thanks again, this looks interesting. Also, where can we find > >> >> > explanation of fields displayed under the Allocation View. For > >> >> > example, "data objects" in our case are piling up and killing the app. > >> >> > What exactly are these and how can I trace back to where these were > >> >> > allocated? > > >> >> > Cheers! > > >> >> > On Feb 4, 6:34 pm, Romain Guy wrote: > >> >> >> There's been a discussion recently about heap analysis. There is a > >> >> >> way > >> >> >> to send a signal to running processes to get a heap dump. > >> >> >> Unfortunately the format of the dump is currently compatible only > >> >> >> with > >> >> >> an internal tool. Andy McFadden wrote a conversion tool that turns > >> >> >> the > >> >> >> heap dumps into "standard" hprof dumps that can be opened and > >> >> >> analyzed > >> >> >> by MAT, VisualVM, JProfiler, etc. You will information > >> >> >> there:http://groups.google.com/group/android-developers/browse_thread/threa... > > >> >> >> On Wed, Feb 4, 2009 at 10:29 AM, Gw1921 > >> >> >> wrote: > > >> >> >> > Thanks for that Romain. I read your article as well - very > >> >> >> > informative. I'll have a look at DDMS as you've suggested as I'm > >> >> >> > getting out of memory errors left right and center. So far tracing/ > >> >> >> > profiling has proven to be extremely painful. > > >> >> >> > I greatly appreciate the effort being put into a heap analysis > >> >> >> > tool. > >> >> >> > Do you happen to have an ETA? > > >> >> >> > Thanks again > > >> >> >> > On Feb 4, 4:30 pm, Romain Guy wrote: > >> >> >> >> Hi, > > >> >> >> >> The SDK comes with traceview and DDMS to analyze performance. For > >> >> >> >> memory usage, you can use DDMS to track allocations and the state > >> >> >> >> of > >> >> >
[android-developers] Re: Profiling Tools?
That definitely looks useful :) However I can't find it for the life of me. Is this an optional tool/view one can install in Eclipse? I only see this "Threads", "Heap", "File Explorer" and on the left, "Devices" Am on Mac OS X On Feb 4, 7:18 pm, Romain Guy wrote: > You want to use the Allocation Tracker tab instead. See attached screenshot. > > > > On Wed, Feb 4, 2009 at 11:14 AM, Gw1921 wrote: > > > Thanks again Romain for the prompt reply, much appreciated! > > > Okay I may be looking at the wrong view as I'm unable to "click" > > anything. I see a "Heap" view and below that view there's a Bar Chart > > of some sort. Clicking on the bars or the labels in the Heap View, > > such as "data objects" doesn't do anything. I was assuming the bar > > chart is in fact the allocation view as I can't seem to find anything > > such as an Allocation View otherwise (as mentioned in the docs). > > > Also, does pressing the "back" button move to the previous Activity on > > the stack and 'destroy' the current one? Is it in theory supposed to > > reclaim all used memory in the currect activity as that seems to be > > the culprit. > > > Cheers > > > On Feb 4, 7:05 pm, Romain Guy wrote: > >> When you click on an allocation in DDMS it shows you the stack trace > >> for that allocation. > > >> On Wed, Feb 4, 2009 at 11:00 AM, Gw1921 wrote: > > >> > Thanks again, this looks interesting. Also, where can we find > >> > explanation of fields displayed under the Allocation View. For > >> > example, "data objects" in our case are piling up and killing the app. > >> > What exactly are these and how can I trace back to where these were > >> > allocated? > > >> > Cheers! > > >> > On Feb 4, 6:34 pm, Romain Guy wrote: > >> >> There's been a discussion recently about heap analysis. There is a way > >> >> to send a signal to running processes to get a heap dump. > >> >> Unfortunately the format of the dump is currently compatible only with > >> >> an internal tool. Andy McFadden wrote a conversion tool that turns the > >> >> heap dumps into "standard" hprof dumps that can be opened and analyzed > >> >> by MAT, VisualVM, JProfiler, etc. You will information > >> >> there:http://groups.google.com/group/android-developers/browse_thread/threa... > > >> >> On Wed, Feb 4, 2009 at 10:29 AM, Gw1921 > >> >> wrote: > > >> >> > Thanks for that Romain. I read your article as well - very > >> >> > informative. I'll have a look at DDMS as you've suggested as I'm > >> >> > getting out of memory errors left right and center. So far tracing/ > >> >> > profiling has proven to be extremely painful. > > >> >> > I greatly appreciate the effort being put into a heap analysis tool. > >> >> > Do you happen to have an ETA? > > >> >> > Thanks again > > >> >> > On Feb 4, 4:30 pm, Romain Guy wrote: > >> >> >> Hi, > > >> >> >> The SDK comes with traceview and DDMS to analyze performance. For > >> >> >> memory usage, you can use DDMS to track allocations and the state of > >> >> >> the heap. We are also working on ways to give SDK developers access > >> >> >> to > >> >> >> a heap analysis tool. > > >> >> >> On Wed, Feb 4, 2009 at 8:17 AM, Gw1921 > >> >> >> wrote: > > >> >> >> > Hi > > >> >> >> > I've been running Eclipse on Mac OS X for android development. > >> >> >> > Since > >> >> >> > I'm new to eclipse I'm not sure how to profile my apps. Especially > >> >> >> > Memory usage. Could some one guide me to a direction please? > >> >> >> > Thanks! > > >> >> >> -- > >> >> >> Romain Guy > >> >> >> Android framework engineer > >> >> >> romain...@android.com > > >> >> >> Note: please don't send private questions to me, as I don't have time > >> >> >> to provide private support. All such questions should be posted on > >> >> >> public forums, where I and others can see and answer them >
[android-developers] Re: Profiling Tools?
Thanks again Romain for the prompt reply, much appreciated! Okay I may be looking at the wrong view as I'm unable to "click" anything. I see a "Heap" view and below that view there's a Bar Chart of some sort. Clicking on the bars or the labels in the Heap View, such as "data objects" doesn't do anything. I was assuming the bar chart is in fact the allocation view as I can't seem to find anything such as an Allocation View otherwise (as mentioned in the docs). Also, does pressing the "back" button move to the previous Activity on the stack and 'destroy' the current one? Is it in theory supposed to reclaim all used memory in the currect activity as that seems to be the culprit. Cheers On Feb 4, 7:05 pm, Romain Guy wrote: > When you click on an allocation in DDMS it shows you the stack trace > for that allocation. > > > > On Wed, Feb 4, 2009 at 11:00 AM, Gw1921 wrote: > > > Thanks again, this looks interesting. Also, where can we find > > explanation of fields displayed under the Allocation View. For > > example, "data objects" in our case are piling up and killing the app. > > What exactly are these and how can I trace back to where these were > > allocated? > > > Cheers! > > > On Feb 4, 6:34 pm, Romain Guy wrote: > >> There's been a discussion recently about heap analysis. There is a way > >> to send a signal to running processes to get a heap dump. > >> Unfortunately the format of the dump is currently compatible only with > >> an internal tool. Andy McFadden wrote a conversion tool that turns the > >> heap dumps into "standard" hprof dumps that can be opened and analyzed > >> by MAT, VisualVM, JProfiler, etc. You will information > >> there:http://groups.google.com/group/android-developers/browse_thread/threa... > > >> On Wed, Feb 4, 2009 at 10:29 AM, Gw1921 wrote: > > >> > Thanks for that Romain. I read your article as well - very > >> > informative. I'll have a look at DDMS as you've suggested as I'm > >> > getting out of memory errors left right and center. So far tracing/ > >> > profiling has proven to be extremely painful. > > >> > I greatly appreciate the effort being put into a heap analysis tool. > >> > Do you happen to have an ETA? > > >> > Thanks again > > >> > On Feb 4, 4:30 pm, Romain Guy wrote: > >> >> Hi, > > >> >> The SDK comes with traceview and DDMS to analyze performance. For > >> >> memory usage, you can use DDMS to track allocations and the state of > >> >> the heap. We are also working on ways to give SDK developers access to > >> >> a heap analysis tool. > > >> >> On Wed, Feb 4, 2009 at 8:17 AM, Gw1921 > >> >> wrote: > > >> >> > Hi > > >> >> > I've been running Eclipse on Mac OS X for android development. Since > >> >> > I'm new to eclipse I'm not sure how to profile my apps. Especially > >> >> > Memory usage. Could some one guide me to a direction please? Thanks! > > >> >> -- > >> >> Romain Guy > >> >> Android framework engineer > >> >> romain...@android.com > > >> >> Note: please don't send private questions to me, as I don't have time > >> >> to provide private support. All such questions should be posted on > >> >> public forums, where I and others can see and answer them > > >> -- > >> Romain Guy > >> Android framework engineer > >> romain...@android.com > > >> Note: please don't send private questions to me, as I don't have time > >> to provide private support. All such questions should be posted on > >> public forums, where I and others can see and answer them > > -- > Romain Guy > Android framework engineer > romain...@android.com > > Note: please don't send private questions to me, as I don't have time > to provide private support. All such questions should be posted on > public forums, where I and others can see and answer them --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Profiling Tools?
Thanks again, this looks interesting. Also, where can we find explanation of fields displayed under the Allocation View. For example, "data objects" in our case are piling up and killing the app. What exactly are these and how can I trace back to where these were allocated? Cheers! On Feb 4, 6:34 pm, Romain Guy wrote: > There's been a discussion recently about heap analysis. There is a way > to send a signal to running processes to get a heap dump. > Unfortunately the format of the dump is currently compatible only with > an internal tool. Andy McFadden wrote a conversion tool that turns the > heap dumps into "standard" hprof dumps that can be opened and analyzed > by MAT, VisualVM, JProfiler, etc. You will information > there:http://groups.google.com/group/android-developers/browse_thread/threa... > > > > On Wed, Feb 4, 2009 at 10:29 AM, Gw1921 wrote: > > > Thanks for that Romain. I read your article as well - very > > informative. I'll have a look at DDMS as you've suggested as I'm > > getting out of memory errors left right and center. So far tracing/ > > profiling has proven to be extremely painful. > > > I greatly appreciate the effort being put into a heap analysis tool. > > Do you happen to have an ETA? > > > Thanks again > > > On Feb 4, 4:30 pm, Romain Guy wrote: > >> Hi, > > >> The SDK comes with traceview and DDMS to analyze performance. For > >> memory usage, you can use DDMS to track allocations and the state of > >> the heap. We are also working on ways to give SDK developers access to > >> a heap analysis tool. > > >> On Wed, Feb 4, 2009 at 8:17 AM, Gw1921 wrote: > > >> > Hi > > >> > I've been running Eclipse on Mac OS X for android development. Since > >> > I'm new to eclipse I'm not sure how to profile my apps. Especially > >> > Memory usage. Could some one guide me to a direction please? Thanks! > > >> -- > >> Romain Guy > >> Android framework engineer > >> romain...@android.com > > >> Note: please don't send private questions to me, as I don't have time > >> to provide private support. All such questions should be posted on > >> public forums, where I and others can see and answer them > > -- > Romain Guy > Android framework engineer > romain...@android.com > > Note: please don't send private questions to me, as I don't have time > to provide private support. All such questions should be posted on > public forums, where I and others can see and answer them --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Memory Leaks, sigh
Hi I'm trying to track down memory leaks in my application. It seems the total amount of memory the app really needs is perhaps around 3MB (Maximum, on average it's around 2.1MB). There's only one activity in the whole app which uses max amount of memory. However, every time I switch from that activity back to the main entry- point activity (which shows the user an index of available options), it seems the previous activity was not garbage collected. I have the following concerns: 1. I'm not sure if this is because I've kept a reference to some global resource in the previous activity that it's not being collected 3. I'm not sure if this is how Android works, i.e. GC on activities are delayed. I'm using a lot of drawables (included as assets and resource) in the other memory-hogging activity. Am I supposed to 'reset' the views somehow in order to remove the reference to these globally accessible resources? I'm also reading a number of files from the SD Card (saved/ created in a separate activity). Or am I supposed to somehow ensure that the activity is 'killed' in a way? In order to get back to the main Index (from which the user navigates to the other activity), I'm simply calling startActivity(new Intent("com.blah.MAININDEX")); Any help would be much appreciated. I'm not sure if I completely understand how references are incremented and decremented for a given view in Android. Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Profiling Tools?
Also, the Heap viewer says the emulator has 2.5MB of Heap and 1.8MB is being used (supposedly by my app). I was under the impression that we've got a total of 16MB of heap? On Feb 4, 4:30 pm, Romain Guy wrote: > Hi, > > The SDK comes with traceview and DDMS to analyze performance. For > memory usage, you can use DDMS to track allocations and the state of > the heap. We are also working on ways to give SDK developers access to > a heap analysis tool. > > On Wed, Feb 4, 2009 at 8:17 AM, Gw1921 wrote: > > > Hi > > > I've been running Eclipse on Mac OS X for android development. Since > > I'm new to eclipse I'm not sure how to profile my apps. Especially > > Memory usage. Could some one guide me to a direction please? Thanks! > > -- > Romain Guy > Android framework engineer > romain...@android.com > > Note: please don't send private questions to me, as I don't have time > to provide private support. All such questions should be posted on > public forums, where I and others can see and answer them --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Profiling Tools?
Thanks for that Romain. I read your article as well - very informative. I'll have a look at DDMS as you've suggested as I'm getting out of memory errors left right and center. So far tracing/ profiling has proven to be extremely painful. I greatly appreciate the effort being put into a heap analysis tool. Do you happen to have an ETA? Thanks again On Feb 4, 4:30 pm, Romain Guy wrote: > Hi, > > The SDK comes with traceview and DDMS to analyze performance. For > memory usage, you can use DDMS to track allocations and the state of > the heap. We are also working on ways to give SDK developers access to > a heap analysis tool. > > On Wed, Feb 4, 2009 at 8:17 AM, Gw1921 wrote: > > > Hi > > > I've been running Eclipse on Mac OS X for android development. Since > > I'm new to eclipse I'm not sure how to profile my apps. Especially > > Memory usage. Could some one guide me to a direction please? Thanks! > > -- > Romain Guy > Android framework engineer > romain...@android.com > > Note: please don't send private questions to me, as I don't have time > to provide private support. All such questions should be posted on > public forums, where I and others can see and answer them --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Profiling Tools?
Hi I've been running Eclipse on Mac OS X for android development. Since I'm new to eclipse I'm not sure how to profile my apps. Especially Memory usage. Could some one guide me to a direction please? Thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] How does one sell on the Android Market?
Hi I'm aware that one can post free applications on the Android Market. However, if one wishes to sell an app, how does one go about doing this? Do we have to sell apps from our own websites? What instructions do we give our users (in terms of the installation procedure etc). Any ideas would be helpful, thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to scroll a Listview to focus a particular element?
Thanks! That worked On Jan 30, 5:31 pm, Romain Guy wrote: > Use setSelection(position). > > On Fri, Jan 30, 2009 at 9:28 AM, fahad wrote: > > > Hi, > > > I'm trying to scroll my ListView (from an Activity) to a particular > > element in the list. I know it's position in the list. How is this > > possible? > > > Thanks > > -- > Romain Guy > Android framework engineer > romain...@android.com > > Note: please don't send private questions to me, as I don't have time > to provide private support. All such questions should be posted on > public forums, where I and others can see and answer them --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---