Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Two or more activities

 
Ranch Hand
Posts: 103
Netbeans IDE Eclipse IDE Firefox Browser
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, i have strange problem.

Lets say i want to create app with button, after pressing button move to another window for example with another button with different action.

And it works, but there is strange problem, when im testing it on real devices (for example HTC Wild Fire S, Or HTC Desire)

After installing my app, its showing TWO SHORTCUTS with the same name (name of app) and after runningthem

first is opening program, and second is opening second window of tihis program (window which should appear after pressing button from program)

I just created new activity java file, and xml file for window gui, and in my main activity i have added this in action listener for button:



Thanks for help!
 
Ranch Hand
Posts: 154
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you Post the Manifest of this program, as far as i can predict you might have copied the intent filter of the main Program and pasted the same for the second activity and your manifest might look like this



All you have to correct this is to delete the complete intent-filter node for second activity

-Zoheb
 
Mathew Mintalm
Ranch Hand
Posts: 103
Netbeans IDE Eclipse IDE Firefox Browser
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Indeed, you are right.

Now it works, thank you for help
 
Rototillers convert rich soil into dirt. Please note that this tiny ad is not a rototiller:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic