Skip to content

Commit c0e3ee9

Browse files
committed
add @OverRide where necessary
1 parent 265adcd commit c0e3ee9

File tree

21 files changed

+113
-59
lines changed

21 files changed

+113
-59
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/.metadata

02/FillListTask/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/gen
22
/assets
3+
/eclipse
34
/.project
45
/.classpath
56
/bin

02/SharedListTask/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/gen
22
/assets
3+
/eclipse
34
/.project
45
/.classpath
56
/bin

06/AIDLDemo/tools/ide/eclipse/project

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<projectDescription>
3-
<name>com.oreilly.android.demo.aidl.AIDLDemo</name>
3+
<name>AIDLDemo</name>
44
<comment></comment>
55
<projects>
66
</projects>

06/AsyncTaskDemo/tools/ide/eclipse/project

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<projectDescription>
3-
<name>com.oreilly.demo.android.ch06.AsyncTaskDemo</name>
3+
<name>AsyncTaskDemo</name>
44
<comment></comment>
55
<projects>
66
</projects>

06/JSerializable/tools/ide/eclipse/project

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<projectDescription>
3-
<name>com.oreilly.demo.android.ch06.JSerializable</name>
3+
<name>JSerializable</name>
44
<comment></comment>
55
<projects>
66
</projects>

07/AndroidViewDemo/tools/ide/eclipse/project

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<projectDescription>
3-
<name>/com.oreilly.demo.android.ch07.AndroidViewDemo</name>
3+
<name>AndroidViewDemo</name>
44
<comment></comment>
55
<projects>
66
</projects>

09/AndroidUIDemo/tools/ide/eclipse/project

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<projectDescription>
3-
<name>com.oreilly.demo.android.ch08.AndroidUIDemo</name>
3+
<name>AndroidUIDemo</name>
44
<comment></comment>
55
<projects>
66
</projects>

12/FinchVideo/README.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
In order to get this project to build, you must import
2+
the project FinchWelcome, in the directory
3+
../framework/FinchFramework into your eclipse workspace

14/AudioPlayer/src/com/oreilly/demo/pa/ch14/AudioPlayer.java

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ private void setUpView() {
5757
ImageButton playpauseButton = (ImageButton) findViewById(R.id.playpause);
5858
playpauseButton.setOnClickListener(new OnClickListener() {
5959

60-
public void onClick(View v) {
60+
@Override
61+
public void onClick(View v) {
6162
switch(state) {
6263
case 1: setState(2); break; // is playing, set to pause
6364
case 0: // is stopped, set to play
@@ -71,7 +72,8 @@ public void onClick(View v) {
7172
ImageButton stopButton = (ImageButton) findViewById(R.id.stop);
7273
stopButton.setOnClickListener(new OnClickListener() {
7374

74-
public void onClick(View v) {
75+
@Override
76+
public void onClick(View v) {
7577
setState(0);
7678
}
7779

@@ -110,18 +112,21 @@ private void setState(int state) {
110112
//////////////////////////////
111113
private int seekbarprogress = 0;
112114

113-
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
115+
@Override
116+
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
114117
if(fromUser) {
115118
seekbarprogress = progress;
116119
}
117120
}
118121

119-
public void onStartTrackingTouch(SeekBar seekBar) {
122+
@Override
123+
public void onStartTrackingTouch(SeekBar seekBar) {
120124
seekbarprogress = 0;
121125
if(state == 1) pausePlayer();
122126
}
123127

124-
public void onStopTrackingTouch(SeekBar seekBar) {
128+
@Override
129+
public void onStopTrackingTouch(SeekBar seekBar) {
125130
mediaplayer.seekTo(seekbarprogress * 100);
126131
if(state == 1) playPlayer(2);
127132
seekbarprogress = 0;
@@ -135,13 +140,15 @@ private void resetSeekBar() {
135140
}
136141

137142
private final Handler seekbarHandler = new Handler() {
138-
public void handleMessage(Message msg) {
143+
@Override
144+
public void handleMessage(Message msg) {
139145
SeekBar seek = (SeekBar) findViewById(R.id.seek);
140146
seek.setProgress(msg.what);
141147
}
142148
};
143149

144-
public void run() {
150+
@Override
151+
public void run() {
145152
try {
146153
while(state > 0) {
147154
Thread.sleep(100); // 10th of a second
@@ -175,7 +182,8 @@ private void initializeMediaPlayer() {
175182
}
176183
}
177184

178-
public void onCompletion(MediaPlayer mp) {
185+
@Override
186+
public void onCompletion(MediaPlayer mp) {
179187
setState(0);
180188
}
181189

0 commit comments

Comments
 (0)