dachristenson

dachristenson

Kotlin and Android Development featuring Jetpack: Cannot reach Settings Fragment in Penny Drop (p. 177)

Hi @mfazio23

I’ve reached the top of p. 177, and I can run Penny Drop both on my real Samsung tablet and on the in-IDE emulator, but I cannot reach the newly-created Settings fragment. Looking at the sentence on p. 173, “Instead of the bottom nav, settings are accessed via a gear icon in the app’s nav bar.” This raises a question for me: What is the “nav bar”? I thought that the “bottom nav” and the “nav bar” were the same thing, but apparently not?

Also, for some reason, it only just now dawned on me that the app screenshots in the book (such as on p. 168) show a large title bar of some kind (the “nav bar”?) at the top of both the Game and Pick Players screens, saying “Penny Drop”, but this is completely absent from my app! I’ve spent some time comparing my (typed-in) source code to the downloaded Ch. 6 and 7 source code, and I cannot figure out what is wrong with my version of the source code. I’d google how to make this show up or not, but Googling “nav bar” brought up pictures of what the book appears to call the “bottom nav”, so I’m confused.

(I will attach screenshots here of what Penny Drop looks like for me at this point.)

I’m sure I’ve made a very dumb mistake and disabled or removed… something, but what did I do? Suggestions?

I have been uploading my work on this book here: GitHub - dachristenson/PennyDrop4: Fourth attempt at working through "Kotlin and Android Development featuring Jetpack" due to changes in Android Studio.


Marked As Solved

mfazio23

mfazio23

Author of Kotlin and Android Development featuring Jetpack

Hey Derek!
First off, apologies for me taking a while to get back to you.

For your question, the “nav bar” in this context would probably be better listed as the “action bar” or “app bar”. It is indeed that title bar you noticed was missing, and thankfully it’s a simple change to re-add it.

In your values/themes.xml files (both normal and night), you’re using Theme.Material3.DayNight.NoActionBar as your parent theme. This will remove the action bar from the MainActivity that would normally be there. On the plus side, I added it back into your code and your navigation to the Settings screen works perfectly!

Let me know if that works!

Where Next?

Popular Pragmatic Bookshelf topics Top

brianokken
Many tasks_proj/tests directories exist in chapters 2, 3, 5 that have tests that use the custom markers smoke and get, which are not decl...
New
raul
Hi Travis! Thank you for the cool book! :slight_smile: I made a list of issues and thought I could post them chapter by chapter. I’m rev...
New
raul
Page 28: It implements io.ReaderAt on the store type. Sorry if it’s a dumb question but was the io.ReaderAt supposed to be io.ReadAt? ...
New
New
brian-m-ops
#book-python-testing-with-pytest-second-edition Hi. Thanks for writing the book. I am just learning so this might just of been an issue ...
New
leonW
I ran this command after installing the sample application: $ cards add do something --owner Brian And got a file not found error: Fil...
New
patoncrispy
I’m new to Rust and am using this book to learn more as well as to feed my interest in game dev. I’ve just finished the flappy dragon exa...
New
akraut
The markup used to display the uploaded image results in a Phoenix.LiveView.HTMLTokenizer.ParseError error. lib/pento_web/live/product_l...
New
rainforest
Hi, I’ve got a question about the implementation of PubSub when using a Phoenix.Socket.Transport behaviour rather than channels. Before ...
New
bjnord
Hello @herbert ! Trying to get the very first “Hello, Bracket Terminal!" example to run (p. 53). I develop on an Amazon EC2 instance runn...
New

Other popular topics Top

siddhant3030
I’m thinking of buying a monitor that I can rotate to use as a vertical monitor? Also, I want to know if someone is using it for program...
New
AstonJ
You might be thinking we should just ask who’s not using VSCode :joy: however there are some new additions in the space that might give V...
New
AstonJ
Do the test and post your score :nerd_face: :keyboard: If possible, please add info such as the keyboard you’re using, the layout (Qw...
New
AstonJ
Seems like a lot of people caught it - just wondered whether any of you did? As far as I know I didn’t, but it wouldn’t surprise me if I...
New
Margaret
Hello everyone! This thread is to tell you about what authors from The Pragmatic Bookshelf are writing on Medium.
1139 25503 755
New
AstonJ
Biggest jackpot ever apparently! :upside_down_face: I don’t (usually) gamble/play the lottery, but working on a program to predict the...
New
AstonJ
Was just curious to see if any were around, found this one: I got 51/100: Not sure if it was meant to buy I am sure at times the b...
New
Help
I am trying to crate a game for the Nintendo switch, I wanted to use Java as I am comfortable with that programming language. Can you use...
New
New
PragmaticBookshelf
Author Spotlight: VM Brasseur @vmbrasseur We have a treat for you today! We turn the spotlight onto Open Source as we sit down with V...
New

Sub Categories: