Blame view

app/src/main/java/tonio/noa/ConsigneActivity.java 1.11 KB
c13d9bc3   aarnaude   activity consigne...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
  package tonio.noa;
  
  import android.app.Activity;
  import android.content.Intent;
  import android.os.Bundle;
  import android.view.MotionEvent;
  import android.view.View;
  import android.widget.TextView;
  
  /**
   * Created by psyk on 22/01/18.
   */
  
  public class ConsigneActivity extends Activity {
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
  
          super.onCreate(savedInstanceState);
          final Intent intent = getIntent();
          setContentView(R.layout.consigne_display);
          TextView consigneTxt = findViewById(R.id.consigne);
          consigneTxt.setText(intent.getStringExtra("keyConsigne"));
          View view = findViewById(R.id.consigne_view);
          view.setOnTouchListener(new View.OnTouchListener() {
  
                                      @Override
                                      public boolean onTouch(View view,MotionEvent event) {
                                          setResult(RESULT_OK,intent);
                                          finish();
                                          return true;
                                      }
                                  });
      }
  }