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!

Popular Prag Prog topics Top

simonpeter
When I try the command to create a pair of migration files I get an error. user=> (create-migration "guestbook") Execution error (Ill...
New
herminiotorres
Hi @Margaret , On page VII the book tells us the example and snippets will be all using Elixir version 1.11 But on page 3 almost the en...
New
JohnS
I can’t setup the Rails source code. This happens in a working directory containing multiple (postgres) Rails apps. With: ruby-3.0.0 s...
New
HarryDeveloper
Hi @venkats, It has been mentioned in the description of ‘Supervisory Job’ title that 2 things as mentioned below result in the same eff...
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
fynn
This is as much a suggestion as a question, as a note for others. Locally the SGP30 wasn’t available, so I ordered a SGP40. On page 53, ...
New
jskubick
I think I might have found a problem involving SwitchCompat, thumbTint, and trackTint. As entered, the SwitchCompat changes color to hol...
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
mcpierce
@mfazio23 I’ve applied the changes from Chapter 5 of the book and everything builds correctly and runs. But, when I try to start a game,...
New
dachristenson
@mfazio23 Android Studio will not accept anything I do when trying to use the Transformations class, as described on pp. 140-141. Googl...
New

Other popular topics Top

Exadra37
Please tell us what is your preferred monitor setup for programming(not gaming) and why you have chosen it. Does your monitor have eye p...
New
dasdom
No chair. I have a standing desk. This post was split into a dedicated thread from our thread about chairs :slight_smile:
New
AstonJ
poll poll Be sure to check out @Dusty’s article posted here: An Introduction to Alternative Keyboard Layouts It’s one of the best write-...
New
AstonJ
We have a thread about the keyboards we have, but what about nice keyboards we come across that we want? If you have seen any that look n...
New
New
Exadra37
Oh just spent so much time on this to discover now that RancherOS is in end of life but Rancher is refusing to mark the Github repo as su...
New
AstonJ
Saw this on TikTok of all places! :lol: Anyone heard of them before? Lite:
New
PragmaticBookshelf
Author Spotlight James Stanier @jstanier James Stanier, author of Effective Remote Work , discusses how to rethink the office as we e...
New
PragmaticBookshelf
Author Spotlight Erin Dees @undees Welcome to our new author spotlight! We had the pleasure of chatting with Erin Dees, co-author of ...
New
New

Latest in PragProg

View all threads ❯