anongit / mytracks

Automatically exported from code.google.com/p/mytracks
0 stars 0 forks source link

Refactoring: main activities data flow #178

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
This is a clean-up request:
Right now we have 4 main activities, MyTracks and the 3 tabs inside it. Each of 
those registers essentially the same content observers and location listener, 
then each one processes the data independently.
We need to refactor this for centralized data management.

I'm willing to do this.

Original issue reported on code.google.com by rdama...@google.com on 7 Oct 2010 at 3:35

GoogleCodeExporter commented 9 years ago

Original comment by rdama...@google.com on 22 Nov 2010 at 10:34

GoogleCodeExporter commented 9 years ago
We discussed the design of this refactor and came up with a few interfaces.  
This is what we hope to implement:

public interface TrackDataControler {
  void clear();
  // Can easily support multiple tracks in the future by sending one at a time to the listeners (currently recording one as last).
  void load(int trackId);
  // Re-registering re-sends all points
  // Sampling is delegated to another (internal) class
  void registerListener(TrackDataListener, maxPoints);
  void unregisterListener(TrackDataListener);
}

public interface TrackDataListener {
   void reset();  // Clears previous data
    // Adds a point after reset
   void onNewTrackPoint(TrackPoint pt) throws TooManyPointsException;
}

In this design we would probably have at least three TrackDataListener's 
MapView, CharView, and a TestingListener.

Original comment by sandordo...@google.com on 27 Nov 2010 at 6:49

GoogleCodeExporter commented 9 years ago

Original comment by sandordo...@google.com on 6 Jan 2011 at 11:45

GoogleCodeExporter commented 9 years ago

Original comment by rdama...@google.com on 17 Feb 2011 at 5:36

GoogleCodeExporter commented 9 years ago
Actually starting this now.

Original comment by rdama...@google.com on 2 Mar 2011 at 5:06

GoogleCodeExporter commented 9 years ago

Original comment by rdama...@google.com on 2 Mar 2011 at 5:07

GoogleCodeExporter commented 9 years ago
First step done here:

http://code.google.com/r/rdamazio-mytracks-staging2/source/detail?r=e727918885f9
dfecbc598c26de873d6ca250a207

and

http://code.google.com/r/rdamazio-mytracks-staging2/source/detail?r=3e6ca1aaf543
9aa52a62b85ebd527b770d6ec7e3

Please review and test.
There are some TODOs left which I'll address if everyone agrees with the 
direction I'm going.

Original comment by rdama...@google.com on 12 Mar 2011 at 2:39

GoogleCodeExporter commented 9 years ago
Please review a couple more steps:
http://code.google.com/r/rdamazio-mytracks-staging1/source/detail?r=79707d6e2306
b843ebc7c8d260ed365884d2d913

http://code.google.com/r/rdamazio-mytracks-staging1/source/detail?r=5996e49f7144
514e99086ce80bb61bedbe884fdf

Original comment by rdama...@google.com on 12 Apr 2011 at 4:46

GoogleCodeExporter commented 9 years ago
A couple more tiny ones:
http://code.google.com/r/rdamazio-mytracks-staging1/source/detail?r=dd61133aa407
9afbe67960c7f0a94aae5c6b1ab2

http://code.google.com/r/rdamazio-mytracks-staging1/source/detail?r=cd6602f08f5f
2729c81b8d25520cd70319e16199

Original comment by rdama...@google.com on 12 Apr 2011 at 6:24

GoogleCodeExporter commented 9 years ago
A few more changes for review:
http://code.google.com/r/rdamazio-mytracks-staging1/source/detail?r=5d801aa76fe4
97dcbefbbd0c0de422211898985b

http://code.google.com/r/rdamazio-mytracks-staging1/source/detail?r=5e108ee1fd76
ce4bdf2080956e6e33cfebbe18ff

http://code.google.com/r/rdamazio-mytracks-staging1/source/detail?r=93a805a8be9d
5762bb2c22da2403e9bba2a398d3

(and now very close to being done)

Original comment by rdama...@google.com on 30 Apr 2011 at 5:51

GoogleCodeExporter commented 9 years ago
And, finally, the finishing touches:

http://code.google.com/r/rdamazio-mytracks-staging1/source/detail?r=19ba56033bad
c7b28ae588c268232e4e9b2d4e50

http://code.google.com/r/rdamazio-mytracks-staging1/source/detail?r=a85d47809e58
6c06ecc87086846cd1c6bfb31a65

http://code.google.com/r/rdamazio-mytracks-staging1/source/detail?r=011f69ba4e72
060e51bc92d6fed5824507f54d47

http://code.google.com/r/rdamazio-mytracks-staging1/source/detail?r=281f51c48196
26d6d42a22db1be7b36cbbc4c8b3

Please review.

Original comment by rdama...@google.com on 5 May 2011 at 1:10

GoogleCodeExporter commented 9 years ago
All done (any bugs will go into separate issues).

Original comment by rdama...@google.com on 7 May 2011 at 1:14

GoogleCodeExporter commented 9 years ago

Original comment by jshih@google.com on 22 Jun 2012 at 12:10

GoogleCodeExporter commented 9 years ago

Original comment by jshih@google.com on 9 Aug 2012 at 6:12