Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to store Multiline EditText into SQLiteDatabase? [ANDROID]
    primarykey
    data
    text
    <p>I'm working on an application where I've 2 Multiline EditText and I need to store them into database. i only know how to store the single line EditText.</p> <p>Here is my codes for inserting into database:</p> <pre><code> btnSave = (Button) findViewById(R.id.btnSave); btnSave.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { //startActivityForResult(new Intent(Intent.ACTION_PICK),PICK_CONTACT); likeDB.open(); long likes_id; Spinner nameSpinner = (Spinner) findViewById(R.id.nameSpinner); String NameValue = nameSpinner.getSelectedItem().toString(); EditText txtLikes = (EditText) findViewById(R.id.txtLikes); String LikesValue = txtLikes.getText().toString(); likes_id = likeDB.insertLikes(NameValue, LikesValue); likeDB.close(); dislikeDB.open(); long dislikes_id; Spinner names = (Spinner) findViewById(R.id.nameSpinner); String NamesValue = names.getSelectedItem().toString(); EditText txtDislikes = (EditText) findViewById(R.id.txtDislikes); String DislikesValue = txtDislikes.getText().toString(); dislikes_id = dislikeDB.insertDislikes(NamesValue, DislikesValue); Toast.makeText(getBaseContext(), "Your information is saved successfully!", Toast.LENGTH_SHORT).show(); dislikeDB.close(); } }); </code></pre> <p>This the code where I've declared the LikeDBAdapter and DislikesDBAdapter above the onCreate() method:</p> <pre><code>LikesDBAdapter likeDB = new LikesDBAdapter(this); DislikesDBAdapter dislikeDB = new DislikesDBAdapter(this); </code></pre> <p>I need help with this. Any help will be appreciated. Thanks! <br> =)</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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