Win a copy of Micro Frontends in Action this week in the Server-Side JavaScript and NodeJS 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
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

(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
  • 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: 529
10
Android Open BSD Slackware
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
Thank you Giovanni, I changed it to Linear Layout and it works perfectly now!
 
Giovanni Montano
Ranch Hand
Posts: 529
10
Android Open BSD Slackware
  • Mark post as helpful
  • send pies
  • 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