[android-developers] Re: how to achieve the accuracy of google navigation
I can see how extrapolating would yield good results if you have a small delay between reported position real position, e.g. the 1s update rate of most GPS receivers. What I can't see however, is how you could make that work with larger delays, especially for large accelerations. Say for example you drive on a straight road at 3m/s, accelerate with 2m/s2, and we exampime multiple delays. We can extrapolate from the last known location at constant speed over that delay and compare position to where we really are. 1s delay: const speed: 3m reality: 4m error: 33% 2s delay const speed: 6m reality: 10m error: 66% 4s delay: const speed: 12m reality: 28m error: 133% I've measured delays varying from 1 to 4 seconds several times, and yet Google Nav manages to position the car at the exact location. It can't use map data to correct its position, since we're on a straight road. So that must mean that it uses sensor data, right? Or am I missing something? On 08/03/2012 08:47 PM, Nadeem Hasan wrote: That would be extrapolation. And that is actually the exact reason why the GPS lags on exits if they are off-route because it has extrapolated your position based on your route till the next actual GPS location update arrives. I have seen this behaviour with my Garmin device too when I decide not to follow the route. On Friday, August 3, 2012 11:46:45 AM UTC-4, Nobu Games wrote: I'd go for interpolation and take the current average speed and the structure of the streets into account. That of course only works when you have something like a graph / vector representation of the streets and know how they are connected and what orientation they have. It is also pretty common that even Google Navigation is off, especially on highways with exits. Sometimes the navigation draws the car following the highway even though you are already leaving on an exit. On Wednesday, August 1, 2012 9:18:33 AM UTC-5, bushido wrote: Hi all, I'm writing an application for android for which I need good position accuracy, I use a Galaxy Nexus as test device. My test application subscribes to location updates and draws a car symbol in a map, the map is centered to the location of the car rotates according to the bearing of the location (exactly like google maps on android does). I noticed that when up to speed, the positions don't match with reality, they lag behind considerably. When I cross a street at 90km/h for example, it will take a few seconds before the car on the map is also crossing that street. It isn't an error in the map data, because when I'm standing still, the car gets drawn on the correct location. Google maps for android shows exactly the same behavior. The position of the car in Google Navigate on the other hand matches reality rather closely. I've noticed that the position updates are a lot smoother as well. (10Hz rather than the 1Hz updates which you get from GPS) My question is: how do they do it? What I can think of is: - using the phone's sensors (gyro accelero) together with a kalman filter or similar. But I can't see how you could make that work for every phone, since not all phones have these sensors. - interpolating, but in that case I would expect overshooting when there is a sudden stop or a sharp corner Thanks in advance. Bushido -- 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] Contact API problem with save datas Options
I'm facing a basic problem but i didn't find any tutorial in order to help me... I'm writing an application with sort of backup contact options. I want that my applications works for android phones since 1.5 to 2.2 So i write a two implementation of ContactApi, one for 1.5, 1.6 and an other for new api version. Here is the list of problem I'm facing with. With new api, nothing. All works fine, backing up contacts works well. But with older api I'm not able to backing up some datas : Email Datas (able to read, but not able to save) IM datas (able to read, but not able to save) Notes (able to read the first note, if many notes, I lost datas, same things for backup) Here is the code I'm using : ===EMAIL=== private ArrayListEmail getEmailAddresses(String id) { ArrayListEmail emails = new ArrayListEmail(); Cursor emailCur = this.contentResolver.query(Contacts.ContactMethods.CONTENT_EMAIL_URI, null, Contacts.ContactMethods.PERSON_ID + = ?, new String[] { id }, null); Email email = null; while (emailCur.moveToNext()) { // This would allow you get several email addresses email = new Email(); email.setData(emailCur.getString(emailCur.getColumnIndex(Contacts.ContactMe thods.DATA))); email.setType(emailCur.getInt(emailCur.getColumnIndex(Contacts.ContactMetho ds.TYPE))); email.setLabel(emailCur.getString(emailCur.getColumnIndex(Contacts.PeopleCo lumns.NAME))); emails.add(email); } emailCur.close(); return emails; } private void saveEmailAddresses(ContentUris contactUri, ListEmail emailList, String id) { if (emailList != null emailList.size() 0) { ContentValues values = null; ContentValues[] valueArray = new ContentValues[emailList.size()]; int i = 0; for (Email email : emailList) { values = new ContentValues(); values.put(Contacts.ContactMethods.PERSON_ID, id); // values.put(Contacts.ContactMethods.KIND, Contacts.KIND_EMAIL); // values.put(Contacts.ContactMethods.DATA, email.getData()); // values.put(Contacts.ContactMethods.TYPE, email.getType()); // values.put(Contacts.PeopleColumns.NAME, email.getLabel()); // valueArray[i] = values; i++; } contentResolver.bulkInsert(Contacts.ContactMethods.CONTENT_EMAIL_URI, valueArray); } } IM adress= private ArrayListIM getIM(Cursor cur, String id) { ArrayListIM imList = new ArrayListIM(); String where = Contacts.ContactMethods.PERSON_ID + = ? AND + Contacts.ContactMethods.KIND + = ?; String[] whereParameters = new String[] { id, String.valueOf(Contacts.KIND_IM) }; Cursor imCur = this.contentResolver.query(Contacts.ContactMethods.CONTENT_URI, null, where, whereParameters, null); IM im = null; while (imCur.moveToNext()) { try { String imName = imCur.getString(imCur.getColumnIndex(Contacts.ContactMethodsColumns.DATA)); im = new IM(); im.setName(imName); im.setType(imCur.getInt(imCur.getColumnIndex(Contacts.ContactMethodsColumns .TYPE))); im.setProtocol(cur.getString(imCur.getColumnIndex(Contacts.ContactMethods.A UX_DATA))); imList.add(im); } catch (Exception e) { Log.e(where, Error im : , e); } } imCur.close(); return imList; } private void saveIM(ListIM imList, String id) { if (imList != null imList.size() 0) { ContentValues values = null; ContentValues[] valueArray = new ContentValues[imList.size()]; int i = 0; for (IM im : imList) { values = new ContentValues(); values.put(Contacts.ContactMethods.PERSON_ID, id); // values.put(Contacts.ContactMethods.KIND, Contacts.KIND_IM); // values.put(Contacts.ContactMethodsColumns.DATA, im.getName()); // values.put(Contacts.ContactMethods.AUX_DATA, ContactMethods.encodeCustomImProtocol(im.getProtocol())); // values.put(Contacts.ContactMethodsColumns.TYPE, im.getType()); // valueArray[i] = values; i++; } contentResolver.bulkInsert(Contacts.ContactMethods.CONTENT_URI, valueArray); } } ==Notes === I have no idea how to get all notes ?
[android-developers] Contact API problem with save datas
Hello I'm facing a basic problem but i didn't find any tutorial in order to help me... I'm writing an application with sort of backup contact options. I want that my applications works for android phones since 1.5 to 2.2 So i write a two implementation of ContactApi, one for 1.5, 1.6 and an other for new api version. Here is the list of problem I'm facing with. With new api, nothing. All works fine, backing up contacts works well. But with older api I'm not able to backing up some datas : * Email Datas (able to read, but not able to save) * IM datas (able to read, but not able to save) * Notes (able to read the first note, if many notes, I lost datas, same things for backup) Here is the code I'm using : ===EMAIL=== private ArrayListEmail getEmailAddresses(String id) { ArrayListEmail emails = new ArrayListEmail(); Cursor emailCur = this.contentResolver.query(Contacts.ContactMethods.CONTENT_EMAIL_URI, null, Contacts.ContactMethods.PERSON_ID + = ?, new String[] { id }, null); Email email = null; while (emailCur.moveToNext()) { // This would allow you get several email addresses email = new Email(); email.setData(emailCur.getString(emailCur.getColumnIndex(Contacts.ContactMethods.DATA))); email.setType(emailCur.getInt(emailCur.getColumnIndex(Contacts.ContactMethods.TYPE))); email.setLabel(emailCur.getString(emailCur.getColumnIndex(Contacts.PeopleColumns.NAME))); emails.add(email); } emailCur.close(); return emails; } private void saveEmailAddresses(ContentUris contactUri, ListEmail emailList, String id) { if (emailList != null emailList.size() 0) { ContentValues values = null; ContentValues[] valueArray = new ContentValues[emailList.size()]; int i = 0; for (Email email : emailList) { values = new ContentValues(); values.put(Contacts.ContactMethods.PERSON_ID, id); // values.put(Contacts.ContactMethods.KIND, Contacts.KIND_EMAIL); // values.put(Contacts.ContactMethods.DATA, email.getData()); // values.put(Contacts.ContactMethods.TYPE, email.getType()); // values.put(Contacts.PeopleColumns.NAME, email.getLabel()); // valueArray[i] = values; i++; } contentResolver.bulkInsert(Contacts.ContactMethods.CONTENT_EMAIL_URI, valueArray); } } IM adress= private ArrayListIM getIM(Cursor cur, String id) { ArrayListIM imList = new ArrayListIM(); String where = Contacts.ContactMethods.PERSON_ID + = ? AND + Contacts.ContactMethods.KIND + = ?; String[] whereParameters = new String[] { id, String.valueOf(Contacts.KIND_IM) }; Cursor imCur = this.contentResolver.query(Contacts.ContactMethods.CONTENT_URI, null, where, whereParameters, null); IM im = null; while (imCur.moveToNext()) { try { String imName = imCur.getString(imCur.getColumnIndex(Contacts.ContactMethodsColumns.DATA)); im = new IM(); im.setName(imName); im.setType(imCur.getInt(imCur.getColumnIndex(Contacts.ContactMethodsColumns.TYPE))); im.setProtocol(cur.getString(imCur.getColumnIndex(Contacts.ContactMethods.AUX_DATA))); imList.add(im); } catch (Exception e) { Log.e(where, Error im : , e); } } imCur.close(); return imList; } private void saveIM(ListIM imList, String id) { if (imList != null imList.size() 0) { ContentValues values = null; ContentValues[] valueArray = new ContentValues[imList.size()]; int i = 0; for (IM im : imList) { values = new ContentValues(); values.put(Contacts.ContactMethods.PERSON_ID, id); // values.put(Contacts.ContactMethods.KIND, Contacts.KIND_IM); // values.put(Contacts.ContactMethodsColumns.DATA, im.getName()); // values.put(Contacts.ContactMethods.AUX_DATA, ContactMethods.encodeCustomImProtocol(im.getProtocol())); //
[android-developers] Re: Some confusion on resource IDs
You can declare IDs in your res/values/resources.xml file, like this: resources item type=id name=common_control_01/ item type=id name=common_control_02/ /resources Then, refer to the id in your layout simply with @id/common_control_01 If you have a bunch of common IDs, this might be a good approach. Regards, Jef On Aug 24, 3:02 pm, Mark Murphy mmur...@commonsware.com wrote: On Tue, Aug 24, 2010 at 5:06 PM, Doug Gordon gordo...@gmail.com wrote: I'm just getting into developing my app, which will have quite a number of activities and thus quite a few XML files to lay out the screens and define all the views. What I'm just seeing is that if I assign the IDs using @+id/name, I'll have to have a unique name for every widget on every screen since all the symbols get defined in one big R.java file. Or can I just generate the definitions once in one of the XML files and then reference them in the other layout files? For example, if I have a TextView that I'd like to call surname in multiple layout files, can I declare it one of the files using @+id/surname and then simply use @id/surname in the other files? I assume that as long as all the IDs are unique within a layout file, all is OK. No, you can't declare it that way. However, if you use @+id/surname multiple times, only one R.id.surname entry goes in R.java. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 3.1 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: Displaying parameterized text in AlertDialog
WIth managed dialogs, onCreateDialog is called only the first time the dialog is shown. If you want to show the dialog again and display a message that's different from when the dialog was created, override onPrepareDialog and call setMessage from there (based on the dialog's id if necessary). HTH, Jef On Aug 4, 1:49 pm, Kostya Vasilyev kmans...@gmail.com wrote: Andreas, public AlertDialog.Builder setMessage (CharSequence message) Since API level 1. Does this not work for you? -- Kostya 04.08.2010 18:17, livinberlin пишет: Hi everyone, I have a problem with AlertDialogs that seems to be simple, but which puzzles me for quite a while now. I'd like to show the user an AlertDialog with varying messages (for example, Number of files: some number). I tried different approaches, but none worked for me. When using managed dialogs, I can only pass a dialog id to onCreateDialog (I know this was fixed in API level 8, but I need compatibility with API level 3). I cannot pass text parameters such as some number. So this approach seems to work for static messages only. When creating and showing the AlertDialog on my own, I have to explicitly dismiss the dialog in the Activity method onDestroy (otherwise I'd get a window leaked error). With this approach I would have to store references to all open dialogs in an activity, which seems too tedious for such a simple task. Another problem is that I would have to implement dialog persistence at configuration changes on my own. Did I miss something? Thanks for any response Andreas Glausch -- Kostya Vasilev -- WiFi Manager + pretty widget --http://kmansoft.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] Re: Activities and Multiple Views
You can override the onKey... methods in your Activity and any keystrokes not handled by the views in your activity will fall through to the Activity. Does this help? Regards, Jef On Aug 3, 3:31 am, Revathi K J Ramanan revathiramana...@gmail.com wrote: Hi, I start a browser and from the browser,I start a video which occupies only a small part of the screen,say the bottom right corner. Now the browser will be pushed to the 2nd position in the window order and Video will come to the first position. Is it possible that browser can have the control for active window and receive the key events though the video is the Top Most window. Please help me out. Thanks in advance. Regards, Revathi K J -- 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: Question about contact management (register and lookUpKey)
I Finally found a solution for the second problem : I was creating the contact in severals times (create RawContact and add all data of contact after) So yet I'm using this code : ArrayListContentProviderOperation ops = new ArrayListContentProviderOperation(); ops.add(ContentProviderOperation.newInsert(ContactsContract.RawContacts.CONTENT_URI) // / .withValue(ContactsContract.RawContacts.ACCOUNT_TYPE, contact.getAccounts().get(0)[0]) // .withValue(ContactsContract.RawContacts.ACCOUNT_NAME, contact.getAccounts().get(0)[1]) // .build()); ops.add(ContentProviderOperation.newInsert(ContactsContract.Data.CONTENT_URI) // .withValueBackReference(ContactsContract.Data.RAW_CONTACT_ID, 0) // .withValue(ContactsContract.Data.MIMETYPE, ContactsContract.CommonDataKinds.StructuredName.CONTENT_ITEM_TYPE) // .withValue(ContactsContract.CommonDataKinds.StructuredName.DISPLAY_NAME, contact.getDisplayName()) // .build()); if (contact.getPhone() != null contact.getPhone().size() 0) { for (Phone phone : contact.getPhone()) { ops.add(ContentProviderOperation.newInsert(ContactsContract.Data.CONTENT_URI) // .withValueBackReference(ContactsContract.Data.RAW_CONTACT_ID, 0) // .withValue(ContactsContract.Data.MIMETYPE, ContactsContract.CommonDataKinds.Phone.CONTENT_ITEM_TYPE) // .withValue(ContactsContract.CommonDataKinds.Phone.NUMBER, phone.getNumber()) // .withValue(ContactsContract.CommonDataKinds.Phone.TYPE, phone.getType()) // .withValue(ContactsContract.CommonDataKinds.Phone.LABEL, phone.getLabel()) // .build()); } } And now I have a lookupKey valuated :) ! On 10 mai, 14:08, jef jean.francois.garr...@gmail.com wrote: Hello I'm a newbie with manipulation of Contact API I would create an application that saved a references to chosen contacts and create nex contacts. So I first think of contact id but i have read that it was a bad idea and the lookupkey was here for that ! So I try to play with lookupKey and i'm facing some little problems... First : I choose a contact to saved, I did it by getting it's lookUpKey : no problem. I try to access later to contact with it's lookUpKey : no problem. I go to contact native application, I change the first name of the choosen contact. I go in my application an try to access to choosen contact with saved lookUpKey : problem, the contact lookUpKey has changed because I change the first name... Is there a way to have a unique access to a contact ? Or I was imagine to register to modification done on my contact ? How could I solve my problem ? Second : I created a contact with this code : ContentValues values = new ContentValues(); Uri rawContactUri = cr.insert(ContactsContract.RawContacts.CONTENT_URI, values); long rawContactId = ContentUris.parseId(rawContactUri); this.cur = this.cr.query(rawContactUri, new String[] { ContactsContract.RawContacts.CONTACT_ID }, null, null, null); String id = null; if (this.cur.moveToFirst()) { id = cur.getString(cur.getColumnIndex(ContactsContract.RawContacts.CONTACT_ID)); this.cur = this.cr.query(ContactsContract.Contacts.CONTENT_URI, null, ContactsContract.Contacts._ID + = ?, new String[] { id }, null); if (this.cur.moveToFirst()) { Log.i(ContactAPI5, LookUpCreate : + cur.getString(cur.getColumnIndex(ContactsContract.Contacts.LOOKUP_KEY))); } else { Log.i(ContactAPI5, no contact created); } } And for these code, the result of lookUpKey is always an empty string. Why do I have an empty string ? Best regards -- 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 athttp://groups.google.com/group/android-developers?hl=en -- 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] Question about contact management (register and lookUpKey)
Hello I'm a newbie with manipulation of Contact API I would create an application that saved a references to chosen contacts and create nex contacts. So I first think of contact id but i have read that it was a bad idea and the lookupkey was here for that ! So I try to play with lookupKey and i'm facing some little problems... First : I choose a contact to saved, I did it by getting it's lookUpKey : no problem. I try to access later to contact with it's lookUpKey : no problem. I go to contact native application, I change the first name of the choosen contact. I go in my application an try to access to choosen contact with saved lookUpKey : problem, the contact lookUpKey has changed because I change the first name... Is there a way to have a unique access to a contact ? Or I was imagine to register to modification done on my contact ? How could I solve my problem ? Second : I created a contact with this code : ContentValues values = new ContentValues(); Uri rawContactUri = cr.insert(ContactsContract.RawContacts.CONTENT_URI, values); long rawContactId = ContentUris.parseId(rawContactUri); this.cur = this.cr.query(rawContactUri, new String[] { ContactsContract.RawContacts.CONTACT_ID }, null, null, null); String id = null; if (this.cur.moveToFirst()) { id = cur.getString(cur.getColumnIndex(ContactsContract.RawContacts.CONTACT_ID)); this.cur = this.cr.query(ContactsContract.Contacts.CONTENT_URI, null, ContactsContract.Contacts._ID + = ?, new String[] { id }, null); if (this.cur.moveToFirst()) { Log.i(ContactAPI5, LookUpCreate : + cur.getString(cur.getColumnIndex(ContactsContract.Contacts.LOOKUP_KEY))); } else { Log.i(ContactAPI5, no contact created); } } And for these code, the result of lookUpKey is always an empty string. Why do I have an empty string ? Best regards -- 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: ExpandableListView indicator over my text
Ok works fine ! thanks On 2 déc, 18:38, Romain Guy romain...@android.com wrote: You are setting the padding to be 36 pixels, which is going to be too small on a high density display. On high density displays, Android scales assets/dimensions/etc. up by 1.5, meaning a 20x20 image becomes 30x30. You should NEVER use hard coded pixel values precisely for that reason. The easiest solution for you is to define your generic view inside an XML layout file and inflate it at runtime. And make sure to use the dip unit when specifying the padding or the height of the generic view (your height of 64 will also be an issue on a high density display.) On Wed, Dec 2, 2009 at 8:44 AM, jef jean.francois.garr...@gmail.com wrote: I'm using anExpandableListViewin one of my activity in a RelativeLayout ?xml version=1.0 encoding=utf-8? RelativeLayout xmlns:android=http://schemas.android.com/apk/res/ android android:layout_width=fill_parent android:layout_height=fill_parent ... Button android:id=@+id/searchNearBtnSearch android:layout_width=wrap_content android:layout_height=wrap_content android:text=@string/search android:layout_centerHorizontal=true android:layout_below=@id/searchNearSpinner android:background=@drawable/btn_and_showtime / ExpandableListView android:id=@+id/searchNearListResult android:layout_width=fill_parent android:layout_height=fill_parent android:layout_below=@id/searchNearBtnSearch / /RelativeLayout and I'm using a custom expandableListAdaptaer which group view is : public TextView getGenericView() { // Layout parameters for theExpandableListView AbsListView.LayoutParams lp = new AbsListView.LayoutParams( // ViewGroup.LayoutParams.FILL_PARENT, 64); TextView textView = new TextView(mainContext); textView.setLayoutParams(lp); // Center the text vertically textView.setGravity(Gravity.CENTER_VERTICAL | Gravity.LEFT); // Set the text starting position textView.setPadding(36, 0, 0, 0); return textView; } (Found on examples of API_Demos, ExpandableList1) A user of my application report me this photo http://binomed-android-project.googlecode.com/issues/attachment?aid=-... As you can see, the indicator of group items is over the text of group item despite the padding of 36... And if I'm running emulator WVGA800 or an emulator with abstracted LCD density to 240 I have the same problem, but with my phone (HTC G1), I don't have any problem. What is strange is that I try the application API_Demo with an emulator WVGA800 or an emulator with abstracted LCD density to 240 and I go to ExpandableList1 activity and all is alright ! I also try to copy the inner class available in ExpandableList1 for adapter and I launch it into my activity and I also have the problem see on photo What I am doing wrong... ? I am forced to manage density into my adapters in order to adjust the padding ? -- 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 -- 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] ExpandableListView indicator over my text
I'm using an ExpandableListView in one of my activity in a RelativeLayout ?xml version=1.0 encoding=utf-8? RelativeLayout xmlns:android=http://schemas.android.com/apk/res/ android android:layout_width=fill_parent android:layout_height=fill_parent ... Button android:id=@+id/searchNearBtnSearch android:layout_width=wrap_content android:layout_height=wrap_content android:text=@string/search android:layout_centerHorizontal=true android:layout_below=@id/searchNearSpinner android:background=@drawable/btn_and_showtime / ExpandableListView android:id=@+id/searchNearListResult android:layout_width=fill_parent android:layout_height=fill_parent android:layout_below=@id/searchNearBtnSearch / /RelativeLayout and I'm using a custom expandableListAdaptaer which group view is : public TextView getGenericView() { // Layout parameters for the ExpandableListView AbsListView.LayoutParams lp = new AbsListView.LayoutParams( // ViewGroup.LayoutParams.FILL_PARENT, 64); TextView textView = new TextView(mainContext); textView.setLayoutParams(lp); // Center the text vertically textView.setGravity(Gravity.CENTER_VERTICAL | Gravity.LEFT); // Set the text starting position textView.setPadding(36, 0, 0, 0); return textView; } (Found on examples of API_Demos, ExpandableList1) A user of my application report me this photo http://binomed-android-project.googlecode.com/issues/attachment?aid=-2990980965246303896name=AndroidShowtime.jpg As you can see, the indicator of group items is over the text of group item despite the padding of 36... And if I'm running emulator WVGA800 or an emulator with abstracted LCD density to 240 I have the same problem, but with my phone (HTC G1), I don't have any problem. What is strange is that I try the application API_Demo with an emulator WVGA800 or an emulator with abstracted LCD density to 240 and I go to ExpandableList1 activity and all is alright ! I also try to copy the inner class available in ExpandableList1 for adapter and I launch it into my activity and I also have the problem see on photo What I am doing wrong... ? I am forced to manage density into my adapters in order to adjust the padding ? -- 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: about close Location Manager service
I have the same problem or I don't understand how to stop listening location change. I have a G1 and mLocationManager01.removeUpdates (mLocationListener01); work well but in emulator in version 1.6 and 2.0 the gps doesn't stop... And someone report me the same issue concerning my application with droid phone What I am doing wrong ? On 19 nov, 23:30, Hong lordh...@gmail.com wrote: er... so nothing we can do about it? was it on the G1? On Wed, Nov 18, 2009 at 3:20 AM, tstanly tsai.sta...@gmail.com wrote: finally I find that it's a gps driver issue. On 11月17日, 上午2時57分, Hong lordh...@gmail.com wrote: can u be more specific? what driver issue? i seem to have the same problem. thanks On Mon, Jul 27, 2009 at 12:49 AM, tstanly tsai.sta...@gmail.com wrote: sorry, I found that is the driver issue. On 7月27日, 上午11時22分, tstanly tsai.sta...@gmail.com wrote: hi all, it' so strange about close gps location manager, the gps signal dosen't stop. my code is: ==code=== public class g extends MapActivity{ private LocationManager mLocationManager01; �...@override protected void onCreate(Bundle savedInstanceState) { mLocationManager01 = (LocationManager)getSystemService (Context.LOCATION_SERVICE); . }} and my stop code is: mLocationManager01.removeUpdates(mLocationListener01);//stop gps service however, this stop code I write into the onDetroy(),onPause(),onStop(),finish (), but sometimes the gps signal will not stop expectly. something wrong?? 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 -~--~~~~--~~--~--~--- -- 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.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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