Saturday, September 13, 2014

Reworking the Menu! + Optimization

Today I've started working on reworking the Menu code and optimizing it. I've removed several duplicate variables, etc. and I've also created a new Activity to handle the settings. In simpler words, an Activity is simply a second class, called to by the main class via an Intent. This allows you to keep multiple classes and simplify/organize your code better. In addition to this, I also got the Music sound bar working! It now also tracks progress.


I also worked a bit on making things look better. Now, before you change a sound setting, the text will be invisible (if you have already changed the sound in the app and gone back to the main menu, then returned again to the settings menu). It's a bit oddly specific and confusing, and I'm still trying to work out it being invisible until being changed.

However, as you change it, you will be able to see the percentage number to fine-tune it.

Other smaller changes:

  • The theme is now always Holo.NoActionBar.FullScreen - This means that the Android action bar / notification bar is never shown in-app unless you swipe downwards to see it (unlike previous screenshots)
  • The OK button in settings now promptly returns you to the menu!
  • The app now forces Landscape mode and will only be in Landscape mode (moving your device will not change it to Portrait mode).

1 comment:

  1. I've never heard of an "intent" before. I looked over the documentation briefly, but can't say I grok its purpose yet. It links actions with data. Does it enable better performance by getting data ahead of time? Can you provide a good example of how it is used?

    ReplyDelete