[android-developers] Re: How to create listview in a dialog
YOu need to set the list in the dialogue box... You have extended the list activity for the bcjgrnd screen..hence the error.. and after the set the content view..get the list view and set the adapter..in your changeConnPref method. something list this ur_listView= (ListView) mDialog.findViewById(R.id.hi_fi_list); ur_listView.setAdapter(bConnAdapter); On Mon, Dec 29, 2008 at 11:37 AM, zcj0429 wrote: > > Hi: > I'm now looking for a method to create listview in a dialog. The > method I'm now using is create an adaptor called connAdapter, the code > is: > > --- > public class ConnAdapter extends BaseAdapter{ >private final Context context; >private List conns; > >public ConnAdapter(List conns, Context context) { >this.conns = conns; >this.context = context; >} > >@Override >public int getCount() { >return conns.size(); >} > >@Override >public Object getItem(int position) { >return conns.get(position); >} > >@Override >public long getItemId(int position) { >return position; >} > >@Override >public View getView(int position, View convertView, ViewGroup > parent) > { >String conn = conns.get(position); > >LayoutInflater inflate = LayoutInflater.from(context); > >View v = inflate.inflate(R.layout.conn_list_row, parent, > false); > >TextView buddyText = > (TextView)v.findViewById(R.id.conn_name); >buddyText.setText(conn); > >return v; >} > > } > > - > > and the code which create the dialog is : > > > -- > public void changeConnPref(){ >List conns = new ArrayList(); >conns.add("WIFI"); >conns.add("Bluetooth"); >mDialog = new Dialog(this); >mDialog.setContentView(R.layout.connpreference); >mDialog.setTitle("Connection Preference"); >ConnAdapter bConnAdapter = new ConnAdapter(conns, this); >setListAdapter(bConnAdapter); > >Button bOk = (Button) mDialog.findViewById(R.id.pre_OK); >bOk.setOnClickListener(new OnClickListener() { >public void onClick(final View v) { > >mDialog.dismiss(); >} >}); > >Button bCancel = (Button) > mDialog.findViewById(R.id.pre_cancel); >bCancel.setOnClickListener(new OnClickListener() { >public void onClick(View v) { >mDialog.cancel(); >} >}); > >mDialog.show(); >} > > > --- > > The xml file of the dialog view is: > > > > > > android:layout_width="fill_parent" > android:layout_height="fill_parent" >xmlns:android="http://schemas.android.com/apk/res/android";> >android:layout_height="218px" android:layout_x="32px" >android:layout_y="43px"> > >android:layout_height="wrap_content" android:text=" Up " >android:layout_x="216px" android:layout_y="72px"> > >android:layout_height="wrap_content" android:text="Down" >android:layout_x="217px" android:layout_y="148px"> > >android:layout_height="wrap_content" android:text=" OK " >android:layout_x="55px" android:layout_y="337px"> > > android:layout_width="wrap_content" >android:layout_height="wrap_content" android:text="Cancel" >android:layout_x="152px" android:layout_y="335px"> > > > > > - > > But when the dialog shows up, the listview is not in the dialog, but > in the background screen. Anyone can help? > > > --~--~-~--~~~---~--~~ 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] Clearing the WebView cache
Hello, In onCreate() I instantiate a new WebView. In onStop() I call clearCache(true) and destroy() on the WebView. This does not seem to be enough to clear the cache since I see files piling up in /data/data/ MYAPP/cache/webviewCache. What is the proper way to remove this data? Thank you, Nick --~--~-~--~~~---~--~~ 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 to create listview in a dialog
Hi: I'm now looking for a method to create listview in a dialog. The method I'm now using is create an adaptor called connAdapter, the code is: --- public class ConnAdapter extends BaseAdapter{ private final Context context; private List conns; public ConnAdapter(List conns, Context context) { this.conns = conns; this.context = context; } @Override public int getCount() { return conns.size(); } @Override public Object getItem(int position) { return conns.get(position); } @Override public long getItemId(int position) { return position; } @Override public View getView(int position, View convertView, ViewGroup parent) { String conn = conns.get(position); LayoutInflater inflate = LayoutInflater.from(context); View v = inflate.inflate(R.layout.conn_list_row, parent, false); TextView buddyText = (TextView)v.findViewById(R.id.conn_name); buddyText.setText(conn); return v; } } - and the code which create the dialog is : -- public void changeConnPref(){ List conns = new ArrayList(); conns.add("WIFI"); conns.add("Bluetooth"); mDialog = new Dialog(this); mDialog.setContentView(R.layout.connpreference); mDialog.setTitle("Connection Preference"); ConnAdapter bConnAdapter = new ConnAdapter(conns, this); setListAdapter(bConnAdapter); Button bOk = (Button) mDialog.findViewById(R.id.pre_OK); bOk.setOnClickListener(new OnClickListener() { public void onClick(final View v) { mDialog.dismiss(); } }); Button bCancel = (Button) mDialog.findViewById(R.id.pre_cancel); bCancel.setOnClickListener(new OnClickListener() { public void onClick(View v) { mDialog.cancel(); } }); mDialog.show(); } --- The xml file of the dialog view is: http://schemas.android.com/apk/res/android";> - But when the dialog shows up, the listview is not in the dialog, but in the background screen. Anyone can help? --~--~-~--~~~---~--~~ 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] Debugging on actual G1
I am not sure what is wrong, but I can't seem to debug on the G1, I can debug fine on the emulator, it runs fine on emulator with an iso sd card loaded. It runs fine on the G1, but when I go to debug it says that it is waiting on the debugger. Any help or what messages need would be great.. 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: TextView Under Growing ListView
try this one http://schemas.android.com/apk/res/android"; android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="#00"> On Dec 29, 12:12 pm, Moto wrote: > Hi, I'm currently trying to display a TextView on the top and bottom > of my screen and in the middle my ListView. > > The problem is that when my ListView grows it pushes my bottom > TextView out of the screen. > How can I overcome this? > Thanks! > here is current XML: > > XML: > > "http://schemas.android.com/apk/res/android"; > android:orientation="vertical" > android:layout_width="fill_parent" > android:layout_height="fill_parent" > android:background="#00"> > android:id="@+id/loadingStatus" > android:layout_width="fill_parent" > android:layout_height="wrap_content" > android:gravity="center" > android:text="Title..." > android:textSize="20sp" > /> > > android:id="@+id/LinearLayout01" > android:layout_width="wrap_content" > android:layout_height="wrap_content"> > > android:id="@+id/android:list" > android:layout_width="wrap_content" > android:layout_height="wrap_content"/> > > > > android:id="@+id/streamStatusBar" > android:layout_width="fill_parent" > android:text="Processing Some Information" > android:textSize="12sp" > android:textColor="#FF" > android:layout_gravity="left|center_horizontal" > android:gravity="center_horizontal" > android:layout_height="18px" > android:layout_marginBottom="4px"/> > --~--~-~--~~~---~--~~ 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: suggestion. replace onActivityResult(), Request Code and Result Codes with flexible callbacks
Something like Anil is suggesting is probably eventually going to be essential for the platform as without it re-using 3rd party activities is problematic. Imagine a case where from your activity you want to invoke two different 3rd party activities to do some particular tasks and give you back results. It's possible both those activities might use the same requestCode and resultCode values, meaning that in your onActivityResult() method, you're going to have a hard time figuring out what actually happened. There's a post on the developerLife blog where the author basically implemented what Anil is suggesting in his own Activity sub-class: http://developerlife.com/tutorials/?p=302 While this works, it re-purposes the requestCode parameter which should represent the verb (Add, delete, whatever) to instead be a unique identifier for the request. It would be better if the framework provided direct support for this. On Dec 15, 11:24 am, Anil wrote: > I am willing to collaborate with anyone interested to implement this. > I don't have the ability, knowledge or desire to implement it alone. > BTW, are you the Dianne in the Android video > here?http://www.youtube.com/watch?v=3aUjukCdPyQ > > On Dec 12, 3:01 pm, "Dianne Hackborn" wrote: > > > Whoops, sorry I missed that you were talking about having the callback be a > > method name. That would indeed be more possible to implement... but still, > > this is not nearly as high a priority as many other things, so the way to > > get this done is to contribute a patch. > > > On Fri, Dec 12, 2008 at 12:59 PM, Dianne Hackborn > > wrote: > > > > (This would be more appropriate for the android-framework group to talk > > > about changes to the platform.) > > > > There is currently no plan for doing this kind of thing, because it is > > > extremely problematic to deal with the case when the activity's process is > > > killed and restarted between startActivityForResult() and eventually > > > receiving the result. > > > > If this is something you really want, you are welcome to work on a patch > > > you can contribute to add the feature. On the priority list of the people > > > currently working on the platform, though, it is very low because: > > > > (1) Given the processing killing issue, an API as simple as being > > > described > > > is impossible to do, so it would need to be more complicated, making its > > > utility unclear. > > > > (2) Whatever "desired" API there is can just as easily be implemented by > > > the application, it doesn't need to be done in the framework. There is > > > very > > > little additional capabilities the framework has to do this, except > > > possibly > > > the chance to change the result from an int to a string (and so being able > > > to make it say a class name that it dynamically instantiates when > > > delivering > > > the result). > > > > On Fri, Dec 12, 2008 at 9:39 AM, Anil wrote: > > > >> Objective: simpler and arguably more elegant design by making object > > >> oriented and remove the mass of switch statements that result using > > >> only > > >> one fixed callback method - onActivityResult(), Request Code and > > >> Result Codes. > > > >> Suggestion: modify API so that calling startActivityForResult() will > > >> be > > >> instead startActivityForResult(callbackMethodName). > > > >> where callbackMethodName is a method. We could simply use a String > > >> rather > > >> than Method, to keep things simple. > > > >> callbackMethodName(Bundle result) { > > >> } > > > >> If an error happens in the sub activity, then the exception that is > > >> thrown, > > >> is delivered to callbackMethodName() which must contain an empty try > > >> block > > >> at the beginning. > > >> try{ > > >> } catch(e1){ > > >> handle exception e1 thrown in the call to the sub activity > > >> } catch(e2) { > > >> handle exception e2 thrown in the call to the sub activity > > >> } > > >> now other normal code in callbackMethodName() > > > >> Any other result information is communicated by the Bundle result > > >> parameter. > > > >> (I have submitted it as a suggestion in issue tracker. > > >>http://code.google.com/p/android/issues/detail?id=1520) > > > > -- > > > Dianne Hackborn > > > Android framework engineer > > > hack...@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. > > > -- > > Dianne Hackborn > > Android framework engineer > > hack...@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
[android-developers] Re: Service will not stay running
Yes I'm sure, everything is fine. I have a plain dev phone with nothing else installed but my application, and I'm sure there is never a low memory condition, I've checked top and everything I can think of... also the docs say that your service is supposed to be restarted by the system if a low memory problem occurs... but I have never seen my service restarted even once. On Dec 28, 8:43 pm, Mark Murphy wrote: > Mark Murphy wrote: > > bparker wrote: > >> I just noticed that the Logcat app itself was just killed as well, > >> after not even running for 10 minutes... with the screen off and no > >> other activities running. > > > U...how are you determining that there are no other activities running? > > Actually, to be more precise: are you sure there's nothing else running > in the background that is plowing through memory? > > You can run top from adb shell, for example, to see what's all running. > > -- > Mark Murphy (a Commons Guy)http://commonsware.com > _The Busy Coder's Guide to Android Development_ Version 1.9 Available! --~--~-~--~~~---~--~~ 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] Updated XMPP Client (using Smack)
Folks, finally got around to updating my xmpp sample to latest SDK. http://davanum.wordpress.com/2008/12/29/updated-xmpp-client-for-android/ thanks, dims -- Davanum Srinivas :: http://davanum.wordpress.com --~--~-~--~~~---~--~~ 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] TextView Under Growing ListView
Hi, I'm currently trying to display a TextView on the top and bottom of my screen and in the middle my ListView. The problem is that when my ListView grows it pushes my bottom TextView out of the screen. How can I overcome this? Thanks! here is current XML: XML: http://schemas.android.com/apk/res/android"; android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="#00"> --~--~-~--~~~---~--~~ 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: Service will not stay running
Mark Murphy wrote: > bparker wrote: >> I just noticed that the Logcat app itself was just killed as well, >> after not even running for 10 minutes... with the screen off and no >> other activities running. > > U...how are you determining that there are no other activities running? Actually, to be more precise: are you sure there's nothing else running in the background that is plowing through memory? You can run top from adb shell, for example, to see what's all running. -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 1.9 Available! --~--~-~--~~~---~--~~ 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: Service will not stay running
bparker wrote: > I just noticed that the Logcat app itself was just killed as well, > after not even running for 10 minutes... with the screen off and no > other activities running. U...how are you determining that there are no other activities running? -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 1.9 Available! --~--~-~--~~~---~--~~ 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: Service will not stay running
I just noticed that the Logcat app itself was just killed as well, after not even running for 10 minutes... with the screen off and no other activities running. The only message I got was: 12-28 20:24:12.760: INFO/ActivityManager(51): Process org.devtcg.tools.logcat (pid 5916) has died. On Dec 28, 8:21 pm, bparker wrote: > I tried the Logcat app and it seems that it (the app itself) only > keeps about 2 hours worth of data, whereas the Logcat view in eclipse > shows me at least twice that much... but still not enough to catch the > service being stopped, which usually takes at least a day or more. > > Any ideas on how to log data for this long? > > On Dec 28, 7:16 pm, Al wrote: > > > Does Logcat show any reason for killing the Service? You can install > > Logcat app fromhttp://code.google.com/p/android-random/, which will > > show logcat on the phone. You can also save the data to a text file, > > but by default, it saves it to /data/{package-name}/file, which we > > can't access. You can use this patch to save it to the SD > > Card:http://pastebin.com/m130c099d > > > Hopefully that'll shine more light on why it gets killed. > > > On Dec 28, 6:55 pm, bparker wrote: > > > > I have a service which is dynamically registered from within an > > > activity. The service listens for incoming and outgoing phone calls, > > > so it needs to stay running all the time. But after about 1 day, > > > without even launching any other applications, the parent activity is > > > killed and the service stops running. How can I prevent this? > > > > 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: Service will not stay running
I tried the Logcat app and it seems that it (the app itself) only keeps about 2 hours worth of data, whereas the Logcat view in eclipse shows me at least twice that much... but still not enough to catch the service being stopped, which usually takes at least a day or more. Any ideas on how to log data for this long? On Dec 28, 7:16 pm, Al wrote: > Does Logcat show any reason for killing the Service? You can install > Logcat app fromhttp://code.google.com/p/android-random/, which will > show logcat on the phone. You can also save the data to a text file, > but by default, it saves it to /data/{package-name}/file, which we > can't access. You can use this patch to save it to the SD > Card:http://pastebin.com/m130c099d > > Hopefully that'll shine more light on why it gets killed. > > On Dec 28, 6:55 pm, bparker wrote: > > > I have a service which is dynamically registered from within an > > activity. The service listens for incoming and outgoing phone calls, > > so it needs to stay running all the time. But after about 1 day, > > without even launching any other applications, the parent activity is > > killed and the service stops running. How can I prevent this? > > > 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: Can one not use @+id with ArrayAdapter layout XML file?
Thanks a lot for your clarification, Mark! Very lucid. Regards On Dec 28, 2:07 pm, Mark Murphy wrote: > blindfold wrote: > > Not using @+id through > > > ArrayAdapter MyList = new ArrayAdapter(this, > > R.layout.mylist); > > > works fine, but using @+id through > > > ArrayAdapter MyList = new ArrayAdapter(this, > > R.id.mylist); > > > does not, where my mylist.xml reads > > > > > http://schemas.android.com/apk/res/android"; > > android:layout_width="fill_parent" > > android:layout_height="wrap_content" > > android:textAppearance="?android:attr/textAppearanceLarge" > > android:gravity="center_vertical" > > android:paddingLeft="6dip" > > android:minHeight="?android:attr/listPreferredItemHeight" > > android:id="@+id/mylist" > > /> > > > It all compiles just fine, but at runtime I get > > > ERROR/AndroidRuntime(1356): android.content.res.Resources > > $NotFoundException: Resource ID #0x7f06001a type #0x12 is not valid > > > Am I missing some conceptual issue with the use of ArrayAdapter or the > > way @+id gets expanded? Of course I can just use R.layout.mylist, but > > it feels a bit inconsistent as I use the R.id referencing in my source > > code with many other items (albeit through findViewById()). > > R.layout points to layout resources. Layout resources are used whenever > Android wants to inflate a tree of Views, such as setContentView(), > manual inflation via getLayoutInflater(), etc. > > R.id points to individual widgets (Views) within an inflated layout. > R.id values have no meaning outside the context of a specific layout -- > in other words, R.id.fu means nothing on its own, but > myInflatedView.findViewById(R.id.fu) might, if myInflatedView was > inflated from a layout resource that had something with > android:id="@+id/fu". > > In the documentation for the ArrayAdapter constructor you're using, the > second parameter is described as: > > "The resource ID for a layout file containing a TextView to use when > instantiating views." > > Hence, it is expecting something in the R.layout space ("resource ID for > a layout file"). > > -- > Mark Murphy (a Commons Guy)http://commonsware.com > _The Busy Coder's Guide to Android Development_ Version 1.9 Available! --~--~-~--~~~---~--~~ 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: Eclipse Error while adding ddms
hi Jeff, i was having open jdk and later i have gone for sun-java6-jdk and got it solved. Thanks Binish On Sun, Dec 28, 2008 at 6:06 AM, jeff wrote: > > Hi, > what is the problem with the JDK if you dont mind sharing..I have the > same problem recently... > > Thanks, > > On Dec 7, 1:08 am, "Anonymous Anonymous" > wrote: > > Hi Xav, Ralf, > > > > Now am able to launch DDMS and debug built in apps, pblm was with my > JDK. > > > > Thanks a lot for your help > > Steve > > > > On Sun, Dec 7, 2008 at 8:13 AM, Anonymous Anonymous < > > > > firewallbr...@googlemail.com> wrote: > > > Hi Xav, > > > in trouble :( > > > *I am trying to debug existing application. > > > > > Am usign the full source code downloaded from source.android.com...(not > > > this onehttp://code.google.com/android/download_list.html-Linux one). > > > I assume ADT plugin is used in such case , where we debug as Android > > > Application?? > > > Here i try to debug the "full source" tree running DDMS on another > terminal > > > (standalone!) > > > So i assumed adding the com.**.ddms in workspace will solve the > problem > > > !! > > > > > * If you can run Eclipse with the ADT plugin, you don't need to run the > > > standalone DDMS. Go to the DDMS perspective in Eclipse, and select > > > your running application in the Device view, and then select to port > > > 8700* > > > > > On the other side i have tried this as well, but it needs to set > SDK>tools > > > location and all > > > > > So am kinda lost now - (debugging IM application).. > > > > > My workspace looks like this now FYR ( > http://i35.tinypic.com/5d1ehi.png) > > > > > or me again wrong? > > > > > Thanks and sorry for the trouble > > > Steve > > > > > On Sat, Dec 6, 2008 at 11:01 PM, Xavier Ducrohet > wrote: > > > > >> > I want to debug an android application built with the SDK say (IM).. > > >> > I think my understanding also wrong (sorry for being noobish),let me > > >> > summarize the steps needed for debugging... > > > > >> > 1.Latest source code compiled succesfully with a working emulator. > > >> > 2.ddms plugin added in eclipse. > > >> > 3.lauch DDMS and emulator in separate terminals !! ? > > >> > 4.connect using 8700 port > > >> > (*considering my break point is in ImApp.java !!!) > > > > >> There is a big confusion on what step 2 is. > > >> From the beginning we helped you open and compile the _source_code_ > > >> for the adt/ddms plug-ins. > > >> What you needed was to _install_ the plugin (which is called ADT but > > >> includes DDMS as well). See instruction here: > > >>http://code.google.com/android/intro/installing.html#installingplugin > > > > >> If you can run Eclipse with the ADT plugin, you don't need to run the > > >> standalone DDMS. Go to the DDMS perspective in Eclipse, and select > > >> your running application in the Device view, and then select to port > > >> 8700. > > > > >> Now, I do not know why you can't seem to run the standalone DDMS. It > > >> looks like your linux installation is weird. > > > > >> Xav > > > --~--~-~--~~~---~--~~ 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: Service will not stay running
Does Logcat show any reason for killing the Service? You can install Logcat app from http://code.google.com/p/android-random/, which will show logcat on the phone. You can also save the data to a text file, but by default, it saves it to /data/{package-name}/file, which we can't access. You can use this patch to save it to the SD Card: http://pastebin.com/m130c099d Hopefully that'll shine more light on why it gets killed. On Dec 28, 6:55 pm, bparker wrote: > I have a service which is dynamically registered from within an > activity. The service listens for incoming and outgoing phone calls, > so it needs to stay running all the time. But after about 1 day, > without even launching any other applications, the parent activity is > killed and the service stops running. How can I prevent this? > > 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: What is a good way to download a webpage for offline reading?
Have u hear of google gear? which is already integrated into Android.. If you use gear's features, I believe you can do what you are after. (but don't ask me how because I don't know.) Cheers Eric Portable Electronics Ltd www.hdmp4.com On Dec 28, 2:18 am, Mariano Kamp wrote: > Hi, > > I was wondering what would be a good way to download a webpage for > offline reading? > > I first thought about downloading the html source, grep it for the > image tag's soure attribute and download the image. After rewriting > the image tag in a way that it reffers to the local file and storing > the html and the image content locally it should be possible to > display the webpage from the local filesystem. > But it could be a PITA to find all the image tags, would replicate > browser functionality (parser) and wouldn't take care of images that > are referenced in the css or set by Javascript. > > WebView offers a capturePicture() method. But even if I would find > a way to easily store and retrieve the images, I can't use the zoom > functionality of WebView anymore as well as the care for orientation > changes and of course clicking on the links wouldn't be possible either. > > It seems that it could be possible to download the source, hand it > to WebView and capture all requests for external resources, so that > they can be downloaded and stored locally. So when later on loading > the locally stored html the events could be overridden again and the > images could be loaded locally. > > Does this make sense? Is that possible? Can WebView load/parse/ > (render) a webpage when not displayed? Did anybody do this > successfully or is this to much off the beaten (and tested) path? > > Cheers, > Mariano --~--~-~--~~~---~--~~ 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] DatePicker and TimePicker widgets
Hi, I want to display DatePicker and TimePicker widgets side by side on the screen but when I use LinearLayout like below, half of the TimePicker is not showing up. Both DatePicker and TimePicker widgets seem to be too large and taking up lot of screen space. I tried restricting their width and height to specific number of pixels but thats cutting down the widget itself instead of making them look smaller. Any idea which layout and what attributes I need to play around with ? Thanks, Sarath --~--~-~--~~~---~--~~ 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: XMPP through Smack
That is one of the many references I have already read. Unfortunately, the zip file was not there. On Dec 28, 4:52 am, Peter Parnes wrote: > Hi > > Have you tried this > ?http://davanum.wordpress.com/2007/12/31/android-just-use-smack-api-fo... > > -Peter > > On Sun, Dec 28, 2008 at 10:42 AM, Tez wrote: > > > Hi, > > > Even i am having problems in getting the Smack API to work on Android. > > I heard that u need to use a patched version of the original > > smack.jar, however, i've had no luck in getting that file also. I am > > trying to use JSO(Jabber Stream Objects). Hopefully that won't have as > > many problems. :) > > > Cheers, > > Earlence Fernandes > > > On Dec 28, 7:45 am, jman wrote: > > > After reading many previous posts about XMPP, I am still not sure if > > > anyone actually got XMPP to work for the official SDK 1.0. > > > > I had trouble receiving any message. From the logs, I saw this: > > > > 12-27 19:43:14.866: WARN/System.err(225): > > > java.security.KeyStoreException: KeyStore jks implementation not found > > > > This origin is from Smack's PacketReader and I read a post about > > > installing the "cacerts" fiel as follows: > > > > String javaHome = System.getProperty("java.home"); > > > StringBuffer buffer = new StringBuffer(); > > > buffer.append(javaHome).append(File.separator).append("lib"); > > > buffer.append(File.separator).append("security"); > > > buffer.append(File.separator).append("cacerts"); > > > config.setTruststorePath(buffer.toString()); > > > config.setTruststoreType("jks"); > > > config.setTruststorePassword("changeit"); > > > > This didn't seem to solve the problem on Windows while it could help > > > those on Linux. Can anyone provide any ideas to proceed? > > > > 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] future app distribution on android
Anyone has an idea on how future app distribution will work on android? I see a possibility for some issues. Right now you have the G1 phone... probably - except for developers - everyone is on the same version of the OS. How will app distribution work in the future when multiple versions of the OS are being used. Possibly even tweaked on new/other phones (e.g. some firm branching off the official android platform to provide more custom functionality) Unless no interface is broken, some applications could run on 1 version but not on another version. Regards, Sven Living in one of those "ape" countries that only allow sim unlocked phones :( --~--~-~--~~~---~--~~ 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: Any updates on paid apps timeline?
There are already sites out there which allow you to charge for android apps, for the "official" site I didn't see anything out there yet. Regards, Sven 2008/12/28 Redhunt > > Has anyone heard any news on when developers will be able to post apps > for a fee ? > > 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] Any updates on paid apps timeline?
Has anyone heard any news on when developers will be able to post apps for a fee ? 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: dealing with multiple activities
You are on the right track. I`m not an expert, but I was playing with the same thing yesterday. You use the addExtras function for the Intent, but you use a Bundle as an argument. In the bundle I believe you can store values as an associative aray or hash. You then extract the bundle and the associated element from the other activity. This worked for but for simple things like integers and strings. Hope this helps. -George --~--~-~--~~~---~--~~ 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] Service will not stay running
I have a service which is dynamically registered from within an activity. The service listens for incoming and outgoing phone calls, so it needs to stay running all the time. But after about 1 day, without even launching any other applications, the parent activity is killed and the service stops running. How can I prevent this? 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] Dynamic Map Overlays
I have a map with ten overlays which signify map pins. Occasionally I would like to reposition the overlays to mark a different location on the map. How do I change the GeoPoint position of a map overlay after I have already created it and added it to map.getOverlays() ? I have spent absolutely ages trying to achieve this functionality - I just hope it is possible! Many 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 to use ScaleDrawable?
Hi, Can someone tell me how to use the ScaleDrawable class? In particular, instantiating it. There is only one constructor: public ScaleDrawable(Drawable drawable, int gravity, float scaleWidth, float scaleHeight) ...but it has no supporting javadoc documentation. What is the gravity constant I must pass? I guess I want the drawable which is contained in the ScaleDrawable to appear pretty much to the left of the canvas, with perhaps a bit of padding. What should the scaleWidth and scaleHeight values be? I know from the description of the class that this is the right one for my purpose (to display a static, non-moving progress-bar-like image) but I can't work out how to do this. Let's say the view that contains this image is 150px x 30px and i want the progress to show 1/3, how do I use ScaleDrawable to do this? cheers, Ian --~--~-~--~~~---~--~~ 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: disable home button
That doesn't jibe with actual user experience. The following repros for me: 1) With an activated dev phone, run the Startup Wizard via Any Cut. 2) Exit immediately, via the Back Button. 2a) Verify that Startup Wizard has ended, if desired. 3) Verify that the Home Button now does *nothing* on any screen. In particular, it does NOT bring the Startup Wizard up 3a) Additionally, functionality changes can be verified in the Call Button, Screen Lock, and Power Down. 3b) Limited button functionality persists through reboot. 4) Regain normal functionality by running the Startup Wizard again, with your original creds. -sff On Dec 28, 2:39 am, Romain Guy wrote: > That's because SetupWizard is considered to be the Home screen at boot > time, so pressing Home just brings the SetupWizard back. > > On Sun, Dec 28, 2008 at 9:42 AM, sherifffruitfly > > > > wrote: > > > Yes it is possible. Setup Wizard achieves the goal, and NOT in the way > > that Toddler Lock does. > > > Setup Wizard genuinely makes the Home Button do *nothing* when it > > starts, and then enables it when it completes. > > > -sff > > > On Nov 10, 3:18 pm, zl25drexel wrote: > >> anyone knows how to disable thehomebuttonlike the toddler lock app > >> did? > > >> I put that app on debug, it looks like it restarts itself every time > >> thehomebuttonis pressed. I was able kind of reproducing that by > >> issuing a pendingintent in the onstop method, the problem is that is > >> will show the desktop for about half of a sec because the pending > >> activity got launched. Is there an other way to lock thehomebutton? > > -- > 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: A question about camera of Android SDK 1.0 rc2
I also faced this issue. On Dec 27, 9:03 pm, NY wrote: > I update from rc1 to rc2 > And open default picture app, choose a image, open it > then will have a error > If back to install rc1, it work right > Is it a bug of rc2? --~--~-~--~~~---~--~~ 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 access internet in emulator v1.0
Thanks Tez.. i shall look into it and let u know.. On Dec 27, 5:08 pm, Tez wrote: > Hi, > > To access internet from within an activity, you need to setup INTERNET > permissions in your manifest file. Then you can access the internet > either by launching your activity with a WebView or you can use some > code that utilizes Android's network layer. > > Cheers, > Earlence > > On Dec 26, 12:31 pm, "sheik ahmed" wrote: > > > hi all, > > i have been looking to enable internet access in the emulator v1.0.. > > > Please guide me regarding this ... > > > thanks. > > regards, > > sheik --~--~-~--~~~---~--~~ 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: managedQuery() terminating the application.
Sarath Kamisetty wrote: > Hi, > > I have one more question on this. The following query returns all the > contacts in the phone. > > private String[] projection = new String[] { >People._ID, >People.NAME, >People.NUMBER, >}; > >managedCursor = managedQuery(People.CONTENT_URI, >projection, >null, >null, >People.NAME + " ASC"); > > How do I modify this to get only the mobile numbers ? I am not > interested in the contacts that don't have mobile numbers. I am not > sure which column to project. I tried using TYPE and TYPE_MOBILEs but > no luck. Please let me know if you have any suggestions. You need to replace your two null values in your managedQuery() call with appropriate values that add a constraint upon your query to return only mobile numbers. I haven't played around with the Contacts content provider enough yet to provide exact source code. -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 1.9 Available! --~--~-~--~~~---~--~~ 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: Can one not use @+id with ArrayAdapter layout XML file?
blindfold wrote: > Not using @+id through > > ArrayAdapter MyList = new ArrayAdapter(this, > R.layout.mylist); > > works fine, but using @+id through > > ArrayAdapter MyList = new ArrayAdapter(this, > R.id.mylist); > > does not, where my mylist.xml reads > > > http://schemas.android.com/apk/res/android"; > android:layout_width="fill_parent" > android:layout_height="wrap_content" > android:textAppearance="?android:attr/textAppearanceLarge" > android:gravity="center_vertical" > android:paddingLeft="6dip" > android:minHeight="?android:attr/listPreferredItemHeight" > android:id="@+id/mylist" > /> > > It all compiles just fine, but at runtime I get > > ERROR/AndroidRuntime(1356): android.content.res.Resources > $NotFoundException: Resource ID #0x7f06001a type #0x12 is not valid > > Am I missing some conceptual issue with the use of ArrayAdapter or the > way @+id gets expanded? Of course I can just use R.layout.mylist, but > it feels a bit inconsistent as I use the R.id referencing in my source > code with many other items (albeit through findViewById()). R.layout points to layout resources. Layout resources are used whenever Android wants to inflate a tree of Views, such as setContentView(), manual inflation via getLayoutInflater(), etc. R.id points to individual widgets (Views) within an inflated layout. R.id values have no meaning outside the context of a specific layout -- in other words, R.id.fu means nothing on its own, but myInflatedView.findViewById(R.id.fu) might, if myInflatedView was inflated from a layout resource that had something with android:id="@+id/fu". In the documentation for the ArrayAdapter constructor you're using, the second parameter is described as: "The resource ID for a layout file containing a TextView to use when instantiating views." Hence, it is expecting something in the R.layout space ("resource ID for a layout file"). -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 1.9 Available! --~--~-~--~~~---~--~~ 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: XMPP through Smack
Hi Have you tried this ? http://davanum.wordpress.com/2007/12/31/android-just-use-smack-api-for-xmpp/ -Peter On Sun, Dec 28, 2008 at 10:42 AM, Tez wrote: > > Hi, > > Even i am having problems in getting the Smack API to work on Android. > I heard that u need to use a patched version of the original > smack.jar, however, i've had no luck in getting that file also. I am > trying to use JSO(Jabber Stream Objects). Hopefully that won't have as > many problems. :) > > Cheers, > Earlence Fernandes > > > On Dec 28, 7:45 am, jman wrote: > > After reading many previous posts about XMPP, I am still not sure if > > anyone actually got XMPP to work for the official SDK 1.0. > > > > I had trouble receiving any message. From the logs, I saw this: > > > > 12-27 19:43:14.866: WARN/System.err(225): > > java.security.KeyStoreException: KeyStore jks implementation not found > > > > This origin is from Smack's PacketReader and I read a post about > > installing the "cacerts" fiel as follows: > > > > String javaHome = System.getProperty("java.home"); > > StringBuffer buffer = new StringBuffer(); > > buffer.append(javaHome).append(File.separator).append("lib"); > > buffer.append(File.separator).append("security"); > > buffer.append(File.separator).append("cacerts"); > > config.setTruststorePath(buffer.toString()); > > config.setTruststoreType("jks"); > > config.setTruststorePassword("changeit"); > > > > This didn't seem to solve the problem on Windows while it could help > > those on Linux.Can anyone provide any ideas to proceed? > > > > 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: disable home button
That's because SetupWizard is considered to be the Home screen at boot time, so pressing Home just brings the SetupWizard back. On Sun, Dec 28, 2008 at 9:42 AM, sherifffruitfly wrote: > > Yes it is possible. Setup Wizard achieves the goal, and NOT in the way > that Toddler Lock does. > > Setup Wizard genuinely makes the Home Button do *nothing* when it > starts, and then enables it when it completes. > > > -sff > > > > On Nov 10, 3:18 pm, zl25drexel wrote: >> anyone knows how to disable thehomebuttonlike the toddler lock app >> did? >> >> I put that app on debug, it looks like it restarts itself every time >> thehomebuttonis pressed. I was able kind of reproducing that by >> issuing a pendingintent in the onstop method, the problem is that is >> will show the desktop for about half of a sec because the pending >> activity got launched. Is there an other way to lock thehomebutton? > > > -- 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: XMPP through Smack
Hi, Even i am having problems in getting the Smack API to work on Android. I heard that u need to use a patched version of the original smack.jar, however, i've had no luck in getting that file also. I am trying to use JSO(Jabber Stream Objects). Hopefully that won't have as many problems. :) Cheers, Earlence Fernandes On Dec 28, 7:45 am, jman wrote: > After reading many previous posts about XMPP, I am still not sure if > anyone actually got XMPP to work for the official SDK 1.0. > > I had trouble receiving any message. From the logs, I saw this: > > 12-27 19:43:14.866: WARN/System.err(225): > java.security.KeyStoreException: KeyStore jks implementation not found > > This origin is from Smack's PacketReader and I read a post about > installing the "cacerts" fiel as follows: > > String javaHome = System.getProperty("java.home"); > StringBuffer buffer = new StringBuffer(); > buffer.append(javaHome).append(File.separator).append("lib"); > buffer.append(File.separator).append("security"); > buffer.append(File.separator).append("cacerts"); > config.setTruststorePath(buffer.toString()); > config.setTruststoreType("jks"); > config.setTruststorePassword("changeit"); > > This didn't seem to solve the problem on Windows while it could help > those on Linux. Can anyone provide any ideas to proceed? > > 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: change gmail addres on phone
Thanks! On 26 Dez., 15:11, freedom wrote: > 'MENU->Settings->SD card & phone storage->Factory data reset' then > restart your phone > > On Dec 26, 9:57 pm,ipalik wrote: > > > Hello! > > Is it possible to change the mail adress, i typed in the first sign in > > of the phone? > > I mean the adress, when i turn on the phone. there i have to type in > > my gmail adress. ist ist possible to change this adress? > > > 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] Can one not use @+id with ArrayAdapter layout XML file?
Not using @+id through ArrayAdapter MyList = new ArrayAdapter(this, R.layout.mylist); works fine, but using @+id through ArrayAdapter MyList = new ArrayAdapter(this, R.id.mylist); does not, where my mylist.xml reads http://schemas.android.com/apk/res/android"; android:layout_width="fill_parent" android:layout_height="wrap_content" android:textAppearance="?android:attr/textAppearanceLarge" android:gravity="center_vertical" android:paddingLeft="6dip" android:minHeight="?android:attr/listPreferredItemHeight" android:id="@+id/mylist" /> It all compiles just fine, but at runtime I get ERROR/AndroidRuntime(1356): android.content.res.Resources $NotFoundException: Resource ID #0x7f06001a type #0x12 is not valid Am I missing some conceptual issue with the use of ArrayAdapter or the way @+id gets expanded? Of course I can just use R.layout.mylist, but it feels a bit inconsistent as I use the R.id referencing in my source code with many other items (albeit through findViewById()). 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: Synchronizing Maps and Map Overlays - ConcurrentModificationException
Please stop bumping this, if you're not getting replies it's because people are unable or unwilling to help and "bumping" will just annoy people. Al. mscwd01 wrote: > hmmm, bump. Still havent worked this out. > > On Dec 26, 11:59 pm, mscwd01 wrote: > >> Okay, hope everyone had a nice christmas and has had their fill of >> Turkey ;) >> Now can anyone help me with this? >> >> On Dec 24, 11:53 am,mscwd01 wrote: >> >> >>> Hello, anyone help me with this please... >>> >>> On Dec 24, 12:42 am,mscwd01 wrote: >>> I am getting the following exception: 12-24 00:29:25.922: ERROR/AndroidRuntime(267): Uncaught handler: thread main exiting due to uncaught exception 12-24 00:29:25.960: ERROR/AndroidRuntime(267): java.util.ConcurrentModificationException 12-24 00:29:25.960: ERROR/AndroidRuntime(267): at java.util.AbstractList$SimpleListIterator.next(AbstractList.java:59) 12-24 00:29:25.960: ERROR/AndroidRuntime(267): at com.google.android.maps.OverlayBundle.draw(OverlayBundle.java:41) 12-24 00:29:25.960: ERROR/AndroidRuntime(267): at com.google.android.maps.MapView.onDraw(MapView.java:454) I believe this is whats happening: I have a MapView with a few Map Overlays (simple markers), occasionally the locations of the markers change so I clear the map overlays using: "map.getOverlays().clear()" and insert new marker overlays onto the map. However, if I happen to be moving the map, or zooming the map when the update occurs I get the above ConcurrentModificationException. I tried synchronizing on the map overlay list, like: synchronized (map.getOverlays()) { // clear and update overlays } However I still get the above exception. Can someone explain the correct way to clear overlays on a map and to repopulate them without encountering ConcurrentModification Exceptions. Oh and I am calling: "map.postInvalidate()" to "refresh" the map and display the changes made to the overlays. Is this the correct way to "repaint" a map? 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: disable home button
Yes it is possible. Setup Wizard achieves the goal, and NOT in the way that Toddler Lock does. Setup Wizard genuinely makes the Home Button do *nothing* when it starts, and then enables it when it completes. -sff On Nov 10, 3:18 pm, zl25drexel wrote: > anyone knows how to disable thehomebuttonlike the toddler lock app > did? > > I put that app on debug, it looks like it restarts itself every time > thehomebuttonis pressed. I was able kind of reproducing that by > issuing a pendingintent in the onstop method, the problem is that is > will show the desktop for about half of a sec because the pending > activity got launched. Is there an other way to lock thehomebutton? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---