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

jimmykiang
This test is broken right out of the box… — FAIL: TestAgent (7.82s) agent_test.go:77: Error Trace: agent_test.go:77 agent_test.go:...
New
iPaul
page 37 ANTLRInputStream input = new ANTLRInputStream(is); as of ANTLR 4 .8 should be: CharStream stream = CharStreams.fromStream(i...
New
jeffmcompsci
Title: Design and Build Great Web APIs - typo “https://company-atk.herokuapp.com/2258ie4t68jv” (page 19, third bullet in URL list) Typo:...
New
ianwillie
Hello Brian, I have some problems with running the code in your book. I like the style of the book very much and I have learnt a lot as...
New
curtosis
Running mix deps.get in the sensor_hub directory fails with the following error: ** (Mix) No SSH public keys found in ~/.ssh. An ssh aut...
New
digitalbias
Title: Build a Weather Station with Elixir and Nerves: Problem connecting to Postgres with Grafana on (page 64) If you follow the defau...
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
kolossal
Hi, I need some help, I’m new to rust and was learning through your book. but I got stuck at the last stage of distribution. Whenever I t...
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
a.zampa
@mfazio23 I’m following the indications of the book and arriver ad chapter 10, but the app cannot be compiled due to an error in the Bas...
New

Other popular topics Top

axelson
I’ve been really enjoying obsidian.md: It is very snappy (even though it is based on Electron). I love that it is all local by defaul...
New
AstonJ
I ended up cancelling my Moonlander order as I think it’s just going to be a bit too bulky for me. I think the Planck and the Preonic (o...
New
PragmaticBookshelf
“Finding the Boundaries” Hero’s Journey with Noel Rappin @noelrappin Even when you’re ultimately right about what the future ho...
New
rustkas
Intensively researching Erlang books and additional resources on it, I have found that the topic of using Regular Expressions is either c...
New
AstonJ
We’ve talked about his book briefly here but it is quickly becoming obsolete - so he’s decided to create a series of 7 podcasts, the firs...
New
PragmaticBookshelf
Build efficient applications that exploit the unique benefits of a pure functional language, learning from an engineer who uses Haskell t...
New
First poster: joeb
The File System Access API with Origin Private File System. WebKit supports new API that makes it possible for web apps to create, open,...
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
New
New

Sub Categories: