Note that there are some explanatory texts on larger screens.

plurals
  1. POUnexpected EditText behavior
    text
    copied!<p>So basically I know SQLite and stuff and I am used to it but somehow implementing data dynamically doesn't work either way. Here is my code..</p> <pre><code>package com.example.perfactlistview; import junit.framework.Test; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.util.Log; import android.view.Menu; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.EditText; public class MainActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); final MySQLiteHelper db=new MySQLiteHelper(this); EditText fac_name=(EditText)findViewById(R.id.et_fac_name); EditText message=(EditText)findViewById(R.id.et_message); final String fac_name_store; final String message_store; fac_name_store=fac_name.getText().toString(); message_store=message.getText().toString(); Button submit=(Button)findViewById(R.id.submit); submit.setOnClickListener(new OnClickListener() { @Override public void onClick(View arg0) { /*db.addMessages(new Faculty(fac_name_store, message_store));*/ Log.d("ROW ADDED", "FACULTY name= "+fac_name_store+" FACULTY MESSAGE = "+message_store); } }); } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.main, menu); return true; } } </code></pre> <p>I know its a silly question but still i can't figure it out. Thanks in advance..</p> <p>And one more thing <code>SQLiteHelper</code> and <code>Faculty</code> class (which are base for a sqlite database) are perfect and error less.(As I used this method a lot).</p> <p>When I enter the data in <code>EditText</code> they don't get saved in their corresponding <code>String</code> Variables <code>fac_name_store</code> and <code>message_store</code> so I cant put data in my database table using edittext..</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload