Win a copy of Java XML & JSON this week in the XML and Related Technologies 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
  • Liutauras Vilda
  • Devaka Cooray
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • salvin francis
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Menu items displayed twice in app  RSS feed

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I work on simple Guessing Game app and work on menu, which for some reasons displays double values. The code appears trustly silly, however proved to be tricky for me.
This is what I got: in attached screenshot there is main_menu.xml, which displays correct view of the menu in Preview mode, and double values on my emulator (any, but here Nexus S API 28).

Below the code from MainActivity.java


And Text content of main_menu.xml:


I have checked if the values are not called twice, they are not, but I guess I made a mistake elsewhere.
Can you please give me a hand about it?
main_menu_double_items.PNG
[Thumbnail for main_menu_double_items.PNG]
 
Ranch Hand
Posts: 54
2
  • Likes 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Look at the lines 110 and 111
 
Zuzanna Jadwiga
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Adrian!
 
a fool thinks himself to be wise, but a wise man knows himself to be a fool - shakespeare. foolish tiny ad:
Programmatically Create PDF Using Free Spire.PDF with Java
https://coderanch.com/wiki/703735/Programmatically-Create-PDF-Free-Spire
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!