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 Pragmatic topics Top

jimschubert
In Chapter 3, the source for index introduces Config on page 31, followed by more code including tests; Config isn’t introduced until pag...
New
herminiotorres
Hi! I know not the intentions behind this narrative when called, on page XI: mount() |> handle_event() |> render() but the correc...
New
AleksandrKudashkin
On the page xv there is an instruction to run bin/setup from the main folder. I downloaded the source code today (12/03/21) and can’t see...
New
cro
I am working on the “Your Turn” for chapter one and building out the restart button talked about on page 27. It recommends looking into ...
New
Chrichton
Dear Sophie. I tried to do the “Authorization” exercise and have two questions: When trying to plug in an email-service, I found the ...
New
New
hazardco
On page 78 the following code appears: <%= link_to ‘Destroy’, product, class: ‘hover:underline’, method: :delete, data: { confirm...
New
taguniversalmachine
It seems the second code snippet is missing the code to set the current_user: current_user: Accounts.get_user_by_session_token(session["...
New
mert
AWDWR 7, page 152, page 153: Hello everyone, I’m a little bit lost on the hotwire part. I didn’t fully understand it. On page 152 @rub...
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

New
Rainer
My first contact with Erlang was about 2 years ago when I used RabbitMQ, which is written in Erlang, for my job. This made me curious and...
New
PragmaticBookshelf
“Finding the Boundaries” Hero’s Journey with Noel Rappin @noelrappin Even when you’re ultimately right about what the future ho...
New
AstonJ
In case anyone else is wondering why Ruby 3 doesn’t show when you do asdf list-all ruby :man_facepalming: do this first: asdf plugin-upd...
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
AstonJ
Continuing the discussion from Thinking about learning Crystal, let’s discuss - I was wondering which languages don’t GC - maybe we can c...
New
AstonJ
Saw this on TikTok of all places! :lol: Anyone heard of them before? Lite:
New
PragmaticBookshelf
Author Spotlight Mike Riley @mriley This month, we turn the spotlight on Mike Riley, author of Portable Python Projects. Mike’s book ...
New
First poster: bot
zig/http.zig at 7cf2cbb33ef34c1d211135f56d30fe23b6cacd42 · ziglang/zig. General-purpose programming language and toolchain for maintaini...
New
AstonJ
This is cool! DEEPSEEK-V3 ON M4 MAC: BLAZING FAST INFERENCE ON APPLE SILICON We just witnessed something incredible: the largest open-s...
New

Latest in PragProg

View all threads ❯