Blame view

app/src/main/java/tonio/noa/BravoActivity.java 964 Bytes
6b23e70e   aarnaude   first commit
1
2
3
  package tonio.noa;
  
  import android.app.Activity;
d55d5943   aarnaude   resolution Bravo
4
  import android.content.Intent;
6b23e70e   aarnaude   first commit
5
  import android.os.Bundle;
d55d5943   aarnaude   resolution Bravo
6
7
  import android.view.MotionEvent;
  import android.view.View;
6b23e70e   aarnaude   first commit
8
9
10
11
12
  
  /**
   * Created by tonio on 23/11/17.
   */
  
d55d5943   aarnaude   resolution Bravo
13
  public class BravoActivity extends Activity{
6b23e70e   aarnaude   first commit
14
15
16
17
18
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
  
          super.onCreate(savedInstanceState);
d55d5943   aarnaude   resolution Bravo
19
          final Intent intent = getIntent();
6b23e70e   aarnaude   first commit
20
          setContentView(R.layout.bravo_display);
d55d5943   aarnaude   resolution Bravo
21
22
          View view = findViewById(R.id.bravo_view);
          view.setOnTouchListener(new View.OnTouchListener() {
6b23e70e   aarnaude   first commit
23
  
d55d5943   aarnaude   resolution Bravo
24
25
26
27
28
29
30
31
                                      @Override
                                      public boolean onTouch(View view,MotionEvent event) {
                                          setResult(RESULT_OK,intent);
                                          finish();
                                          return true;
                                      }
                                  });
      }
6b23e70e   aarnaude   first commit
32
  }