-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaddSkill.java
More file actions
68 lines (52 loc) · 1.79 KB
/
addSkill.java
File metadata and controls
68 lines (52 loc) · 1.79 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
package com.example.lirurssreader_v4;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;
public class addSkill extends Activity {
final String LOG_TAG = "myLogs";
Button btnAdd;
LoginDataBaseAdapter loginDataBaseAdapter;
EditText etURL, etName;
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.addrss);
//
setTitle("Add RSS window");
btnAdd = (Button) findViewById(R.id.btnAdd);
etURL = (EditText) findViewById(R.id.etURL);
etName = (EditText) findViewById(R.id.etName);
loginDataBaseAdapter=new LoginDataBaseAdapter(this);
loginDataBaseAdapter=loginDataBaseAdapter.open();
OnClickListener oclBtnAdd = new OnClickListener() {
@Override
public void onClick(View v) {
// TODO add record to skill table
// ñîçäàåì îáúåêò äëÿ äàííûõ
// ContentValues cv = new ContentValues();
// ïîäêëþ÷àåìñÿ ê ÁÄ
// SQLiteDatabase db = dbHelper.getWritableDatabase();
String URL = etURL.getText().toString();
String Name = etName.getText().toString();
Intent intent = getIntent();
loginDataBaseAdapter.insertEntryRSS(URL, Name,intent.getStringExtra("USER"));
// cv.put("skill", skill);
// cv.put("value",value);
// long rowID = db.insert("TSkill", null, cv);
// Log.d(LOG_TAG, "row inserted, ID = " + rowID);
Toast.makeText(getApplicationContext(), "row inserted, ID=",
Toast.LENGTH_LONG).show();
}
};
btnAdd.setOnClickListener(oclBtnAdd);
}
protected void onDestroy() {
super.onDestroy();
// çàêðûâàåì ïîäêëþ÷åíèå ïðè âûõîäå
loginDataBaseAdapter.close();
}
}