Friday, February 3, 2017

Dev Update 2/3/2017


A lot of retouching has been done app-side lately, but also with a bit of deprecation problems. We figured since we've been focusing so much on our robot that we should probably double back for our poor, empty app.

Our first approach was to redo our Android Studios activity classes and rework them into fragments for better organization of our controls and and better user-flow. The current plan for our app flow goes something like this:
  • Launch the starting activity to prompt the user to type in an IP address and port number and save it using Android's SharedPreferences. If the app detects a previously used IP/Port skips to the next activity
  • The next activity will serve as our Fragment container, with all the options to perform our various actions with the robot (without the need to press the back button)
  • Added to our option Fragments will be an Options button that allows the IP to be edited or to be disconnected, which will prompt the user back to the main activity.
Some issues encountered were the useless of using old labs we did regarding Fragments as references. We're running our app on a higher API, which unfortunately blocked us off from using the Fragment strategy in that previous lab. This caused us to find another method of displaying multiple fragments within a single activity.

Our answer to that was the ViewPager class within Android. The ViewPager allows us to swipe through our different fragments while keeping track of the current fragment at the top of the screen. The only current issue is that it overlaps our action/status bar. Implementing the view pager was a bit tricky though. We had to restructure most of our fragment classes almost completely because we lose the references to the original activity classes and remove most of the onclick methods from theXML.

It was a pain to deal with, but we managed through. (:

No comments:

Post a Comment