Skip to content
This repository
Browse code

Some tidying - I probably want to create a Compound Control:

  • Loading branch information...
commit b51ff50b16d9fdbe4685de38a141f13e0ee42f70 1 parent c7fc197
Roberto Tyley authored November 19, 2010
38  agit/src/main/java/com/madgag/agit/DiffPlayerActivity.java
... ...
@@ -1,22 +1,9 @@
1 1
 package com.madgag.agit;
2 2
 
3  
-import static android.text.Spanned.SPAN_EXCLUSIVE_EXCLUSIVE;
4  
-import static com.google.common.collect.Lists.newArrayList;
5  
-import static name.fraser.neil.plaintext.diff_match_patch.Operation.INSERT;
6  
-
7  
-import java.util.LinkedList;
8  
-import java.util.List;
9  
-
10  
-import name.fraser.neil.plaintext.StandardBreakScorer;
11  
-import name.fraser.neil.plaintext.diff_match_patch;
12  
-import name.fraser.neil.plaintext.diff_match_patch.Diff;
13  
-import name.fraser.neil.plaintext.diff_match_patch.Operation;
14 3
 import android.app.Activity;
15 4
 import android.os.Bundle;
16 5
 import android.os.Vibrator;
17 6
 import android.text.Editable;
18  
-import android.text.SpannableStringBuilder;
19  
-import android.text.style.CharacterStyle;
20 7
 import android.util.Log;
21 8
 import android.widget.SeekBar;
22 9
 import android.widget.TextView;
@@ -31,43 +18,26 @@
31 18
  */
32 19
 public class DiffPlayerActivity extends Activity {
33 20
 	private final static String TAG = "DiffPlayerActivity";
34  
-
35  
-	private SeekBar seekBar;
36  
-	private TextView textView;
37  
-
38  
-	private DiffText diffText;
39  
-
  21
+	
40 22
 	/** Called when the activity is first created. */
41 23
 	@Override
42 24
 	public void onCreate(Bundle savedInstanceState) {
43 25
 		super.onCreate(savedInstanceState);
44 26
 		
45 27
 		setContentView(R.layout.diff_player_view);
46  
-		textView = (TextView) findViewById(R.id.DiffPlayerTextView);
  28
+		TextView textView = (TextView) findViewById(R.id.DiffPlayerTextView);
47 29
 		Editable spannableText=(Editable) textView.getText();
48  
-		diffText = new DiffText(spannableText);
  30
+		DiffText diffText = new DiffText(spannableText);
49 31
 
50 32
 		diffText.initWith("ALPHA FISH HAPPY but slightly slapdash.\nFrosting\nFronghello\nFros ting\nGolly\nMoo\nBoo\nGandalf said hi",
51 33
 				"ALPHA GOOGLE HAPPY and slapping the side of the boat.\nFrosting\nFrosting\nFrosting\nMoo\nGandalf says hi");
52 34
 		
53  
-		seekBar = (SeekBar) findViewById(R.id.DiffPlayerSeekBar);
  35
+		SeekBar seekBar = (SeekBar) findViewById(R.id.DiffPlayerSeekBar);
54 36
 		seekBar.setMax(1000);
55 37
 		DiffSeekBarChangeListener foo = new DiffSeekBarChangeListener((Vibrator) getSystemService(VIBRATOR_SERVICE));
56 38
 		foo.add(diffText);
57 39
 		seekBar.setOnSeekBarChangeListener(foo);
58 40
 		seekBar.setProgress(1000);
59 41
 	}
60  
-	
61  
-	@Override
62  
-	protected void onStart() {
63  
-		super.onStart();
64  
-		Log.d(TAG, "Starting up!");
65  
-	}
66  
-
67  
-	@Override
68  
-	protected void onResume() {
69  
-		super.onResume();
70  
-		Log.d(TAG, "onResume called");
71  
-	}
72 42
 
73 43
 }

0 notes on commit b51ff50

Please sign in to comment.
Something went wrong with that request. Please try again.