Wrox Programmer Forums
|
BOOK: Beginning Android Application Development
This is the forum to discuss the Wrox book Beginning Android Application Development by Wei-Meng Lee; ISBN: 978-1-1180-1711-1
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Android Application Development section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 21st, 2014, 05:45 PM
Registered User
 
Join Date: Feb 2014
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Need help with android project

I have to connect three activities "rectangle, circle, triangle", which once selected on main screen, brings me to my other activity screens. but when I click on " example" rectangle, it brings me back to my start button " click here to pick a shape"
Code:
Override
protected Dialog onCreateDialog(int id) {
    switch (id) {
    case 0:
        return new AlertDialog.Builder(this)
        .setIcon(R.drawable.ic_launcher)
        .setTitle("Please pick a Shape")
            .setItems(items, 
                            new DialogInterface.OnClickListener() {
                                public void onClick(DialogInterface dialog,
                                int which) {  
                                switch (which) {
                                
                                case 1:
                                	startActivity(new Intent(getApplicationContext(), Rectangle_Activity.class));
                                    break;
                                case 2:
                                	startActivity(new Intent(getApplicationContext(), Circle_Activity.class));
                                    break;
                                case 3: 
                                	startActivity(new Intent(getApplicationContext(), Triangle_Activity.class));
                                	break; 
                                	
                                default: break;

                                }





Similar Threads
Thread Thread Starter Forum Replies Last Post
can't create a new android project ChiPower BOOK: Beginning Android Tablet Application Development 0 December 16th, 2011 02:17 AM
Problems with starting first android project. Peter N BOOK: Professional Android 2 Application Development 2 April 21st, 2011 10:27 AM
Android SDK/Android.bat does not find SWT.jar file chaoticandroid BOOK: Professional Android 2 Application Development 1 March 23rd, 2011 06:39 PM
Chapter 22: Introduction to Project Management... Project Program integration chrisa BOOK: Professional Application Lifecycle Management with Visual Studio 2010 1 September 15th, 2010 03:28 PM
Chapter# 2 - Page 23 what to key in the new Android Project Ahmed75 BOOK: Professional Android 2 Application Development 7 August 29th, 2010 12:19 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.