Tuesday, December 27, 2016
intents
Today I spent a great deal of my time trying to figure out 2 things.
1) how to recover my activity instead of creating a new one when returning from color selection and
2) How to get the color to show up in the layout on my recyclerview.
1) this was difficult because I kept getting a null pointer exception and I assumed it was because my intent wasn't working. I had thought that the color-picker activity that I had made was having some error in transmitting the data back to my original activity. I had just overridden a new ( to me) method, the onActivityResult method. I had never done that before and assumed that I'd broken something. It turns out, I was forgetting to instantiate the "colorButton" object correctly. I had somehow missed setting it = to the findViewByID. So frustrating. Having pored over the intent and bundling, I knew for certain that was working, so once I'd gotten the object properly instantiated, it worked just fine.
2) I had similar issues with the color for my entries in the recyclerview that I have in my TrackActivity. I had used setBackgroundColor in my CreateIndicatorsActivity, but it wasn't working for some reason, inside the recyclerview. I looked at the EntryAdapter I'd made, and realized that the difference was, I was using a BUTTON in the TrackActivity, and an ImageView in the adapter. My brilliant solution? use a button in the adapter. It's now a button, but the color of the background changes and it works. I'm fairly certain there's not an easier way to change the color of an imageView background.
Either way, I'm very tired, it's 2:35 AM on Dec 27th. My next steps are as follows:
First most important thing is to learn SQLLite and begin implementing data persistence in my app.
I will then review the singleton pattern in my GOF book ( design patterns) and see if I can refactor the code to do away with my "weightd" object. Apparently this is not a standard practice.
Once that happens, the priorities are as follows:
Now that I am feeling confident in my recyclerviews, I will try to implement new ones to provide a list of indicators, entries ( sorted by day), and users.
I will then review the graphing library with which I started this whole endeavor and begin working on the interesting part of this project: Playing with the data.
I will then have to write an about page and give credit to the libraries I'm using.
I will then have to create a donation button so I can become a "professional" and figure out the nuances of making this thing a real app on the app store
Then I will have to work on the UI. Make it pretty, make it intuitive.
Then I will have to come up with a launch strategy. Marketing expense for it, testing, user base, monetization model ( the add-ons I will charge for to make this tool much cooler and easier to use)
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment