1 |
|
package com.loopback.androidapps.saveapp; |
2 |
|
|
3 |
|
import android.app.Activity; |
4 |
|
import android.content.Intent; |
5 |
|
import android.os.Bundle; |
6 |
|
import android.util.Log; |
7 |
|
import android.view.View; |
8 |
|
import android.widget.Button; |
9 |
|
import android.widget.TextView; |
10 |
|
|
|
|
| 95,7% |
Uncovered Elements: 1 (23) |
Complexity: 4 |
Complexity Density: 0,22 |
|
11 |
|
public class NoteViewActivity extends Activity implements View.OnClickListener { |
12 |
|
|
13 |
|
private TextView txtNote; |
14 |
|
private Button btnOkNote; |
15 |
|
private String note; |
16 |
|
private int outlayId; |
17 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (9) |
Complexity: 1 |
Complexity Density: 0,11 |
|
18 |
1
|
public void onCreate(Bundle savedInstanceState) {... |
19 |
1
|
super.onCreate(savedInstanceState); |
20 |
1
|
setContentView(R.layout.noteview); |
21 |
1
|
Bundle bundle = this.getIntent().getExtras(); |
22 |
1
|
outlayId = bundle.getInt("Id"); |
23 |
1
|
note= bundle.getString("Note"); |
24 |
1
|
txtNote = (TextView) findViewById(R.id.txtNote); |
25 |
1
|
btnOkNote = (Button) findViewById(R.id.btnOkNote); |
26 |
1
|
btnOkNote.setOnClickListener(this); |
27 |
1
|
txtNote.setText(note); |
28 |
|
} |
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0,5 |
|
29 |
1
|
public void onResume(){... |
30 |
1
|
super.onResume(); |
31 |
1
|
txtNote.setText(note); |
32 |
|
} |
33 |
|
|
|
|
| 88,9% |
Uncovered Elements: 1 (9) |
Complexity: 2 |
Complexity Density: 0,29 |
|
34 |
1
|
public void onClick(View v) {... |
35 |
1
|
Log.i("NTA", "Click..."); |
36 |
1
|
if (v == btnOkNote) { |
37 |
1
|
Bundle bundle = new Bundle(); |
38 |
1
|
bundle.putInt("Id", outlayId); |
39 |
1
|
Intent intent = new Intent(this.getApplicationContext(), |
40 |
|
OutlayDetailActivity.class); |
41 |
1
|
intent.putExtras(bundle); |
42 |
1
|
startActivity(intent); |
43 |
|
} |
44 |
|
} |
45 |
|
|
46 |
|
|
47 |
|
} |