Re: [android-developers] Opening a context menu in the onCreate of an activity

2010-08-10 Thread TreKing
On Tue, Aug 10, 2010 at 8:32 AM, Chris Stewart wrote:

> I don't think a dialog would work in this case just because I need to
> display a list of items for the user to select from, unless the dialog can
> be extended to do that.
>

Yes it will and actually I'd recommend that. You can set up an AlertDialog
to do this, no extensions necessary. Read the user guide section on dialogs.

-
TreKing  - Chicago
transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Opening a context menu in the onCreate of an activity

2010-08-10 Thread Chris Stewart
>> Why not use an activity?

That's the path I started going down last night.  I think that makes more
sense to me as it will give me more flexibility on the implementation.  My
initial thought, however, was to use a context menu.  I don't think a dialog
would work in this case just because I need to display a list of items for
the user to select from, unless the dialog can be extended to do that.

Interestingly enough, on a specific case in my initial activity, I'll need
to display some form of list selection and then turn around and display an
input dialog for text.  Those two values will be stored off to the database
to then be used on any following requests to the activity.

Regards,
Chris Stewart

Fantasy 
Football-
Android app for fantasy football fanatics and MFL owners
Social Updater-
An easy way to send your status blast to multiple social networks



On Tue, Aug 10, 2010 at 8:30 AM, Mark Murphy wrote:

> Why not use an activity?
>
> On Tue, Aug 10, 2010 at 12:06 AM, Chris Stewart 
> wrote:
> > I should also say that I'm kind of searching for a best practice here as
> > well.  I get the vibe that opening the context menu in this way may not
> be
> > the most sound way of doing it, but hey, if it works and it's not
> > troublesome for the user, that works for me.
> > Regards,
> > Chris Stewart
> > Fantasy Football - Android app for fantasy football fanatics and MFL
> owners
> > Social Updater - An easy way to send your status blast to multiple social
> > networks
> >
> >
> > On Tue, Aug 10, 2010 at 12:04 AM, Chris Stewart 
> > wrote:
> >>
> >> I have tried variations of that but getting the View is where I'm
> falling
> >> short.  Something like:
> >> registerForContextMenu(this.getCurrentFocus());
> >> openContextMenu(this.getCurrentFocus());
> >> I'm not sure what View I should be passing in as right now this Activity
> >> doesn't really have any UI components laid out in the XML file.
> >> Regards,
> >> Chris Stewart
> >> Fantasy Football - Android app for fantasy football fanatics and MFL
> >> owners
> >> Social Updater - An easy way to send your status blast to multiple
> social
> >> networks
> >>
> >>
> >> On Mon, Aug 9, 2010 at 11:49 PM, TreKing  wrote:
> >>>
> >>> On Mon, Aug 9, 2010 at 10:44 PM, Chris Stewart 
> >>> wrote:
> 
>  I'm not finding a way to do what I'm after and was wondering if anyone
>  has run into this before and how they solved it.
> >>>
> >>> I'm sure you tried this already, yes?
> >>>
> >>>
> http://developer.android.com/reference/android/app/Activity.html#openContextMenu(android.view.View)
> >>>
> >>>
> -
> >>> TreKing - Chicago transit tracking app for Android-powered devices
> >>>
> >>> --
> >>> You received this message because you are subscribed to the Google
> >>> Groups "Android Developers" group.
> >>> To post to this group, send email to
> android-developers@googlegroups.com
> >>> To unsubscribe from this group, send email to
> >>> android-developers+unsubscr...@googlegroups.com
> >>> For more options, visit this group at
> >>> http://groups.google.com/group/android-developers?hl=en
> >
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group at
> > http://groups.google.com/group/android-developers?hl=en
>
>
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://github.com/commonsguy
> http://commonsware.com/blog | http://twitter.com/commonsguy
>
> Android Training...At Your Office: http://commonsware.com/training
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Opening a context menu in the onCreate of an activity

2010-08-10 Thread Mark Murphy
On Tue, Aug 10, 2010 at 8:30 AM, Mark Murphy  wrote:
> Why not use an activity?

By which I mean pop up an activity (via
startActivity()/startActivityForResult()) in the cases where you need
to collect data from the user. Or, use a dialog. Popping up a context
menu would be rather odd.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android Training...At Your Office: http://commonsware.com/training

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Opening a context menu in the onCreate of an activity

2010-08-10 Thread Mark Murphy
Why not use an activity?

On Tue, Aug 10, 2010 at 12:06 AM, Chris Stewart  wrote:
> I should also say that I'm kind of searching for a best practice here as
> well.  I get the vibe that opening the context menu in this way may not be
> the most sound way of doing it, but hey, if it works and it's not
> troublesome for the user, that works for me.
> Regards,
> Chris Stewart
> Fantasy Football - Android app for fantasy football fanatics and MFL owners
> Social Updater - An easy way to send your status blast to multiple social
> networks
>
>
> On Tue, Aug 10, 2010 at 12:04 AM, Chris Stewart 
> wrote:
>>
>> I have tried variations of that but getting the View is where I'm falling
>> short.  Something like:
>> registerForContextMenu(this.getCurrentFocus());
>> openContextMenu(this.getCurrentFocus());
>> I'm not sure what View I should be passing in as right now this Activity
>> doesn't really have any UI components laid out in the XML file.
>> Regards,
>> Chris Stewart
>> Fantasy Football - Android app for fantasy football fanatics and MFL
>> owners
>> Social Updater - An easy way to send your status blast to multiple social
>> networks
>>
>>
>> On Mon, Aug 9, 2010 at 11:49 PM, TreKing  wrote:
>>>
>>> On Mon, Aug 9, 2010 at 10:44 PM, Chris Stewart 
>>> wrote:

 I'm not finding a way to do what I'm after and was wondering if anyone
 has run into this before and how they solved it.
>>>
>>> I'm sure you tried this already, yes?
>>>
>>> http://developer.android.com/reference/android/app/Activity.html#openContextMenu(android.view.View)
>>>
>>> -
>>> TreKing - Chicago transit tracking app for Android-powered devices
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Android Developers" group.
>>> To post to this group, send email to android-developers@googlegroups.com
>>> To unsubscribe from this group, send email to
>>> android-developers+unsubscr...@googlegroups.com
>>> For more options, visit this group at
>>> http://groups.google.com/group/android-developers?hl=en
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en



-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android Training...At Your Office: http://commonsware.com/training

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Opening a context menu in the onCreate of an activity

2010-08-09 Thread Chris Stewart
I should also say that I'm kind of searching for a best practice here as
well.  I get the vibe that opening the context menu in this way may not be
the most sound way of doing it, but hey, if it works and it's not
troublesome for the user, that works for me.

Regards,
Chris Stewart

Fantasy 
Football-
Android app for fantasy football fanatics and MFL owners
Social Updater-
An easy way to send your status blast to multiple social networks



On Tue, Aug 10, 2010 at 12:04 AM, Chris Stewart wrote:

> I have tried variations of that but getting the View is where I'm falling
> short.  Something like:
>
> registerForContextMenu(this.getCurrentFocus());
> openContextMenu(this.getCurrentFocus());
>
> I'm not sure what View I should be passing in as right now this Activity
> doesn't really have any UI components laid out in the XML file.
>
> Regards,
> Chris Stewart
>
> Fantasy 
> Football- 
> Android app for fantasy football fanatics and MFL owners
> Social 
> Updater- An 
> easy way to send your status blast to multiple social networks
>
>
>
> On Mon, Aug 9, 2010 at 11:49 PM, TreKing  wrote:
>
>> On Mon, Aug 9, 2010 at 10:44 PM, Chris Stewart wrote:
>>
>>> I'm not finding a way to do what I'm after and was wondering if anyone
>>> has run into this before and how they solved it.
>>
>>
>> I'm sure you tried this already, yes?
>>
>> http://developer.android.com/reference/android/app/Activity.html#openContextMenu(android.view.View)
>> 
>>
>> -
>> TreKing  - Chicago
>> transit tracking app for Android-powered devices
>>
>>  --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>
>
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Opening a context menu in the onCreate of an activity

2010-08-09 Thread Chris Stewart
I have tried variations of that but getting the View is where I'm falling
short.  Something like:

registerForContextMenu(this.getCurrentFocus());
openContextMenu(this.getCurrentFocus());

I'm not sure what View I should be passing in as right now this Activity
doesn't really have any UI components laid out in the XML file.

Regards,
Chris Stewart

Fantasy 
Football-
Android app for fantasy football fanatics and MFL owners
Social Updater-
An easy way to send your status blast to multiple social networks



On Mon, Aug 9, 2010 at 11:49 PM, TreKing  wrote:

> On Mon, Aug 9, 2010 at 10:44 PM, Chris Stewart wrote:
>
>> I'm not finding a way to do what I'm after and was wondering if anyone has
>> run into this before and how they solved it.
>
>
> I'm sure you tried this already, yes?
>
> http://developer.android.com/reference/android/app/Activity.html#openContextMenu(android.view.View)
> 
>
> -
> TreKing  - Chicago
> transit tracking app for Android-powered devices
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Opening a context menu in the onCreate of an activity

2010-08-09 Thread TreKing
On Mon, Aug 9, 2010 at 10:44 PM, Chris Stewart wrote:

> I'm not finding a way to do what I'm after and was wondering if anyone has
> run into this before and how they solved it.


I'm sure you tried this already, yes?
http://developer.android.com/reference/android/app/Activity.html#openContextMenu(android.view.View)

-
TreKing  - Chicago
transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Opening a context menu in the onCreate of an activity

2010-08-09 Thread Chris Stewart
I have a need to capture some user input when an activity opens for the
first time.  I'm hoping to give the user a list of options to select from,
which will be pulled in dynamically.  I'll then store the selected value
locally for future use.  I'm not finding a way to do what I'm after and was
wondering if anyone has run into this before and how they solved it.

Regards,
Chris Stewart

Fantasy 
Football-
Android app for fantasy football fanatics and MFL owners
Social Updater-
An easy way to send your status blast to multiple social networks

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en