]> gitweb.fperrin.net Git - Dictionary.git/blob - src/com/hughes/android/util/IntentLauncher.java
Fix issues noted by lint tools.
[Dictionary.git] / src / com / hughes / android / util / IntentLauncher.java
1
2 package com.hughes.android.util;
3
4 import android.content.Context;
5 import android.content.Intent;
6 import android.view.View;
7 import android.view.View.OnClickListener;
8
9 public class IntentLauncher implements OnClickListener {
10
11     private final Context context;
12     private final Intent intent;
13
14     public IntentLauncher(final Context context, final Intent intent) {
15         this.context = context;
16         this.intent = intent;
17     }
18
19     protected void onGo() {
20     }
21
22     private void go() {
23         onGo();
24         context.startActivity(intent);
25     }
26
27     @Override
28     public void onClick(View v) {
29         go();
30     }
31
32 }