Re: [android-beginners] Re: Question about UI Handling
Hi Indicator, I thought what I said was clear. The essence of what I wanted to convey was that there are many UI screens. And there is a navigation possible between these different screens on specific user input e.g. - a button click. I did get my answer as multiple activities and using startActivity(). Anyways, thanks for your reply. Karthik. On Sat, Apr 24, 2010 at 7:05 PM, Indicator Veritatis wrote: > Well, of course the docs will not be clear on that, as YOU are not > very clear on it. What is "continuous different UI screens moving > around with the user input" supposed to MEAN? Usually, you want a UI > screen to stay in one place while it has focus so that the user CAN > enter data. But you seem to want it to move around while it has focus. > > If not, what DO you mean? > > On Apr 23, 9:51 am, Karthik Ravi Shankar > wrote: > > Hi, > > > > Thanks for the reply for my previous questions guys! I have one very > basic > > question. In my application I am trying to have continous different UI > > screens moving around with the user input. I am looking into the > > Android.Reference still, but not able to gather much. I am not very clear > as > > to how to go about it. Has anybody done this before ? Can anybody let me > > know ? > > > > Thanks in advance. > > > > Thanks, > > Karthik R > > Graduate Student > > Computer Science Department > > UCLA > > > > -- > > You received this message because you are subscribed to the Google > > Groups "Android Beginners" group. > > > > NEW! Try asking and tagging your question on Stack Overflow athttp:// > stackoverflow.com/questions/tagged/android > > > > To unsubscribe from this group, send email to > > android-beginners+unsubscr...@googlegroups.com > > For more options, visit this group athttp:// > groups.google.com/group/android-beginners?hl=en > > -- > You received this message because you are subscribed to the Google > Groups "Android Beginners" group. > > NEW! Try asking and tagging your question on Stack Overflow at > http://stackoverflow.com/questions/tagged/android > > To unsubscribe from this group, send email to > android-beginners+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/android-beginners?hl=en > -- Karthik R Graduate Student Computer Science Department UCLA -- You received this message because you are subscribed to the Google Groups "Android Beginners" group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en
[android-beginners] Re: Question about UI Handling
Well, of course the docs will not be clear on that, as YOU are not very clear on it. What is "continuous different UI screens moving around with the user input" supposed to MEAN? Usually, you want a UI screen to stay in one place while it has focus so that the user CAN enter data. But you seem to want it to move around while it has focus. If not, what DO you mean? On Apr 23, 9:51 am, Karthik Ravi Shankar wrote: > Hi, > > Thanks for the reply for my previous questions guys! I have one very basic > question. In my application I am trying to have continous different UI > screens moving around with the user input. I am looking into the > Android.Reference still, but not able to gather much. I am not very clear as > to how to go about it. Has anybody done this before ? Can anybody let me > know ? > > Thanks in advance. > > Thanks, > Karthik R > Graduate Student > Computer Science Department > UCLA > > -- > You received this message because you are subscribed to the Google > Groups "Android Beginners" group. > > NEW! Try asking and tagging your question on Stack Overflow > athttp://stackoverflow.com/questions/tagged/android > > To unsubscribe from this group, send email to > android-beginners+unsubscr...@googlegroups.com > For more options, visit this group > athttp://groups.google.com/group/android-beginners?hl=en -- You received this message because you are subscribed to the Google Groups "Android Beginners" group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en
[android-beginners] Re: Question about UI Handling
Look for a simple example to get you started in the SDK: http://developer.android.com/guide/samples/index.html Understand the basics of the Activity class and how you go from one Activity instance to another, which you will find in the first half of this page: http://developer.android.com/guide/topics/fundamentals.html And here is a more-recent document that goes into greater depth on how Android UI flow should work: http://developer.android.com/guide/practices/ui_guidelines/activity_task_design.html -- You received this message because you are subscribed to the Google Groups "Android Beginners" group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en
[android-beginners] Re: Question About Audio and Sources
A search in market for 'volume control' gave a half dozen free apps. Check those out and try to add some feature? -- You received this message because you are subscribed to the Google Groups "Android Beginners" group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en To unsubscribe, reply using "remove me" as the subject.
[android-beginners] Re: Question regarding Contact Application [Android SDK 2.1]
Any clue please. - AJ On Apr 3, 10:17 pm, AJ wrote: > Hi Group, > > I want to launch Contact application with some fields filled with data > I have passed from my application. > > I am able to pass Name, Phone number and Emails. But the problem is :- > > 1- I am not able to pass more that 3 phone number. How Can I do that? > 2- I am not able to pass Fields in the more section, which is an > expandabale list. How can I pass to the fields which are present in > more section > 3- I am also ot able to pass Postal Address and Organization. > > Can anybody please tell me the correct Intent for those? > > My code is as follows :- > > > Intent i = new Intent(Intent.ACTION_INSERT,People.CONTENT_URI); > > i.putExtra(ContactsContract.Intents.Insert.NAME, "Android"); > i.putExtra(ContactsContract.Intents.Insert.PHONE, "11"); > > i.putExtra(ContactsContract.Intents.Insert.PHONE_TYPE,ContactsContract.CommonDataKinds.Phone.TYPE_MOBILE); > > i.putExtra(ContactsContract.Intents.Insert.SECONDARY_PHONE, > "22"); > > i.putExtra(ContactsContract.Intents.Insert.SECONDARY_PHONE_TYPE,ContactsContract.CommonDataKinds.Phone.TYPE_HOME); > > i.putExtra(ContactsContract.Intents.Insert.TERTIARY_PHONE, "33"); > > i.putExtra(ContactsContract.Intents.Insert.TERTIARY_PHONE_TYPE,ContactsContract.CommonDataKinds.Phone.TYPE_WORK); > > > > Thanks, > AJ -- You received this message because you are subscribed to the Google Groups "Android Beginners" group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en To unsubscribe, reply using "remove me" as the subject.
[android-beginners] Re: question about intents
ok, I"ve been searching around and I think I get a little bit of it - Intent(Intent.ACTION_EDIT,Uri.parse("record")); sends an intent out and the soundrecorder picks it up - as far as I can tell there's no explicit call to soundrecorder, but it is the only item in teh system with an intent listener for ACTION_EDIT and the "record" URI - still not positive on the details though so any help is appreciated, thanks. On Dec 6, 11:45 am, j p wrote: > ringdroid uses this code in it's record button, can anyone explain > what this is doing, I don't see where the soundrecorder is called > explicitly > > private void onRecord() { > try { > Intent intent = new Intent(Intent.ACTION_EDIT, Uri.parse > ("record")); > intent.putExtra("was_get_content_intent", > mWasGetContentIntent); > intent.setClassName > ("com.ringdroid","com.ringdroid.RingdroidEditActivity"); > startActivityForResult(intent, REQUEST_CODE_EDIT);} > > catch (Exception e) { > Log.e("Ringdroid", "Couldn't start editor");} > } -- You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en
[android-beginners] Re: Question about app widgets
Thanks you Mark, It worked. Regards Carl On Wed, Oct 14, 2009 at 8:27 AM, Mark Murphy wrote: > > Carl wrote: > > I would like to ask if it is possible to put 2 widgets in the same > > application. In other words, having one project, with one manifest.xml > > file and making 2 different widgets in the the same project. > > AFAIK, yes. > > > In the case that it is possible, when there is an intent > > android.appwidget.action.APPWIDGET_UPDATE, how does the application > > know which widget to choose? > > Use different AppWidgetProviders, one for each class of widget. > > -- > Mark Murphy (a Commons Guy) > http://commonsware.com | http://twitter.com/commonsguy > > _Android Programming Tutorials_ Version 1.0 In Print! > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Question about app widgets
Carl wrote: > I would like to ask if it is possible to put 2 widgets in the same > application. In other words, having one project, with one manifest.xml > file and making 2 different widgets in the the same project. AFAIK, yes. > In the case that it is possible, when there is an intent > android.appwidget.action.APPWIDGET_UPDATE, how does the application > know which widget to choose? Use different AppWidgetProviders, one for each class of widget. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy _Android Programming Tutorials_ Version 1.0 In Print! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Question about adapters
I am new as new, but from what I got: "this" is context. It is "this" in all examples I saw. What is in parenthesis you will see if you highlight createFromResource in eclipse. R.array.planets is a string array. It can be created like: final String[] branches= new String[] { "Brno", "Černý Most", "Zličín" }; and then placed in: ...ArrayAdapter.createFromResource(this, branches, ... Last is layout, which you are calling, this one is generic from google. You can create your own in res/layout folder and summon there: ..R.layout.row); (in case file is named row.xml). Nice tutorial about layouts is http://commonsware.com/Android/excerpt.pdf Adam On Sep 20, 9:00 am, Jeffrey wrote: > I'm kind of at a loss of how to achieve this probably simple task. How > do I get the contents of a variable (say and int variable) to display > on the screen? I've collected that I have to use an adapter, but I > can't find a simple explanation of how to use them. > > In one of the tutorials, they list this code: > > ArrayAdapter adapter = ArrayAdapter.createFromResource( > this, R.array.planets, > android.R.layout.simple_spinner_item); > adapter.setDropDownViewResource > (android.R.layout.simple_spinner_dropdown_item); > s.setAdapter(adapter); > > Problem is that I have no idea what a few things mean (like the use of > "this" and what items need to get in the parenthesis after > ArrayAdapter.createFromResource. If someone could refer me to a post > describing adapters and how to use them that would be great. > > Also as a side question, if I need to transfer data from one view to > another, do I need to pass it using intents? And if so, how to I send/ > read them? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Question about the license of the non-free applications
Such as? On 21 Sep, 07:15, Chihau Chau wrote: > Android is developed under the Apache v2 License but what about of the > non-free applications? > > -- > Chihau Chau --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: question
The attributes are listed here: http://developer.android.com/guide/topics/resources/available-resources.html#layoutresources Color is not a Layout attribute. Yusuf Saib Android ·T· · ·Mobile· stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Sep 13, 8:39 pm, Muse Mekuria wrote: > I read we can change the canvas color of a widget through overriding > the onDraw() method, but we still have to provide a layout for it. > Couldn't we have changed the canvas in the layout itself? What are the > attributes we can modify in a layout file (attributes like > android:textColor) > > Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Question Regarding the Background Menu
Thank u so much Liviu, I will try it and see if it works.. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Question Regarding the Background Menu
You can make your own class which extends LinearLayout and inside of it you should use this.setBackgroundafter you do this you must add your layout to your activity. I'm not sure if its corect beaceause i don't know if an activity can support two layouts but it is a view so it should. Class MyLayout extends LinearLayou { Button button; Context context; Public MyLayout(Context context_) { context = context_; button = new Button(context);//you can get context with getApplicationContext on your activity LinearLayout.LayouParams button_params = new LinearLayout LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.FILL_PARENT); addView(button,button_params); SetBackgroundDrawable(...); } } after you add this obect to your activity..hope will help you a bit.. On Aug 9, 2009 3:32 AM, "Hamed3d" wrote: Anyone?I really appreciate any helps. --~--~-~--~~~---~--~~ You received this message because you are subs... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Question Regarding the Background Menu
Anyone?I really appreciate any helps. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Question About Software And Ect...
You can use the emulator that comes with the SDK for all development purposes. If you wish to take your app to market, then testing it on a real device is highly recommended. Balwinder Kaur Open Source Development Center ·T· · ·Mobile· stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Aug 4, 11:00 am, ║Rogue║ wrote: > Do I need the Android Dev Phone 1 or the G1 to Debug the my written > code? Or can I Debug it on my computer? Or is there software I can use > that will act like the Android Dev Phone 1 but on my computer? > > Thank You For Reading My Post If You Have And Answer Please Feel Free > To Post ;) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Question about the annoyingly short screen time-out during a call...
Looking at PhoneApp.java, this seems to be getting closer: 559 /** 560 * Controls how quickly the screen times out. 561 * 562 * The poke lock controls how long it takes before the screen powers 563 * down, and therefore has no immediate effect when the current 564 * WakeState (see {...@link PhoneApp#requestWakeState}) is FULL. 565 * If we're in a state where the screen *is* allowed to turn off, 566 * though, the poke lock will determine the timeout interval (long or 567 * short). 568 * 569 * @param shortPokeLock tells the device the timeout duration to use 570 * before going to sleep 571 * {...@link com.android.server.PowerManagerService#SHORT_KEYLIGHT_DELAY}. 572 */ 573 /* package */ void setScreenTimeout(ScreenTimeoutDuration duration) { 574 if (DBG) Log.d(LOG_TAG, "setScreenTimeout(" + duration + ")..."); 575 576 // make sure we don't set the poke lock repeatedly so that we 577 // avoid triggering the userActivity calls in 578 // PowerManagerService.setPokeLock(). 579 if (duration == mPokeLockSetting) { 580 return; 581 } 582 mPokeLockSetting = duration; 583 584 // This is kind of convoluted, but the basic thing to remember is 585 // that the poke lock just sends a message to the screen to tell 586 // it to stay on for a while. 587 // The default is 0, for a long timeout and should be set that way 588 // when we are heading back into a the keyguard / screen off 589 // state, and also when we're trying to keep the screen alive 590 // while ringing. We'll also want to ignore the cheek events 591 // regardless of the timeout duration. 592 // The short timeout is really used whenever we want to give up 593 // the screen lock, such as when we're in call. 594 int pokeLockSetting = LocalPowerManager.POKE_LOCK_IGNORE_CHEEK_EVENTS; 595 switch (duration) { 596 case SHORT: 597 // Set the poke lock to timeout the display after a short 598 // timeout (5s). This ensures that the screen goes to sleep 599 // as soon as acceptably possible after we the wake lock 600 // has been released. 601 if (DBG) Log.d(LOG_TAG, "setting short poke lock"); 602 pokeLockSetting |= LocalPowerManager.POKE_LOCK_SHORT_TIMEOUT; 603 break; 604 605 case MEDIUM: 606 // Set the poke lock to timeout the display after a medium 607 // timeout (15s). This ensures that the screen goes to sleep 608 // as soon as acceptably possible after we the wake lock 609 // has been released. 610 if (DBG) Log.d(LOG_TAG, "setting medium poke lock"); 611 pokeLockSetting |= LocalPowerManager.POKE_LOCK_MEDIUM_TIMEOUT; 612 break; 613 614 case DEFAULT: 615 default: 616 // set the poke lock to timeout the display after a long 617 // delay by default. 618 // TODO: it may be nice to be able to disable cheek presses 619 // for long poke locks (emergency dialer, for instance). 620 if (DBG) Log.d(LOG_TAG, "reverting to normal long poke lock"); 621 break; 622 } 623 624 // Send the request 625 try { 626 mPowerManagerService.setPokeLock(pokeLockSetting, mPokeLockToken, LOG_TAG); 627 } catch (RemoteException e) { 628 } 629 } On Jul 22, 6:18 pm, Ed wrote: > Hi, > > According to my adb logcat, this is what happens when the phone shuts > off the screen during a phone call: > > D/PhoneApp( 185): updateWakeState: keepScreenOn = false (isRinging > false, showingDisc false) > D/SurfaceFlinger( 134): About to give-up screen, flinger = 0x17b200 > > [screen then turns off] > > How do I go about changing this setting? (Or settings, as the case may > be.) Do I look through the source, change the variable and resign the > whole package? Or is there a simpler way of going about it? > > Thanks for your help. Note: I have seen hundreds of complaints about > this from people other than me, but no solutions. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Question
yes thanks 2009/7/20 Yusuf T. Mobile > > Oh, that id. So I believe you are referring to the function > onListItemClick: > >protected void onListItemClick(ListView l, View v, int position, > long id) > > Android calls this function when the user clicks on a list item, and > sets the id value. Under the hood, when the user clicks on a spot in > the ListActivity UI, Android takes the y value of the touch point, > calculates which row position that corresponds to, and looks up which > item id that position corresponds to, and calls onListItemClick(). > ListActivity is handy like that. > > Does that answer your question? > > > Yusuf Saib > Android > ·T· · ·Mobile· stick together > The views, opinions and statements in this email are those of the > author solely in their individual capacity, and do not necessarily > represent those of T-Mobile USA, Inc. > > > > On Jul 19, 5:02 pm, Jose Ayerdis wrote: > > no how does android know that > > > > id > > > > is the id of the datarow??? where it is assign. > > > > 2009/7/19 Yusuf T. Mobile > > > > > > > > > > > > > > > > > If I understand your question, you are asking how does Android know > > > you want to launch the NoteEdit activity, right? > > > > > In the code, you see the line > > > > >Intent i = new Intent(this, NoteEdit.class); > > > > > and then a few lines below, > > > > >startActivityForResult(i, ACTIVITY_EDIT); > > > > > So variable i knows you intend to do something with the NoteEdit > > > class, and startActivity() uses that information. > > > > > Does that answer your question? > > > > > Yusuf Saib > > > Android > > > ·T· · ·Mobile· stick together > > > The views, opinions and statements in this email are those of the > > > author solely in their individual capacity, and do not necessarily > > > represent those of T-Mobile USA, Inc. > > > > > On Jul 18, 1:46 am, Jose Ayerdis wrote: > > > > I was reading the NotepadV2 app the following code... > > > > > > super.onListItemClick(l, v, position, id); > > > > Cursor c = mNotesCursor; > > > > c.moveToPosition(position); > > > > Intent i = new Intent(this, NoteEdit.class); > > > > i.putExtra(NotesDbAdapter.KEY_ROWID, id); > > > > > > i.putExtra(NotesDbAdapter.KEY_TITLE, c.getString( > > > > c.getColumnIndexOrThrow(NotesDbAdapter.KEY_TITLE))); > > > > i.putExtra(NotesDbAdapter.KEY_BODY, c.getString( > > > > c.getColumnIndexOrThrow(NotesDbAdapter.KEY_BODY))); > > > > > > startActivityForResult(i, ACTIVITY_EDIT); > > > > > > And wonder how does the method set the correct id, i mean i never > told it > > > > who was the id, how does it know can somebody explainme??? > > > > > > -- > > > > Atte > > > > > > [[Jose Luis Ayerdis Espinoza]]http://blognecronet.blogspot.com > > > > -- > > Atte > > > > [[Jose Luis Ayerdis Espinoza]]http://blognecronet.blogspot.com > > > -- Atte [[Jose Luis Ayerdis Espinoza]] http://blognecronet.blogspot.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Question
Oh, that id. So I believe you are referring to the function onListItemClick: protected void onListItemClick(ListView l, View v, int position, long id) Android calls this function when the user clicks on a list item, and sets the id value. Under the hood, when the user clicks on a spot in the ListActivity UI, Android takes the y value of the touch point, calculates which row position that corresponds to, and looks up which item id that position corresponds to, and calls onListItemClick(). ListActivity is handy like that. Does that answer your question? Yusuf Saib Android ·T· · ·Mobile· stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Jul 19, 5:02 pm, Jose Ayerdis wrote: > no how does android know that > > id > > is the id of the datarow??? where it is assign. > > 2009/7/19 Yusuf T. Mobile > > > > > > > > > If I understand your question, you are asking how does Android know > > you want to launch the NoteEdit activity, right? > > > In the code, you see the line > > > Intent i = new Intent(this, NoteEdit.class); > > > and then a few lines below, > > > startActivityForResult(i, ACTIVITY_EDIT); > > > So variable i knows you intend to do something with the NoteEdit > > class, and startActivity() uses that information. > > > Does that answer your question? > > > Yusuf Saib > > Android > > ·T· · ·Mobile· stick together > > The views, opinions and statements in this email are those of the > > author solely in their individual capacity, and do not necessarily > > represent those of T-Mobile USA, Inc. > > > On Jul 18, 1:46 am, Jose Ayerdis wrote: > > > I was reading the NotepadV2 app the following code... > > > > super.onListItemClick(l, v, position, id); > > > Cursor c = mNotesCursor; > > > c.moveToPosition(position); > > > Intent i = new Intent(this, NoteEdit.class); > > > i.putExtra(NotesDbAdapter.KEY_ROWID, id); > > > > i.putExtra(NotesDbAdapter.KEY_TITLE, c.getString( > > > c.getColumnIndexOrThrow(NotesDbAdapter.KEY_TITLE))); > > > i.putExtra(NotesDbAdapter.KEY_BODY, c.getString( > > > c.getColumnIndexOrThrow(NotesDbAdapter.KEY_BODY))); > > > > startActivityForResult(i, ACTIVITY_EDIT); > > > > And wonder how does the method set the correct id, i mean i never told it > > > who was the id, how does it know can somebody explainme??? > > > > -- > > > Atte > > > > [[Jose Luis Ayerdis Espinoza]]http://blognecronet.blogspot.com > > -- > Atte > > [[Jose Luis Ayerdis Espinoza]]http://blognecronet.blogspot.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Question
no how does android know that id is the id of the datarow??? where it is assign. 2009/7/19 Yusuf T. Mobile > > If I understand your question, you are asking how does Android know > you want to launch the NoteEdit activity, right? > > In the code, you see the line > >Intent i = new Intent(this, NoteEdit.class); > > and then a few lines below, > >startActivityForResult(i, ACTIVITY_EDIT); > > So variable i knows you intend to do something with the NoteEdit > class, and startActivity() uses that information. > > Does that answer your question? > > > > Yusuf Saib > Android > ·T· · ·Mobile· stick together > The views, opinions and statements in this email are those of the > author solely in their individual capacity, and do not necessarily > represent those of T-Mobile USA, Inc. > > > > > > On Jul 18, 1:46 am, Jose Ayerdis wrote: > > I was reading the NotepadV2 app the following code... > > > > super.onListItemClick(l, v, position, id); > > Cursor c = mNotesCursor; > > c.moveToPosition(position); > > Intent i = new Intent(this, NoteEdit.class); > > i.putExtra(NotesDbAdapter.KEY_ROWID, id); > > > > i.putExtra(NotesDbAdapter.KEY_TITLE, c.getString( > > c.getColumnIndexOrThrow(NotesDbAdapter.KEY_TITLE))); > > i.putExtra(NotesDbAdapter.KEY_BODY, c.getString( > > c.getColumnIndexOrThrow(NotesDbAdapter.KEY_BODY))); > > > > startActivityForResult(i, ACTIVITY_EDIT); > > > > And wonder how does the method set the correct id, i mean i never told it > > who was the id, how does it know can somebody explainme??? > > > > -- > > Atte > > > > [[Jose Luis Ayerdis Espinoza]]http://blognecronet.blogspot.com > > > -- Atte [[Jose Luis Ayerdis Espinoza]] http://blognecronet.blogspot.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Question
If I understand your question, you are asking how does Android know you want to launch the NoteEdit activity, right? In the code, you see the line Intent i = new Intent(this, NoteEdit.class); and then a few lines below, startActivityForResult(i, ACTIVITY_EDIT); So variable i knows you intend to do something with the NoteEdit class, and startActivity() uses that information. Does that answer your question? Yusuf Saib Android ·T· · ·Mobile· stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Jul 18, 1:46 am, Jose Ayerdis wrote: > I was reading the NotepadV2 app the following code... > > super.onListItemClick(l, v, position, id); > Cursor c = mNotesCursor; > c.moveToPosition(position); > Intent i = new Intent(this, NoteEdit.class); > i.putExtra(NotesDbAdapter.KEY_ROWID, id); > > i.putExtra(NotesDbAdapter.KEY_TITLE, c.getString( > c.getColumnIndexOrThrow(NotesDbAdapter.KEY_TITLE))); > i.putExtra(NotesDbAdapter.KEY_BODY, c.getString( > c.getColumnIndexOrThrow(NotesDbAdapter.KEY_BODY))); > > startActivityForResult(i, ACTIVITY_EDIT); > > And wonder how does the method set the correct id, i mean i never told it > who was the id, how does it know can somebody explainme??? > > -- > Atte > > [[Jose Luis Ayerdis Espinoza]]http://blognecronet.blogspot.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Question about HelloMapDemo
Yes, i generated key with keytool of my java/bin, i sign up in google key correct... There are another way to confirm that my key is correct? Thanks 2009/7/14 Jack Ha > > Make sure you set the "android:apiKey" value appropriately for the > MapView in your layout file. > > -- > Jack Ha > Open Source Development Center > ・T・ ・ ・Mobile・ stick together > > The views, opinions and statements in this email are those of > the author solely in their individual capacity, and do not > necessarily represent those of T-Mobile USA, Inc. > > > > On Jul 14, 1:23 am, iñaki wrote: > > Hi, i have the next question with api demo hello map. > > > > I try to execute this example based in > > \docs\guide\tutorials\views\hello-mapview.html but when activity start > don t > > show any map... > > This is the log: > > 07-14 08:18:39.669: INFO/MapActivity(791): Handling network change > > notification:CONNECTED > > 07-14 08:18:39.688: ERROR/MapActivity(791): Couldn't get connection > factory > > client > > 07-14 08:18:39.829: WARN/IInputConnectionWrapper(611): showStatusIcon on > > inactive InputConnection > > 07-14 08:18:41.928: INFO/ActivityManager(568): Displayed activity > > com.HelloMap/.HelloMap: 57892 ms > > > > I have a key generated with keytool... > > > > The java only is: > > public void onCreate(Bundle savedInstanceState) { > > super.onCreate(savedInstanceState); > > setContentView(R.layout.mapview); > > } > > > > @Override > > protected boolean isRouteDisplayed() { return false; } > > > > } > > > > Anybody help me ? > > > > Thanks. > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Question about HelloMapDemo
Make sure you set the "android:apiKey" value appropriately for the MapView in your layout file. -- Jack Ha Open Source Development Center ・T・ ・ ・Mobile・ stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Jul 14, 1:23 am, iñaki wrote: > Hi, i have the next question with api demo hello map. > > I try to execute this example based in > \docs\guide\tutorials\views\hello-mapview.html but when activity start don t > show any map... > This is the log: > 07-14 08:18:39.669: INFO/MapActivity(791): Handling network change > notification:CONNECTED > 07-14 08:18:39.688: ERROR/MapActivity(791): Couldn't get connection factory > client > 07-14 08:18:39.829: WARN/IInputConnectionWrapper(611): showStatusIcon on > inactive InputConnection > 07-14 08:18:41.928: INFO/ActivityManager(568): Displayed activity > com.HelloMap/.HelloMap: 57892 ms > > I have a key generated with keytool... > > The java only is: > public void onCreate(Bundle savedInstanceState) { > super.onCreate(savedInstanceState); > setContentView(R.layout.mapview); > } > > @Override > protected boolean isRouteDisplayed() { return false; } > > } > > Anybody help me ? > > Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Question about requestLocationUpdates()
> 1. After making this call, does it actually wait for the location > provider(gps in the above example) to complete the location update > THEN call the listener you give it? In other words, if I'm in my > locationListener() because the above call sent us there, will the > information be current? Yes. > 2. The second argument is the "minTime". If I put a value in there, > will it request location updates automatically based on the time i > give it OR does it just mean that it won't update locations until the > timer has expired to prevent battery drain, etc? The minimum time is simply that: you will not be informed of a location update until the minimum time has elapsed from the previous update. I do not think the GPS radio is turned off, though. > Bonus Question: > I can get my gps provider to work in the emulator, but I can't get the > "network" provider to work. In fact, when I list all providers, only > gps is in there. Does the emulator not have the network provider > available? AFAIK, it does not. -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 2.0 Available! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Question about building Android 1.5 source for emulator
alexbttf wrote: > I just had a quick question, haven't been able to find any answers > elsewhere. Figured I'd ask it here. I Was wondering if it's possible > to build the Android source so that the resulting Android Emulator > disk images contains all of the apps of a normal Android 1.5 system? Questions regarding the Android source code are best asked on a discussion list pertaining to the Android source code: http://source.android.com/discuss -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 2.0 Available! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Question about path to take
bsd_mike wrote: > > For my night class, I need to create an application that displays a > photo, info text, and a price. > (Ok I am making a catalog) > > The user will be able to see a screen with an item, hit a graphic > button ("+") to order 1 > or "-" to remove one for the order. > > I have created a XML layout for each of the 12 items. > > Is that my best approach? I would recommend using a ListView with a custom row for each of your items in the catalog. > It is possible just to have lists of my items and change one layout as > I go, but I am unsure > about how that may work. http://androidguys.com/?s=fancy+listviews That link points to a series of blog posts I have about your very issue. Please forgive the broken formatting, and the examples are from last summer and so may need some modification to work on the current SDK. You can get the source code to my original Android book, which has up-to-date editions of the sample code from the blog posts. Visit http://commonsware.com/Android/ and click on the Source Code link. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 2.0 Available! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Question about onSensorChanged Listener
On Mar 18, 10:27 am, ganesh kumar wrote: > hi Frank thanks for your reply > I wrote > private static final float GRAVITY_EARTH = 9.8f; > public void onSensorChanged(int sensor, float[] values){ > if( sensor == SensorManager.SENSOR_ACCELEROMETER){ > float accel_mag = > (values[0]*values[0]+values[1]*values[1]+values[2]*values[2]); > String str1 = String.valueOf(accel_mag); > Log.i("accel_mag value is ",str1); > float f=(3*9.8f)*(3*9.8f); > String str2 = String.valueOf(f); > Log.i("G force value is ",str2); > if (accel_mag > (3*GRAVITY_EARTH)*(3*GRAVITY_EARTH)) > { > Log.v(TAG,"Force Detected"); > TextView tv=(TextView)findViewById(R.id.found); > tv.setText("ViolentForce Detected"); > > } > > For whatever movement given through sensor simulator the value of accel_mag > seems to remains constant to a value of 96.17039 > Help me in pointing out the error > Thanks > > On Tue, Mar 17, 2009 at 6:25 PM, Jordan Frank wrote: > > > > > Hi, > > > I can only speak to question 2, but it seems like you'd want to also > > listen for the SENSOR_ACCELEROMETER data, and then look for values > > that are above a certain threshold, maybe something like: > > > if (sensor == SensorManager.SENSOR_ACCELEROMETER) { > > float accel_mag = (values[0]*values[0]+values[1]*values[1]+values[2] > > *values[2]); > > if (accel_mag > (3*GRAVITY_EARTH)*(3*GRAVITY_EARTH)) { > > // A force of > 3G was detected. > > // Do something. > > } > > } > > > On Mar 17, 2:02 am, guptha wrote: > > > I use OpenIntents to Listen for orientation change .Everything works > > > fine .but i have few doubts > > > 1. I suppose onSensorChanged is called whenever there is a change in > > > orientation > > > but contrary to my thought this method is kept calling even there is > > > no change in orientation . Yaw ,Roll and Pitch in my sensor simulator > > > are at rest. > > > 2. When i shake the mobile violently i have to trigger an event how > > > to sense a violent shake > > > > public void onSensorChanged(int sensor, float[] values){ > > > Log.v(TAG,"In onSensorChanged"); > > > > if( sensor == SensorManager.SENSOR_ORIENTATION){ > > > setContentView(R.layout.main); > > > > EditText view_x = (EditText) findViewById(R.id.output); > > > float acelerometerx = values[0]; > > > view_x.setText("" + acelerometerx); > > > > EditText view_y = (EditText) findViewById(R.id.output1); > > > float acelerometery = values[1]; > > > view_y.setText("" + acelerometery); > > > long l= System.currentTimeMillis(); > > > EditText view_time = (EditText) findViewById > > > (R.id.output_ychange); > > > view_time.setText("" +l); > > > > EditText view_z = (EditText) findViewById(R.id.output2); > > > float acelerometerz = values[2]; > > > view_z.setText("" + acelerometerz); > > > > } > > > Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Question about onSensorChanged Listener
hi Frank thanks for your reply I wrote private static final float GRAVITY_EARTH = 9.8f; public void onSensorChanged(int sensor, float[] values){ if( sensor == SensorManager.SENSOR_ACCELEROMETER){ float accel_mag = (values[0]*values[0]+values[1]*values[1]+values[2]*values[2]); String str1 = String.valueOf(accel_mag); Log.i("accel_mag value is ",str1); float f=(3*9.8f)*(3*9.8f); String str2 = String.valueOf(f); Log.i("G force value is ",str2); if (accel_mag > (3*GRAVITY_EARTH)*(3*GRAVITY_EARTH)) { Log.v(TAG,"Force Detected"); TextView tv=(TextView)findViewById(R.id.found); tv.setText("ViolentForce Detected"); } For whatever movement given through sensor simulator the value of accel_mag seems to remains constant to a value of 96.17039 Help me in pointing out the error Thanks On Tue, Mar 17, 2009 at 6:25 PM, Jordan Frank wrote: > > Hi, > > I can only speak to question 2, but it seems like you'd want to also > listen for the SENSOR_ACCELEROMETER data, and then look for values > that are above a certain threshold, maybe something like: > > if (sensor == SensorManager.SENSOR_ACCELEROMETER) { > float accel_mag = (values[0]*values[0]+values[1]*values[1]+values[2] > *values[2]); > if (accel_mag > (3*GRAVITY_EARTH)*(3*GRAVITY_EARTH)) { > // A force of > 3G was detected. > // Do something. >} > } > > On Mar 17, 2:02 am, guptha wrote: > > I use OpenIntents to Listen for orientation change .Everything works > > fine .but i have few doubts > > 1. I suppose onSensorChanged is called whenever there is a change in > > orientation > > but contrary to my thought this method is kept calling even there is > > no change in orientation . Yaw ,Roll and Pitch in my sensor simulator > > are at rest. > > 2. When i shake the mobile violently i have to trigger an event how > > to sense a violent shake > > > > public void onSensorChanged(int sensor, float[] values){ > > Log.v(TAG,"In onSensorChanged"); > > > > if( sensor == SensorManager.SENSOR_ORIENTATION){ > > setContentView(R.layout.main); > > > > EditText view_x = (EditText) findViewById(R.id.output); > > float acelerometerx = values[0]; > > view_x.setText("" + acelerometerx); > > > > EditText view_y = (EditText) findViewById(R.id.output1); > > float acelerometery = values[1]; > > view_y.setText("" + acelerometery); > > long l= System.currentTimeMillis(); > > EditText view_time = (EditText) findViewById > > (R.id.output_ychange); > > view_time.setText("" +l); > > > > EditText view_z = (EditText) findViewById(R.id.output2); > > float acelerometerz = values[2]; > > view_z.setText("" + acelerometerz); > > > > } > > Thanks > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Question about onSensorChanged Listener
Hi, I can only speak to question 2, but it seems like you'd want to also listen for the SENSOR_ACCELEROMETER data, and then look for values that are above a certain threshold, maybe something like: if (sensor == SensorManager.SENSOR_ACCELEROMETER) { float accel_mag = (values[0]*values[0]+values[1]*values[1]+values[2] *values[2]); if (accel_mag > (3*GRAVITY_EARTH)*(3*GRAVITY_EARTH)) { // A force of > 3G was detected. // Do something. } } On Mar 17, 2:02 am, guptha wrote: > I use OpenIntents to Listen for orientation change .Everything works > fine .but i have few doubts > 1. I suppose onSensorChanged is called whenever there is a change in > orientation > but contrary to my thought this method is kept calling even there is > no change in orientation . Yaw ,Roll and Pitch in my sensor simulator > are at rest. > 2. When i shake the mobile violently i have to trigger an event how > to sense a violent shake > > public void onSensorChanged(int sensor, float[] values){ > Log.v(TAG,"In onSensorChanged"); > > if( sensor == SensorManager.SENSOR_ORIENTATION){ > setContentView(R.layout.main); > > EditText view_x = (EditText) findViewById(R.id.output); > float acelerometerx = values[0]; > view_x.setText("" + acelerometerx); > > EditText view_y = (EditText) findViewById(R.id.output1); > float acelerometery = values[1]; > view_y.setText("" + acelerometery); > long l= System.currentTimeMillis(); > EditText view_time = (EditText) findViewById > (R.id.output_ychange); > view_time.setText("" +l); > > EditText view_z = (EditText) findViewById(R.id.output2); > float acelerometerz = values[2]; > view_z.setText("" + acelerometerz); > > } > Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Question regarding linearlayout
Why not trying RelativeLayout?You may use android:layout_toRightOf: @id/textf for the button. Dat Nguyen. On Tue, Mar 10, 2009 at 11:26 PM, striverwang wrote: > > hi,all: > I have a question regarding linearlayout(maybe other layout types) > __ > | textf |button | > |___|__| > > I want to implement above layout, firstly to place a textfield on the > screen, and place a button on its right, the button's size is fixed, > and I want to textfield to fill the rest space of the row. > > I want to use LinearLayout, but can not implement such UI. > > Anyboday have suggestion? Thank you! > > > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Question regarding linearlayout
Give your button a width of wrap_content, your text field a width of 0dip and a weight of 1. On Tue, Mar 10, 2009 at 10:26 PM, striverwang wrote: > > hi,all: > I have a question regarding linearlayout(maybe other layout types) > __ > | textf |button | > |___|__| > > I want to implement above layout, firstly to place a textfield on the > screen, and place a button on its right, the button's size is fixed, > and I want to textfield to fill the rest space of the row. > > I want to use LinearLayout, but can not implement such UI. > > Anyboday have suggestion? Thank you! > > > > > > -- 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 Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: question about bluetooth
Guan wrote: > Hi! I have developed a monitor device with bluetooth interface, can i > transmit the data from my monitor to GPhone by bluetooth? Does the > android sdk support bluetooth? The SDK does not. For more information as to why that is, see: http://android-developers.blogspot.com/2008/08/some-information-on-apis-removed-in.html -- Mark Murphy (a Commons Guy) http://commonsware.com Android Training on the Ranch! -- Mar 16-20, 2009 http://www.bignerdranch.com/schedule.shtml --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Question about the int bundle
Thank you! On Dec 27, 8:19 pm, Mark Murphy wrote: > > On Dec 25, 11:44 am, Zi Yong Chua wrote: > >> Sorry I am noob here and learning about the basics about android.. > > >> May I know what is the differences between the bundles? I search > >> around and there is not much comments on the bundles as far as I can > >> find... > > >> public void onCreate(Bundle icicle) { > >> super.onCreate(icicle); > > >> public void onCreate(Bundle savedInstanceState) { > >> super.onCreate(savedInstanceState); > > >> From what I know is savedInstanceState is the save state when the > >> activity goes to onPause/onStop.. What about icicle? > > In Java, you can name variables whatever you want (given minor > restrictions on punctuation and stuff). > > So: > > public void onCreate(Bundle icicle) { > super.onCreate(icicle); > > and: > > public void onCreate(Bundle savedInstanceState) { > super.onCreate(savedInstanceState); > > and: > > public void onCreate(Bundle quitWorryingAboutTheName) { > super.onCreate(quitWorryingAboutTheName); > > are all the same thing. > > The name originally was "icicle" because onSaveInstanceState() used to > be called onFreeze(). > > -- > 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 Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Question about the int bundle
> On Dec 25, 11:44 am, Zi Yong Chua wrote: >> Sorry I am noob here and learning about the basics about android.. >> >> May I know what is the differences between the bundles? I search >> around and there is not much comments on the bundles as far as I can >> find... >> >> public void onCreate(Bundle icicle) { >> super.onCreate(icicle); >> >> public void onCreate(Bundle savedInstanceState) { >> super.onCreate(savedInstanceState); >> >> From what I know is savedInstanceState is the save state when the >> activity goes to onPause/onStop.. What about icicle? In Java, you can name variables whatever you want (given minor restrictions on punctuation and stuff). So: public void onCreate(Bundle icicle) { super.onCreate(icicle); and: public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); and: public void onCreate(Bundle quitWorryingAboutTheName) { super.onCreate(quitWorryingAboutTheName); are all the same thing. The name originally was "icicle" because onSaveInstanceState() used to be called onFreeze(). -- 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 Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Question about the int bundle
Anyone? On Dec 25, 11:44 am, Zi Yong Chua wrote: > Sorry I am noob here and learning about the basics about android.. > > May I know what is the differences between the bundles? I search > around and there is not much comments on the bundles as far as I can > find... > > public void onCreate(Bundle icicle) { > super.onCreate(icicle); > > public void onCreate(Bundle savedInstanceState) { > super.onCreate(savedInstanceState); > > From what I know is savedInstanceState is the save state when the > activity goes to onPause/onStop.. What about icicle? > > Thanks a lot! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: question about layout.xml and View class
Brian wrote: > So how is the LunarLander Text being displayed? Dunno. I haven't looked at the source code to a lunar lander game in about two decades. Heck, I even had *hair* back then. > Does it have anything to do with the enclosing Layouts, > the FrameLayout as the parent of LunarView and RelativeLayout as the > parent of the TextView? Possibly. There's any number of ways to skin the proverbial cat for the layout you want, such as: -- Use a RelativeLayout -- Stick with your LinearLayout and use layout_weight to control the percentage of space taken up by your BoardView and the other widgets -- Move your other widgets to the top, so they get space first, then let the BoardView take up all remaining room -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 1.4 Published! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: question about layout.xml and View class
Thanks again for your reply, so it's the same problem I had earlier. So how is the LunarLander Text being displayed? I tried the same thing it does, with setTextView(), but mine still isn't being displayed. Does it have anything to do with the enclosing Layouts, the FrameLayout as the parent of LunarView and RelativeLayout as the parent of the TextView? I don't understand why the layout xml is even used this way, why not just programmatically set the LunarView with setContentView(new LunarView()) - (yes I know it doesn't have a default constructor, but couldn't you add one?) Soo confused... Here's my latest: main Activity: public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE); setContentView(R.layout.board_layout); mBoardView = (BoardView) findViewById(R.id.board); // give the LunarView a handle to the TextView used for messages mBoardView.setTextView((TextView) findViewById(R.id.InfoText)); } public class BoardView extends SurfaceView { private TextView mStatusText; public BoardView(Context context, AttributeSet attrs) { super(context, attrs); } @Override protected void onSizeChanged(int w, int h, int oldw, int oldh) { super.onSizeChanged(w, h, oldw, oldh); mStatusText.setText("width : " + w + ", height : " + h); } public void setTextView(TextView textView) { mStatusText = textView; } } On Nov 7, 12:28 pm, Mark Murphy <[EMAIL PROTECTED]> wrote: > Brian wrote: > > Why are > > the various TextViews and buttons not visible? > > Because you gave the whole screen to BoardView: > > android:id="@+id/board" >android:layout_width="fill_parent" >android:layout_height="fill_parent"/> > > Android takes one pass through the layout to determine sizes, and it is > very literal with respect to instructions. So, since your first widget > is set to take up the whole screen (fill_parent and fill_parent), your > first widget takes up the whole screen, leaving nothing for the > remaining widgets. > > -- > Mark Murphy (a Commons Guy)http://commonsware.com > > Android Training on the Ranch! -- Mar 16-20, > 2009http://www.bignerdranch.com/schedule.shtml --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Question about using webkit
i have no idea about how to debug the js code in the asset folder since alert() is not work @@ On 10月25日, 上午8時53分, hao <[EMAIL PROTECTED]> wrote: > hey guys, > > im wondering how well does android handlejavascript. Im thinking of > develop a web application for the android device. Can it load a google > map module just like on a desktop computer? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: question about layout.xml and View class
Brian wrote: > Why are > the various TextViews and buttons not visible? Because you gave the whole screen to BoardView: Android takes one pass through the layout to determine sizes, and it is very literal with respect to instructions. So, since your first widget is set to take up the whole screen (fill_parent and fill_parent), your first widget takes up the whole screen, leaving nothing for the remaining widgets. -- Mark Murphy (a Commons Guy) http://commonsware.com Android Training on the Ranch! -- Mar 16-20, 2009 http://www.bignerdranch.com/schedule.shtml --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Question about using webkit
if you write google map app using javascript you can just put the js/html code into asset folder then use this code : WebView wv = new WebView( this ); wv.getSettings().setJavaScriptEnabled(true); wv.loadUrl("file:///android_asset/map.js"); setContentView( wv ); On 10月25日, 上午8時53分, hao <[EMAIL PROTECTED]> wrote: > hey guys, > > im wondering how well does android handlejavascript. Im thinking of > develop a web application for the android device. Can it load a google > map module just like on a desktop computer? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: question about build android (2)
Thanks, I will post to that group. On 11月5日, 上午10时37分, Mark Murphy <[EMAIL PROTECTED]> wrote: > hunter wrote: > > Hi, all: > >I tried to build android, but met following errors: > > > == > > host C++: libutils <= frameworks/base/libs/utils/Threads.cpp > > frameworks/base/libs/utils/Threads.cpp: In static member function > > 'static int thread_data_t::trampoline(const thread_data_t*)': > > frameworks/base/libs/utils/Threads.cpp:104: error: 'PR_SET_NAME' was > > not declared in this scope > > == > > > I guess this is because missing some head files. So I check > > myandroid/kernel/include/linux/, and find the > > declaration in prctl.h. > > > Can anyone tell me what's going wrong? > > You're posting your question on a list that is not designed for your > question. This is for application developers, not framework developers > or people doing ports. > > You can find the roster of lists for the source code at: > > http://source.android.com/discuss > > -- > Mark Murphy (a Commons Guy)http://commonsware.com > _The Busy Coder's Guide to Android Development_ Version 1.4 Published! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: question about build android (2)
hunter wrote: > Hi, all: >I tried to build android, but met following errors: > > == > host C++: libutils <= frameworks/base/libs/utils/Threads.cpp > frameworks/base/libs/utils/Threads.cpp: In static member function > 'static int thread_data_t::trampoline(const thread_data_t*)': > frameworks/base/libs/utils/Threads.cpp:104: error: 'PR_SET_NAME' was > not declared in this scope > == > > I guess this is because missing some head files. So I check > myandroid/kernel/include/linux/, and find the > declaration in prctl.h. > > Can anyone tell me what's going wrong? You're posting your question on a list that is not designed for your question. This is for application developers, not framework developers or people doing ports. You can find the roster of lists for the source code at: http://source.android.com/discuss -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 1.4 Published! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: question about build android
Tnanks tangore, after I install jdk instead of jre, this problem resolved. :P On 11月5日, 上午9时35分, tagore <[EMAIL PROTECTED]> wrote: > You might use sun-jdk6, aren't you? > To solve this problem, you can install a sun-jdk5-update15: > Under ubuntu: > sudo apt-get install sun-java5-sdk > > Tagore > > On Nov 5, 1:11 am, "David Turner" <[EMAIL PROTECTED]> wrote: > > > you need to install Sun's JDK, gcj is not supported > > > On Tue, Nov 4, 2008 at 10:43 AM, hunter <[EMAIL PROTECTED]> wrote: > > > > Hi, all: > > > I try to build android on my linux, but failed with following > > > errors: > > > build/core/product_config.mk:229: WARNING: adding test OTA key > > > host C: acp <= build/tools/acp/acp.c > > > cp: cannot stat `out/host/linux-x86/obj/EXECUTABLES/acp_intermediates/ > > > acp.d': No such file or directory > > > /bin/bash: line 1: out/host/linux-x86/obj/EXECUTABLES/ > > > acp_intermediates/acp.d: No such file or directory > > > host Executable: acp (out/host/linux-x86/obj/EXECUTABLES/ > > > acp_intermediates/acp) > > > true > > > Install: out/host/linux-x86/bin/acp > > > host Java: droiddoc (out/host/common/obj/JAVA_LIBRARIES/ > > > droiddoc_intermediates/classes) > > > libgcj-java-placeholder.sh > > > > This script is a placeholder for the /usr/bin/java > > > master link required by jpackage.org conventions. libgcj's > > > rmiregistry, rmic and jar tools are now slave symlinks to these > > > masters, and are managed by the alternatives(8) system. > > > > This change was necessary because the rmiregistry, rmic and jar tools > > > installed by previous versions of libgcj conflicted with symlinks > > > installed by jpackage.org JVM packages. > > > > This script was designed to be overridden by the supported RHEL3 JRE > > > packages, java-1.4.2-bea and java-1.4.2-ibm. It is installed as an > > > alternative symlink as /usr/bin/java. It will override a third-party > > > (non-RHEL3) JRE's java command if the JRE's bin directory is listed > > > after /usr/bin in PATH. In that case, it is recommended that the > > > third-party JRE's bin directory be listed first in PATH instead. > > > > gij: unrecognized option -- `-J-Xmx256m' > > > Try `gij --help' for more information. > > > > I have install gcc-4.3.2 and my gij version is > > > $ gij -v > > > gij: unrecognized option -- `-v' > > > Try `gij --help' for more information. > > > [EMAIL PROTECTED] bin]$ gij --version > > > java version "1.5.0" > > > gij (GNU libgcj) version 4.3.2 > > > > Copyright (C) 2007 Free Software Foundation, Inc. > > > This is free software; see the source for copying conditions. There > > > is NO > > > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR > > > PURPOSE. > > > > Can anyone tell me what's wrong? > > > > Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: question about build android
You might use sun-jdk6, aren't you? To solve this problem, you can install a sun-jdk5-update15: Under ubuntu: sudo apt-get install sun-java5-sdk Tagore On Nov 5, 1:11 am, "David Turner" <[EMAIL PROTECTED]> wrote: > you need to install Sun's JDK, gcj is not supported > > On Tue, Nov 4, 2008 at 10:43 AM, hunter <[EMAIL PROTECTED]> wrote: > > > Hi, all: > > I try to build android on my linux, but failed with following > > errors: > > build/core/product_config.mk:229: WARNING: adding test OTA key > > host C: acp <= build/tools/acp/acp.c > > cp: cannot stat `out/host/linux-x86/obj/EXECUTABLES/acp_intermediates/ > > acp.d': No such file or directory > > /bin/bash: line 1: out/host/linux-x86/obj/EXECUTABLES/ > > acp_intermediates/acp.d: No such file or directory > > host Executable: acp (out/host/linux-x86/obj/EXECUTABLES/ > > acp_intermediates/acp) > > true > > Install: out/host/linux-x86/bin/acp > > host Java: droiddoc (out/host/common/obj/JAVA_LIBRARIES/ > > droiddoc_intermediates/classes) > > libgcj-java-placeholder.sh > > > This script is a placeholder for the /usr/bin/java > > master link required by jpackage.org conventions. libgcj's > > rmiregistry, rmic and jar tools are now slave symlinks to these > > masters, and are managed by the alternatives(8) system. > > > This change was necessary because the rmiregistry, rmic and jar tools > > installed by previous versions of libgcj conflicted with symlinks > > installed by jpackage.org JVM packages. > > > This script was designed to be overridden by the supported RHEL3 JRE > > packages, java-1.4.2-bea and java-1.4.2-ibm. It is installed as an > > alternative symlink as /usr/bin/java. It will override a third-party > > (non-RHEL3) JRE's java command if the JRE's bin directory is listed > > after /usr/bin in PATH. In that case, it is recommended that the > > third-party JRE's bin directory be listed first in PATH instead. > > > gij: unrecognized option -- `-J-Xmx256m' > > Try `gij --help' for more information. > > > I have install gcc-4.3.2 and my gij version is > > $ gij -v > > gij: unrecognized option -- `-v' > > Try `gij --help' for more information. > > [EMAIL PROTECTED] bin]$ gij --version > > java version "1.5.0" > > gij (GNU libgcj) version 4.3.2 > > > Copyright (C) 2007 Free Software Foundation, Inc. > > This is free software; see the source for copying conditions. There > > is NO > > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR > > PURPOSE. > > > Can anyone tell me what's wrong? > > > Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: question about build android
you need to install Sun's JDK, gcj is not supported On Tue, Nov 4, 2008 at 10:43 AM, hunter <[EMAIL PROTECTED]> wrote: > > Hi, all: > I try to build android on my linux, but failed with following > errors: > build/core/product_config.mk:229: WARNING: adding test OTA key > host C: acp <= build/tools/acp/acp.c > cp: cannot stat `out/host/linux-x86/obj/EXECUTABLES/acp_intermediates/ > acp.d': No such file or directory > /bin/bash: line 1: out/host/linux-x86/obj/EXECUTABLES/ > acp_intermediates/acp.d: No such file or directory > host Executable: acp (out/host/linux-x86/obj/EXECUTABLES/ > acp_intermediates/acp) > true > Install: out/host/linux-x86/bin/acp > host Java: droiddoc (out/host/common/obj/JAVA_LIBRARIES/ > droiddoc_intermediates/classes) > libgcj-java-placeholder.sh > > This script is a placeholder for the /usr/bin/java > master link required by jpackage.org conventions. libgcj's > rmiregistry, rmic and jar tools are now slave symlinks to these > masters, and are managed by the alternatives(8) system. > > This change was necessary because the rmiregistry, rmic and jar tools > installed by previous versions of libgcj conflicted with symlinks > installed by jpackage.org JVM packages. > > This script was designed to be overridden by the supported RHEL3 JRE > packages, java-1.4.2-bea and java-1.4.2-ibm. It is installed as an > alternative symlink as /usr/bin/java. It will override a third-party > (non-RHEL3) JRE's java command if the JRE's bin directory is listed > after /usr/bin in PATH. In that case, it is recommended that the > third-party JRE's bin directory be listed first in PATH instead. > > gij: unrecognized option -- `-J-Xmx256m' > Try `gij --help' for more information. > > I have install gcc-4.3.2 and my gij version is > $ gij -v > gij: unrecognized option -- `-v' > Try `gij --help' for more information. > [EMAIL PROTECTED] bin]$ gij --version > java version "1.5.0" > gij (GNU libgcj) version 4.3.2 > > Copyright (C) 2007 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There > is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR > PURPOSE. > > Can anyone tell me what's wrong? > > Thanks. > > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: question...
I have an N770. I know that no one has ported Android to it. But as I understand, someone has been able to get Android up and running on an N800. Do a Google search and check out the Mailing Groups at Maemo.org --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: question on getSelectedItemId function
thank you for reply! :-) If I change the _id that is default field's name to other, the program will throw an exception It means that I must have a field named _id in the data table, is right? can I change the name of id field? Ahmed Abdel samea wrote: > I will tell you in the create new note the id field in database take th > rowid in the listview as its id ok > > so when i delete all what i need is that id so i retrieve it from the > listview as i said before the rowid is the id in the database > > > > Hope i have answered ur question > > > Yours, --( H o H i )-- > > --- On Mon, 5/12/08, alan Gold <[EMAIL PROTECTED]> wrote: > From: alan Gold <[EMAIL PROTECTED]> > Subject: [android-beginners] question on getSelectedItemId function > To: android-beginners@googlegroups.com > Date: Monday, May 12, 2008, 10:35 AM > > Hello All! > I just do the exercise 2 in tutorial document, and I have a question in > the onMenuItemSelected function. > > @Override > public boolean onMenuItemSelected(int featureId, Item item) { > switch(item.getId()) { > case INSERT_ID: > createNote(); > return true; > case DELETE_ID: > mDbHelper.deleteNote(getListView().getSelectedItemId()); > fillData(); > return true; > } > > return super.onMenuItemSelected(featureId, item); > } > > when I delete the note,the code will call getSelectedItemId() to get > the id of the row. But I don't specify the the "id" field in > fillData(). only the "text1" field was passed to the Constructor of > SimpleCursorAdapter, how can the getSelectedItemId function to get the > id? > SimpleCursorAdapter will automatic add the id field? Somebody know why? > Thanks! > > private void fillData() { > // Get all of the rows from the database and create the item list > mNotesCursor = mDbHelper.fetchAllNotes(); > startManagingCursor(mNotesCursor); > > // Create an array to specify the fields we want to display in the list > (only TITLE) > String[] from = new String[]{NotesDbAdapter.KEY_TITLE}; > > // and an array of the fields we want to bind those fields to (in this > case just text1) > int[] to = new int[]{R.id.text1}; > > // Now create a simple cursor adapter and set it to display > SimpleCursorAdapter notes = > new SimpleCursorAdapter(this, R.layout.notes_row, mNotesCursor, from, > to); > setListAdapter(notes); > } > > > Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try > it now. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: question on getSelectedItemId function
I will tell you in the create new note the id field in database take th rowid in the listview as its id ok so when i delete all what i need is that id so i retrieve it from the listview as i said before the rowid is the id in the database Hope i have answered ur question Yours, --( H o H i )- On Mon, 5/12/08, alan Gold <[EMAIL PROTECTED]> wrote: From: alan Gold <[EMAIL PROTECTED]>Subject: [android-beginners] question on getSelectedItemId functionTo: android-beginners@googlegroups.comDate: Monday, May 12, 2008, 10:35 AM Hello All!I just do the exercise 2 in tutorial document, and I have a question in the onMenuItemSelected function. @Override public boolean onMenuItemSelected(int featureId, Item item) { switch(item.getId()) { case INSERT_ID: createNote(); return true; case DELETE_ID: mDbHelper.deleteNote(getListView().getSelectedItemId()); fillData(); return true; } return super.onMenuItemSelected(featureId, item); } when I delete the note,the code will call getSelectedItemId() to get the id of the row. But I don't specify the the "id" field in fillData(). only the "text1" field was passed to the Constructor of SimpleCursorAdapter, how can the getSelectedItemId function to get the id? SimpleCursorAdapter will automatic add the id field? Somebody know why? Thanks! private void fillData() { // Get all of the rows from the database and create the item list mNotesCursor = mDbHelper.fetchAllNotes(); startManagingCursor(mNotesCursor); // Create an array to specify the fields we want to display in the list (only TITLE) String[] from = new String[]{NotesDbAdapter.KEY_TITLE}; // and an array of the fields we want to bind those fields to (in this case just text1) int[] to = new int[]{R.id.text1}; // Now create a simple cursor adapter and set it to display SimpleCursorAdapter notes = new SimpleCursorAdapter(this, R.layout.notes_row, mNotesCursor, from, to); setListAdapter(notes); } Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-no... For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: question about adding external source folders to your project
Hi, You may want to look at the instructions from Xavier, given in the thread below: http://groups.google.com/group/android-beginners/msg/ee57ef8cec26f9f0 Thanks, Megha On Mon, Apr 21, 2008 at 1:17 PM, scimitar <[EMAIL PROTECTED]> wrote: > > Hi, > > My app needs to communicate with a webservice, so I was reading > through the tutorial posted at > http://www.anddev.org/viewtopic.php?p=4924 > > I've downloaded the kXML-RPC sources. The tutorial says to 'add the > packages to your project'. How do I do this in Eclipse? > > thanks, > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---