• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

(Big Nerd Ranch) GeoQuiz App Questions no longer visible after adding the landscape layout

 
Greenhorn
Posts: 5
Android Python Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I followed the instructions to add the landscape layout view to GeoQuiz; now the questions are not visible. Below are the steps I took:

I copied the activity_quiz.xml and content_quiz.xml files from "layout" to the "land-layout" folder (in project view)
I updated the landscape content_quiz.xml file from linearLayout to frameLayout per the instructions
Now the questions have disappeared from both portrait and landscape layout in Android Studio.
The weird things is when I run the app on my Android phone I can see the questions in portrait view only. When I rotate the device to landscape the questions are not visible.
I would appreciate any help anyone can provide. Thank you for your assistance.

Below is my code:
LANDSCAPE LAYOUT:

PORTRAIT LAYOUT:
 
Ranch Hand
Posts: 607
11
Android Python Open BSD VI Editor Slackware
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Possibly you do not want to use FrameLayout for landscape.
try to work out a way to use LinearLayout and RelativeLayout and see if you see the questions.
If you want to become android coder these are the most 3 used layout.

FrameLayout is usually used for Fragments, not to maintain ChildViews as you are doing.

 
Kim Cook
Greenhorn
Posts: 5
Android Python Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you Giovanni, I changed it to Linear Layout and it works perfectly now!
 
Giovanni Montano
Ranch Hand
Posts: 607
11
Android Python Open BSD VI Editor Slackware
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Kim Cook wrote:Thank you Giovanni, I changed it to Linear Layout and it works perfectly now!


glad to help you, but please have a look  also at  Coordinator Layout, is an important topic to learn
reply
    Bookmark Topic Watch Topic
  • New Topic