[android-beginners] android source integrated into Eclipse

2010-01-26 Thread oregonduckman
I am interested in installing the Android source so that when I am
debugging my app I can step into an Android SDK call, is this possible
and if so are there directions somewhere on how to do this?

-- 
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] getIntExtra only returns default value

2010-01-25 Thread oregonduckman
I am trying to pass an integer between activities using an intent.

The source activity makes the calls info.id is the selected item from
a ListView.

Intent intent = new Intent(myActivity.this,
newClass.class);
intent.putExtra(selectedItem, info.id);
this.startActivity(intent);

The target activity retrieves the intent using getIntent then calls
int iSelectedItem = intent.getIntExtra(selectedItem, -1);
iSelectedItem is always -1 instead of the value passed to putExtra.

Can someone tell me what I am doing wrong or do I misunderstand the
use of intents?

-- 
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] passing arbitrary data types to a sub activity

2010-01-21 Thread oregonduckman
Looking for a way to pass an arbitrary data type to a sub-activity.
Seems like Intents are missing something like intent.putExtra(String
name, Object object) or bundle.putObject(String name,Object object)
where object can be any type (such as ListMyClass). L

I looked at all the type that can be pass via a Bundle or Intent and
did not see any method that supports arbitrary data types.
-- 
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: passing arbitrary data types to a sub activity

2010-01-21 Thread oregonduckman
Yes I saw that and the use of Parcelable seems like overkill just to
pass an arbitrary data type in an Intent. Wonder if anyone knows why
the Android Framework does not support putExtra on an arbitrary data
type that can be cast into something like an Object?

On Jan 21, 3:27 pm, Walt Armour waltarm...@gmail.com wrote:
 Look at Intent.putExtra(String, Parcelable).  You will need to make your
 object implement Parcelable.

 On Thu, Jan 21, 2010 at 12:45, oregonduckman oregonduck...@gmail.comwrote:



  Looking for a way to pass an arbitrary data type to a sub-activity.
  Seems like Intents are missing something like intent.putExtra(String
  name, Object object) or bundle.putObject(String name,Object object)
  where object can be any type (such as ListMyClass). L

  I looked at all the type that can be pass via a Bundle or Intent and
  did not see any method that supports arbitrary data types.

  --
  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.comandroid-beginners%2Bunsubscr 
  i...@googlegroups.com
  For more options, visit this group at
 http://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: setContentView fails when creating a new activity

2010-01-19 Thread oregonduckman
It appears that the order attribute declaration matters for layout
declarations, for example the following causes an exception to be
thrown that says that the layout_width should be in line 2 of the XML
but if the id attribute is placed at the bottom of the list of
attributes the exception goes away.

Does anyone know if the order of attribute declarations appears in the
Android docs anywhere?

?xml version=1.0 encoding=utf-8?
RelativeLayout xmlns:android=http://schemas.android.com/apk/res/
android
android:id=@+id/MyRelativeLayout
android:orientation=vertical
android:layout_width=fill_parent
android:layout_height=fill_parent
ListView android:id=@+id/MyListView
android:layout_width=fill_parent
android:layout_height=wrap_content
android:scrollbars=vertical
android:smoothScrollbar=true
android:visibility=visible
android:layout_alignParentTop=true
/ListView
/RelativeLayout

On Jan 19, 6:37 am, Walt Armour waltarm...@gmail.com wrote:
 That looks like the content of the stack from the eclipse debug
 perspective.  What's the actual exception/error?  If you resume the run
 (perhaps more than once) the complete stack with error will eventually get
 dumped to the log.  You can then view it in the logcat window (a tab in the
 right pane of the debug perspective).

 On Mon, Jan 18, 2010 at 20:05, oregonduckman oregonduck...@gmail.comwrote:



  My code is calling setContentView(R.layout.someLayoutID); from an
  activities' onCreate method. The activity is launched with the
  following:

                         Intent myIntent = new Intent(this, myClass.class);
                         try
                         {
                                 this.startActivity(myIntent);
                         }
                         catch(ActivityNotFoundException e)
                         {
                                 e.toString();
                         }

  The activity is declared in the manifest file as                activity
  android:name=.myClass/activity
  The call to setContentView results in the following: (also, is it
  possible to setup Eclipse to find the source that the VM is referring
  to (instead of just getting the source not found error??

  DalvikVM[localhost:8656]
         Thread [3 main] (Suspended (exception RuntimeException))

   ActivityThread.performLaunchActivity(ActivityThread$ActivityRecord,
  Intent) line: 2481

   ActivityThread.handleLaunchActivity(ActivityThread$ActivityRecord,
  Intent) line: 2497
                 ActivityThread.access$2200(ActivityThread, ActivityThread
  $ActivityRecord, Intent) line: 119
                 ActivityThread$H.handleMessage(Message) line: 1848
                 ActivityThread$H(Handler).dispatchMessage(Message) line: 99
                 Looper.loop() line: 123
                 ActivityThread.main(String[]) line: 4338
                 Method.invokeNative(Object, Object[], Class, Class[], Class,
  int,
  boolean) line: not available [native method] [local variables
  unavailable]
                 Method.invoke(Object, Object...) line: 521
                 ZygoteInit$MethodAndArgsCaller.run() line: 860
                 ZygoteInit.main(String[]) line: 618
                 NativeStart.main(String[]) line: not available [native
  method]
         Thread [13 Binder Thread #2] (Running)
         Thread [11 Binder Thread #1] (Running)
         Thread [15 Binder Thread #3] (Running)

  --
  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.comandroid-beginners%2Bunsubscr 
  i...@googlegroups.com
  For more options, visit this group at
 http://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] Windows or Mac as an Android development platform?

2010-01-19 Thread oregonduckman
Would be interested in people's opinion on which platform provides a
better host environment for Android development.
-- 
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] setContentView fails when creating a new activity

2010-01-18 Thread oregonduckman
My code is calling setContentView(R.layout.someLayoutID); from an
activities' onCreate method. The activity is launched with the
following:

Intent myIntent = new Intent(this, myClass.class);
try
{
this.startActivity(myIntent);
}
catch(ActivityNotFoundException e)
{
e.toString();
}

The activity is declared in the manifest file asactivity
android:name=.myClass/activity
The call to setContentView results in the following: (also, is it
possible to setup Eclipse to find the source that the VM is referring
to (instead of just getting the source not found error??

DalvikVM[localhost:8656]
Thread [3 main] (Suspended (exception RuntimeException))

ActivityThread.performLaunchActivity(ActivityThread$ActivityRecord,
Intent) line: 2481

ActivityThread.handleLaunchActivity(ActivityThread$ActivityRecord,
Intent) line: 2497
ActivityThread.access$2200(ActivityThread, ActivityThread
$ActivityRecord, Intent) line: 119
ActivityThread$H.handleMessage(Message) line: 1848
ActivityThread$H(Handler).dispatchMessage(Message) line: 99
Looper.loop() line: 123
ActivityThread.main(String[]) line: 4338
Method.invokeNative(Object, Object[], Class, Class[], Class, 
int,
boolean) line: not available [native method] [local variables
unavailable]
Method.invoke(Object, Object...) line: 521
ZygoteInit$MethodAndArgsCaller.run() line: 860
ZygoteInit.main(String[]) line: 618
NativeStart.main(String[]) line: not available [native method]
Thread [13 Binder Thread #2] (Running)
Thread [11 Binder Thread #1] (Running)
Thread [15 Binder Thread #3] (Running)
-- 
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] moving Views and View.getWidth(), getHeight(), etc..

2010-01-13 Thread oregonduckman
I am working on an app that requires widgets to be repositioned at
runtime. The docs say getWidth() should return the width of View at
runtime but the only value  getWidth() returns is 0. Can someone point
me in the right direction on how to get the dimensions of a view at
runtime?
-- 
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: moving Views and View.getWidth(), getHeight(), etc..

2010-01-13 Thread oregonduckman
So how does one adjust the positions/sizes of view derived objects
such as widgets before they are displayed?

On Jan 13, 6:12 pm, Justin Anderson janderson@gmail.com wrote:
 Are you trying to get the widthe before it has been displayed on the
 screen?  If so it will be 0 because the width doesn't get calculated until
 it is displayed

 On Jan 13, 2010 6:48 PM, oregonduckman oregonduck...@gmail.com wrote:

 I am working on an app that requires widgets to be repositioned at
 runtime. The docs say getWidth() should return the width of View at
 runtime but the only value  getWidth() returns is 0. Can someone point
 me in the right direction on how to get the dimensions of a view at
 runtime?

 --
 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.comandroid-beginners%2Bunsubscr 
 i...@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] resolving equivalent intent filters

2010-01-12 Thread oregonduckman
If n activities have equivalent intent filters how does Android pick
the one to send an intent to?
-- 
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: resolving equivalent intent filters

2010-01-12 Thread oregonduckman
If what you say is true how is the one choses to handle the intent?

On Jan 12, 2:21 pm, ryan alford ryanalford...@gmail.com wrote:
 If I am not mistaken, it sends it to all activities in no particular order.

 Ryan

 Sent from my DROID

 On Jan 12, 2010 5:17 PM, oregonduckman oregonduck...@gmail.com wrote:

 If n activities have equivalent intent filters how does Android pick
 the one to send an intent to?

 --
 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.comandroid-beginners%2Bunsubscr 
 i...@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: resolving equivalent intent filters

2010-01-12 Thread oregonduckman
But which one will Android launch?

On Jan 12, 2:40 pm, ryan alford ryanalford...@gmail.com wrote:
 All of the listeners get it.  For example, if you install 5 SMS applications
 and you receive an SMS, all of the applications will receive the intent
 including the builtin messaging app.

 Now there is a method that you can call to stop the OS from broadcasting the
 intent after you have handled it, but I forgot what it was.

 Ryaqn

 Sent from my DROID

 On Jan 12, 2010 5:36 PM, oregonduckman oregonduck...@gmail.com wrote:

 If what you say is true how is the one choses to handle the intent?

 On Jan 12, 2:21 pm, ryan alford ryanalford...@gmail.com wrote:  If I am
 not mistaken, it sends i...

  On Jan 12, 2010 5:17 PM, oregonduckman oregonduck...@gmail.com wrote:
   If n activities have...
  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.comandroid-beginners%2Bunsubscr 
  i...@googlegroups.comandroid-beginners%2Bunsubscr

 i...@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 
 athttp://stackoverflow.com/questions/tagged/android

 To unsubscribe from this group, send email to
 android-beginners+unsubscr...@googlegroups.comandroid-beginners%2Bunsubscr 
 i...@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] Edit Source Lookup Path... during debugging???

2010-01-08 Thread oregonduckman
I am developing on a Mac with Eclipse and have the skeleton for an app
that implements the standard framework callbacks (onCreate, onDestroy,
onPause, etc..). When I set breakpoints in the callbacks the debugger
stops and displays a tab that says
ActivityThread.performLaunchActivity(ActivityThread
$ActivityRecord,Intent)line:2477 and in the tab page body there is
some red text that says Source not found and a button that says
Edit Source Lookup Path

I have tried adding several paths via Edit Source Lookup Path... but
can't see to find the one Eclipse is looking for.

Can anyone point me in the right direction?
-- 
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] Looking for some reading on the Android Framework

2010-01-06 Thread oregonduckman
I have gone through several tutorials on Android programming and find
myself needing a better understanding of the Android Framework. Does
anyone know of an article or book that gives a good explanation of the
Android Framework and how to best make use of it? Is there a document
that also covers best practices?
-- 
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] r cannot be resolved and other Eclipse/Android oddities

2009-12-28 Thread oregonduckman
I frequently receive the error r cannot be resolved when adding
functionality to an application and I have no idea why this happens.
The change can be as simple as adding an ArrayList when the error
appears in Eclipse.

I have also seen the same kind of thing with the error message The
project cannot be built until build path errors are resolved
appearing after closing Eclipse then re-opening it with a given
project.

Are these just Eclipse/Android Plugin idiosyncrasies or  I am doing
something wrong?

My development environment is Leopard+Eclipse Platform
3.5.1.M20090917-0800+  Android Development Tools
0.9.5.v200911191123-20404

-- 
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] Setting up an Android development environment on a Mac

2009-09-17 Thread oregonduckman

I am running OSX 10.5.8 and am new to Android/Eclipse/Java and need
help choosing the correct versions of Android/Eclipse SDK/IDE/Java SDK
to install.

--~--~-~--~~~---~--~~
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] Which version of Android?

2009-09-17 Thread oregonduckman

The 1.5 installation notes refer to Eclipse 3.3 (Europa) or Eclipse
3.4 (Ganymede). When I looked on Eclipse website I could not find a
reference to either version, can someone point me to the correct
version of Eclipse that will work with the 1.5 SDK?

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
-~--~~~~--~~--~--~---