andbook!.pdf - Learning Android Get an anddev.org - Android-Shirt Back to index
anddev.org Header Logo
FAQ Search Top rated articles Browse Feeds anddev.org - Authors Contact Details Register Log in

Menu, Open, Programatically, Window.FEATURE_OPTIONS_PANEL


 
       anddev.org - Android Development Community | Android Tutorials | Index -> Code Snippets for Android
Author Message
plusminus
Site Admin
Site Admin


Joined: 14 Nov 2007
Posts: 2660
Location: College Park, MD

PostPosted: Sun Oct 12, 2008 11:53 pm    Post subject: Menu, Open, Programatically, Window.FEATURE_OPTIONS_PANEL Reply with quote

Put this snippet to any class that extends Activity:
Java:
     public void openMenu(){
          this.getWindow().openPanel(Window.FEATURE_OPTIONS_PANEL,
                    new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_MENU));
     }


SDK Version compatible: at least: 1.0

_________________
Download my apps Idea
Please remember, that this board is give & take Smile


| Android Development Community / Tutorials
Back to top
View user's profile Send private message Send e-mail Visit poster's website
MaTriXy
Freshman
Freshman


Joined: 01 Nov 2008
Posts: 6

PostPosted: Fri Nov 14, 2008 5:09 pm    Post subject: Reply with quote

You forgot

Java:

import android.view.KeyEvent;
import android.view.Window;

Back to top
View user's profile Send private message
plusminus
Site Admin
Site Admin


Joined: 14 Nov 2007
Posts: 2660
Location: College Park, MD

PostPosted: Fri Nov 14, 2008 5:18 pm    Post subject: Reply with quote

Yes usually I use:
Code:
STRG + SHIFT + O

for Organizing Imports Razz

_________________
Download my apps Idea
Please remember, that this board is give & take Smile


| Android Development Community / Tutorials
Back to top
View user's profile Send private message Send e-mail Visit poster's website
MrSnowflake
Moderator
Moderator


Joined: 16 Feb 2008
Posts: 1437
Location: Flanders, Belgium

PostPosted: Fri Nov 14, 2008 6:30 pm    Post subject: Reply with quote

MaTriXy wrote:
You forgot

Java:

import android.view.KeyEvent;
import android.view.Window;

He forgot a lot more than only those imports Smile.
Back to top
View user's profile Send private message
Display posts from previous:   
       anddev.org - Android Development Community | Android Tutorials | Index -> Code Snippets for Android All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum


© 2007, Android Development Community
All rights reserved.
Powered by phpBB.