2591288292_11cec5acd0_b_small Antonio Subi... 5 posts

Hello Ed,
I bought your book the day before the SDK 0.9 was released.. :S
It’s really a good reading and I love the concept of learning adding features to an application, like you’re doing with the Sudoku game.

I have one question about the new SDK:
In the example about adding an options menu (to the MENU key), I read in Androids Docs that there’s some changes inflating, and in the way Menus are created.
So, could you post a few lines of code reflecting these changes?

And another and last question:
I know there’s a lot to do in a book like this, especially with SDK changes in between, but,
¿When do you think will be possible to have a new beta book/pdf reflecting the new SDK?

Thanks a lot,
Tony

 
2591288292_11cec5acd0_b_small Antonio Subi... 5 posts

Oh, I am sorry for your lightning disaster…
I just read your story at your blog.

Hope everything goes back to normal soon!

 
Burnette_ed_small Ed Burnette 20 posts

I’m working on it… the lightning thing put me a bit behind. We should have a new beta for you in a week or two.

 
2591288292_11cec5acd0_b_small Antonio Subi... 5 posts

Thanks Ed!

 
Burnette_ed_small Ed Burnette 20 posts

Although you can inflate menus with XML now I didn’t really see a use for it in the Sudoku example. The only menu change was how the menu and its listener were created. Instead of a Runnable you use an OnMenuItemClickListener :


   public boolean onCreateOptionsMenu(Menu menu) {
      super.onCreateOptionsMenu(menu);
      menu.add(R.string.options_label)
            .setOnMenuItemClickListener(
                  new OnMenuItemClickListener() {
                     public boolean onMenuItemClick(MenuItem item) {
                        openOptionsDialog();
                        return true;
                     }
                  });
      return true;
   }
 
2591288292_11cec5acd0_b_small Antonio Subi... 5 posts

Great! I was reading Android site’s examples right now, but I’d rather catch this Sudoku again.
Thanks for advancing the code

6 posts, 2 voices