Skip to content

Commit

Permalink
Merge pull request #5 from twotoasters/carlton-dev
Browse files Browse the repository at this point in the history
Addresses #4
  • Loading branch information
carltonwhitehead committed Apr 30, 2013
2 parents 17c68ae + f47f4c6 commit 39e46a9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions library/src/com/twotoasters/clusterkraf/Clusterkraf.java
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,10 @@ public void onClusteringTaskPostExecute(ClusteringTask.Result result) {
}

public void cancel() {
ProcessingListener processingListener = options.getProcessingListener();
if (processingListener != null) {
processingListener.onClusteringFinished();
}
task.cancel(true);
task = null;
}
Expand Down Expand Up @@ -468,6 +472,10 @@ private class ShowAllClustersClusteringTaskHost extends BaseClusteringTaskHost {

@Override
protected void onCurrentClustersSet(ClusteringTask.Result result) {
ProcessingListener processingListener = options.getProcessingListener();
if (processingListener != null) {
processingListener.onClusteringFinished();
}
showAllClusters();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ public class SampleActivity extends FragmentActivity implements GenerateCallback
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
setProgressBarIndeterminate(true);

setContentView(R.layout.activity_sample);

Expand All @@ -71,7 +72,6 @@ protected void onCreate(Bundle savedInstanceState) {
this.restoreCameraPosition = savedInstanceState.getParcelable(KEY_CAMERA_POSITION);
this.inputPoints = inputPoints;
} else {
setProgressBarIndeterminate(true);
setProgressBarIndeterminateVisibility(true);

rpp.generate(this, options.geographicDistribution, options.pointCount);
Expand Down

0 comments on commit 39e46a9

Please sign in to comment.