-
Notifications
You must be signed in to change notification settings - Fork 0
/
addScreen.java
34 lines (26 loc) · 1.01 KB
/
addScreen.java
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
package com.example.ya_.myapplication;
/*summber:https://github.com/itb-prd/membuat-aplikasi-android-dasar-yonasadiel*/
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.View;
import android.widget.EditText;
public class addScreen extends AppCompatActivity{
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.add_layout);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
}
public void onSendNewTask(View view) {
EditText newTaskET = (EditText) findViewById(R.id.add_todo_list);
String newTask = String.valueOf(newTaskET.getText());
Intent goBack = new Intent();
goBack.putExtra("New Task",newTask);
setResult(RESULT_OK, goBack);
finish();
}
}