Cant' convert Object of type ArrayList to type Pill












0















So I am trying to make an app that will allow you to log different medications using a fire base database. I'm currently receiving this error when I launch the app.



11-26 13:48:37.056 6958-6958/com.example.andrew.pilltracker E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.andrew.pilltracker, PID: 6958
com.google.firebase.database.DatabaseException: Can't convert object of type java.util.ArrayList to type com.example.andrew.pilltracker.Pill
at com.google.firebase.database.core.utilities.encoding.CustomClassMapper.convertBean(com.google.firebase:firebase-database@@16.0.4:423)
at com.google.firebase.database.core.utilities.encoding.CustomClassMapper.deserializeToClass(com.google.firebase:firebase-database@@16.0.4:214)
at com.google.firebase.database.core.utilities.encoding.CustomClassMapper.convertToCustomClass(com.google.firebase:firebase-database@@16.0.4:79)
at com.google.firebase.database.DataSnapshot.getValue(com.google.firebase:firebase-database@@16.0.4:212)
at com.example.andrew.pilltracker.MainActivityController.showData(MainActivityController.java:86)
at com.example.andrew.pilltracker.MainActivityController.access$100(MainActivityController.java:21)
at com.example.andrew.pilltracker.MainActivityController$2.onDataChange(MainActivityController.java:71)
at com.google.firebase.database.core.ValueEventRegistration.fireEvent(com.google.firebase:firebase-database@@16.0.4:75)
at com.google.firebase.database.core.view.DataEvent.fire(com.google.firebase:firebase-database@@16.0.4:63)
at com.google.firebase.database.core.view.EventRaiser$1.run(com.google.firebase:firebase-database@@16.0.4:55)
at android.os.Handler.handleCallback(Handler.java:789)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6938)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)`


I don't know what the deal is. I'm trying to have the main controller import information about the pills from the database, and another activity creates the database for the pills, but I don't know how to transfer the reference data from the second activity to the main activity. I also don't know why I'm receiving this error. Below I've attached the main controller and the pill class. Thanks for your help!



package com.example.andrew.pilltracker;

import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.design.widget.BottomNavigationView;
import android.support.v7.app.AppCompatActivity;
import android.view.MenuItem;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.widget.TextView;

import com.google.firebase.database.DataSnapshot;
import com.google.firebase.database.DatabaseError;
import com.google.firebase.database.DatabaseReference;
import com.google.firebase.database.FirebaseDatabase;
import com.google.firebase.database.ValueEventListener;

import java.util.ArrayList;

public class MainActivityController extends AppCompatActivity {

private TextView mTextMessage;
private int databaseRef = 1;
private ListView mListView;

private FirebaseDatabase mFirebaseDatabase;
DatabaseReference mRootRef;
ArrayList<String> array = new ArrayList<>();



private BottomNavigationView.OnNavigationItemSelectedListener mOnNavigationItemSelectedListener
= new BottomNavigationView.OnNavigationItemSelectedListener() {

@Override
public boolean onNavigationItemSelected(@NonNull MenuItem item) {
switch (item.getItemId()) {
case R.id.navigation_home:
mTextMessage.setText(R.string.title_home);
return true;
case R.id.navigation_dashboard:
Intent intent = new Intent(MainActivityController.this, SecondActvty.class);
startActivity(intent);
return true;
case R.id.navigation_notifications:
mTextMessage.setText(R.string.title_notifications);
return true;
}
return false;
}
};

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main_view);

mListView = (ListView) findViewById(R.id.listview);

mFirebaseDatabase = FirebaseDatabase.getInstance();
mRootRef = mFirebaseDatabase.getReference();

mTextMessage = (TextView) findViewById(R.id.message);
BottomNavigationView navigation = (BottomNavigationView) findViewById(R.id.navigation);
navigation.setOnNavigationItemSelectedListener(mOnNavigationItemSelectedListener);

mRootRef.addValueEventListener(new ValueEventListener() {
@Override
public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
showData(dataSnapshot);
}

@Override
public void onCancelled(@NonNull DatabaseError databaseError) {

}
});

}

private void showData(DataSnapshot dataSnapshot){
for(DataSnapshot ds : dataSnapshot.getChildren()){
Pill pInfo = new Pill();

pInfo.setName(ds.getValue(Pill.class).getName());
pInfo.setCount(ds.child(Integer.toString(databaseRef)).getValue(Pill.class).getCount());
pInfo.setDose(ds.child(Integer.toString(databaseRef)).getValue(Pill.class).getDose());
pInfo.setDay(ds.child(Integer.toString(databaseRef)).getValue(Pill.class).getDay());

array.add(pInfo.getName());
array.add("Number of Pills Left: " + pInfo.getCount());
array.add("Number of Pills per Dose: " + pInfo.getDose());
array.add("Number of Doses per Day: " + pInfo.getDay());
ArrayAdapter adapter = new ArrayAdapter(this, android.R.layout.simple_list_item_1, array);
mListView.setAdapter(adapter);

}
}

//Database shit
@Override
protected void onStart(){
super.onStart();


}


}










share|improve this question

























  • You're using method of your Pill class in ArrayList of Strings object.

    – user10516751
    Nov 27 '18 at 7:23











  • Please add your database structure and the content of your Pill class. Please also responde with @AlexMamo

    – Alex Mamo
    Nov 27 '18 at 10:43











  • Got it. Thanks @AlexMamo

    – Andrew Hunter
    Nov 27 '18 at 14:03
















0















So I am trying to make an app that will allow you to log different medications using a fire base database. I'm currently receiving this error when I launch the app.



11-26 13:48:37.056 6958-6958/com.example.andrew.pilltracker E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.andrew.pilltracker, PID: 6958
com.google.firebase.database.DatabaseException: Can't convert object of type java.util.ArrayList to type com.example.andrew.pilltracker.Pill
at com.google.firebase.database.core.utilities.encoding.CustomClassMapper.convertBean(com.google.firebase:firebase-database@@16.0.4:423)
at com.google.firebase.database.core.utilities.encoding.CustomClassMapper.deserializeToClass(com.google.firebase:firebase-database@@16.0.4:214)
at com.google.firebase.database.core.utilities.encoding.CustomClassMapper.convertToCustomClass(com.google.firebase:firebase-database@@16.0.4:79)
at com.google.firebase.database.DataSnapshot.getValue(com.google.firebase:firebase-database@@16.0.4:212)
at com.example.andrew.pilltracker.MainActivityController.showData(MainActivityController.java:86)
at com.example.andrew.pilltracker.MainActivityController.access$100(MainActivityController.java:21)
at com.example.andrew.pilltracker.MainActivityController$2.onDataChange(MainActivityController.java:71)
at com.google.firebase.database.core.ValueEventRegistration.fireEvent(com.google.firebase:firebase-database@@16.0.4:75)
at com.google.firebase.database.core.view.DataEvent.fire(com.google.firebase:firebase-database@@16.0.4:63)
at com.google.firebase.database.core.view.EventRaiser$1.run(com.google.firebase:firebase-database@@16.0.4:55)
at android.os.Handler.handleCallback(Handler.java:789)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6938)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)`


I don't know what the deal is. I'm trying to have the main controller import information about the pills from the database, and another activity creates the database for the pills, but I don't know how to transfer the reference data from the second activity to the main activity. I also don't know why I'm receiving this error. Below I've attached the main controller and the pill class. Thanks for your help!



package com.example.andrew.pilltracker;

import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.design.widget.BottomNavigationView;
import android.support.v7.app.AppCompatActivity;
import android.view.MenuItem;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.widget.TextView;

import com.google.firebase.database.DataSnapshot;
import com.google.firebase.database.DatabaseError;
import com.google.firebase.database.DatabaseReference;
import com.google.firebase.database.FirebaseDatabase;
import com.google.firebase.database.ValueEventListener;

import java.util.ArrayList;

public class MainActivityController extends AppCompatActivity {

private TextView mTextMessage;
private int databaseRef = 1;
private ListView mListView;

private FirebaseDatabase mFirebaseDatabase;
DatabaseReference mRootRef;
ArrayList<String> array = new ArrayList<>();



private BottomNavigationView.OnNavigationItemSelectedListener mOnNavigationItemSelectedListener
= new BottomNavigationView.OnNavigationItemSelectedListener() {

@Override
public boolean onNavigationItemSelected(@NonNull MenuItem item) {
switch (item.getItemId()) {
case R.id.navigation_home:
mTextMessage.setText(R.string.title_home);
return true;
case R.id.navigation_dashboard:
Intent intent = new Intent(MainActivityController.this, SecondActvty.class);
startActivity(intent);
return true;
case R.id.navigation_notifications:
mTextMessage.setText(R.string.title_notifications);
return true;
}
return false;
}
};

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main_view);

mListView = (ListView) findViewById(R.id.listview);

mFirebaseDatabase = FirebaseDatabase.getInstance();
mRootRef = mFirebaseDatabase.getReference();

mTextMessage = (TextView) findViewById(R.id.message);
BottomNavigationView navigation = (BottomNavigationView) findViewById(R.id.navigation);
navigation.setOnNavigationItemSelectedListener(mOnNavigationItemSelectedListener);

mRootRef.addValueEventListener(new ValueEventListener() {
@Override
public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
showData(dataSnapshot);
}

@Override
public void onCancelled(@NonNull DatabaseError databaseError) {

}
});

}

private void showData(DataSnapshot dataSnapshot){
for(DataSnapshot ds : dataSnapshot.getChildren()){
Pill pInfo = new Pill();

pInfo.setName(ds.getValue(Pill.class).getName());
pInfo.setCount(ds.child(Integer.toString(databaseRef)).getValue(Pill.class).getCount());
pInfo.setDose(ds.child(Integer.toString(databaseRef)).getValue(Pill.class).getDose());
pInfo.setDay(ds.child(Integer.toString(databaseRef)).getValue(Pill.class).getDay());

array.add(pInfo.getName());
array.add("Number of Pills Left: " + pInfo.getCount());
array.add("Number of Pills per Dose: " + pInfo.getDose());
array.add("Number of Doses per Day: " + pInfo.getDay());
ArrayAdapter adapter = new ArrayAdapter(this, android.R.layout.simple_list_item_1, array);
mListView.setAdapter(adapter);

}
}

//Database shit
@Override
protected void onStart(){
super.onStart();


}


}










share|improve this question

























  • You're using method of your Pill class in ArrayList of Strings object.

    – user10516751
    Nov 27 '18 at 7:23











  • Please add your database structure and the content of your Pill class. Please also responde with @AlexMamo

    – Alex Mamo
    Nov 27 '18 at 10:43











  • Got it. Thanks @AlexMamo

    – Andrew Hunter
    Nov 27 '18 at 14:03














0












0








0








So I am trying to make an app that will allow you to log different medications using a fire base database. I'm currently receiving this error when I launch the app.



11-26 13:48:37.056 6958-6958/com.example.andrew.pilltracker E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.andrew.pilltracker, PID: 6958
com.google.firebase.database.DatabaseException: Can't convert object of type java.util.ArrayList to type com.example.andrew.pilltracker.Pill
at com.google.firebase.database.core.utilities.encoding.CustomClassMapper.convertBean(com.google.firebase:firebase-database@@16.0.4:423)
at com.google.firebase.database.core.utilities.encoding.CustomClassMapper.deserializeToClass(com.google.firebase:firebase-database@@16.0.4:214)
at com.google.firebase.database.core.utilities.encoding.CustomClassMapper.convertToCustomClass(com.google.firebase:firebase-database@@16.0.4:79)
at com.google.firebase.database.DataSnapshot.getValue(com.google.firebase:firebase-database@@16.0.4:212)
at com.example.andrew.pilltracker.MainActivityController.showData(MainActivityController.java:86)
at com.example.andrew.pilltracker.MainActivityController.access$100(MainActivityController.java:21)
at com.example.andrew.pilltracker.MainActivityController$2.onDataChange(MainActivityController.java:71)
at com.google.firebase.database.core.ValueEventRegistration.fireEvent(com.google.firebase:firebase-database@@16.0.4:75)
at com.google.firebase.database.core.view.DataEvent.fire(com.google.firebase:firebase-database@@16.0.4:63)
at com.google.firebase.database.core.view.EventRaiser$1.run(com.google.firebase:firebase-database@@16.0.4:55)
at android.os.Handler.handleCallback(Handler.java:789)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6938)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)`


I don't know what the deal is. I'm trying to have the main controller import information about the pills from the database, and another activity creates the database for the pills, but I don't know how to transfer the reference data from the second activity to the main activity. I also don't know why I'm receiving this error. Below I've attached the main controller and the pill class. Thanks for your help!



package com.example.andrew.pilltracker;

import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.design.widget.BottomNavigationView;
import android.support.v7.app.AppCompatActivity;
import android.view.MenuItem;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.widget.TextView;

import com.google.firebase.database.DataSnapshot;
import com.google.firebase.database.DatabaseError;
import com.google.firebase.database.DatabaseReference;
import com.google.firebase.database.FirebaseDatabase;
import com.google.firebase.database.ValueEventListener;

import java.util.ArrayList;

public class MainActivityController extends AppCompatActivity {

private TextView mTextMessage;
private int databaseRef = 1;
private ListView mListView;

private FirebaseDatabase mFirebaseDatabase;
DatabaseReference mRootRef;
ArrayList<String> array = new ArrayList<>();



private BottomNavigationView.OnNavigationItemSelectedListener mOnNavigationItemSelectedListener
= new BottomNavigationView.OnNavigationItemSelectedListener() {

@Override
public boolean onNavigationItemSelected(@NonNull MenuItem item) {
switch (item.getItemId()) {
case R.id.navigation_home:
mTextMessage.setText(R.string.title_home);
return true;
case R.id.navigation_dashboard:
Intent intent = new Intent(MainActivityController.this, SecondActvty.class);
startActivity(intent);
return true;
case R.id.navigation_notifications:
mTextMessage.setText(R.string.title_notifications);
return true;
}
return false;
}
};

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main_view);

mListView = (ListView) findViewById(R.id.listview);

mFirebaseDatabase = FirebaseDatabase.getInstance();
mRootRef = mFirebaseDatabase.getReference();

mTextMessage = (TextView) findViewById(R.id.message);
BottomNavigationView navigation = (BottomNavigationView) findViewById(R.id.navigation);
navigation.setOnNavigationItemSelectedListener(mOnNavigationItemSelectedListener);

mRootRef.addValueEventListener(new ValueEventListener() {
@Override
public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
showData(dataSnapshot);
}

@Override
public void onCancelled(@NonNull DatabaseError databaseError) {

}
});

}

private void showData(DataSnapshot dataSnapshot){
for(DataSnapshot ds : dataSnapshot.getChildren()){
Pill pInfo = new Pill();

pInfo.setName(ds.getValue(Pill.class).getName());
pInfo.setCount(ds.child(Integer.toString(databaseRef)).getValue(Pill.class).getCount());
pInfo.setDose(ds.child(Integer.toString(databaseRef)).getValue(Pill.class).getDose());
pInfo.setDay(ds.child(Integer.toString(databaseRef)).getValue(Pill.class).getDay());

array.add(pInfo.getName());
array.add("Number of Pills Left: " + pInfo.getCount());
array.add("Number of Pills per Dose: " + pInfo.getDose());
array.add("Number of Doses per Day: " + pInfo.getDay());
ArrayAdapter adapter = new ArrayAdapter(this, android.R.layout.simple_list_item_1, array);
mListView.setAdapter(adapter);

}
}

//Database shit
@Override
protected void onStart(){
super.onStart();


}


}










share|improve this question
















So I am trying to make an app that will allow you to log different medications using a fire base database. I'm currently receiving this error when I launch the app.



11-26 13:48:37.056 6958-6958/com.example.andrew.pilltracker E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.andrew.pilltracker, PID: 6958
com.google.firebase.database.DatabaseException: Can't convert object of type java.util.ArrayList to type com.example.andrew.pilltracker.Pill
at com.google.firebase.database.core.utilities.encoding.CustomClassMapper.convertBean(com.google.firebase:firebase-database@@16.0.4:423)
at com.google.firebase.database.core.utilities.encoding.CustomClassMapper.deserializeToClass(com.google.firebase:firebase-database@@16.0.4:214)
at com.google.firebase.database.core.utilities.encoding.CustomClassMapper.convertToCustomClass(com.google.firebase:firebase-database@@16.0.4:79)
at com.google.firebase.database.DataSnapshot.getValue(com.google.firebase:firebase-database@@16.0.4:212)
at com.example.andrew.pilltracker.MainActivityController.showData(MainActivityController.java:86)
at com.example.andrew.pilltracker.MainActivityController.access$100(MainActivityController.java:21)
at com.example.andrew.pilltracker.MainActivityController$2.onDataChange(MainActivityController.java:71)
at com.google.firebase.database.core.ValueEventRegistration.fireEvent(com.google.firebase:firebase-database@@16.0.4:75)
at com.google.firebase.database.core.view.DataEvent.fire(com.google.firebase:firebase-database@@16.0.4:63)
at com.google.firebase.database.core.view.EventRaiser$1.run(com.google.firebase:firebase-database@@16.0.4:55)
at android.os.Handler.handleCallback(Handler.java:789)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6938)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)`


I don't know what the deal is. I'm trying to have the main controller import information about the pills from the database, and another activity creates the database for the pills, but I don't know how to transfer the reference data from the second activity to the main activity. I also don't know why I'm receiving this error. Below I've attached the main controller and the pill class. Thanks for your help!



package com.example.andrew.pilltracker;

import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.design.widget.BottomNavigationView;
import android.support.v7.app.AppCompatActivity;
import android.view.MenuItem;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.widget.TextView;

import com.google.firebase.database.DataSnapshot;
import com.google.firebase.database.DatabaseError;
import com.google.firebase.database.DatabaseReference;
import com.google.firebase.database.FirebaseDatabase;
import com.google.firebase.database.ValueEventListener;

import java.util.ArrayList;

public class MainActivityController extends AppCompatActivity {

private TextView mTextMessage;
private int databaseRef = 1;
private ListView mListView;

private FirebaseDatabase mFirebaseDatabase;
DatabaseReference mRootRef;
ArrayList<String> array = new ArrayList<>();



private BottomNavigationView.OnNavigationItemSelectedListener mOnNavigationItemSelectedListener
= new BottomNavigationView.OnNavigationItemSelectedListener() {

@Override
public boolean onNavigationItemSelected(@NonNull MenuItem item) {
switch (item.getItemId()) {
case R.id.navigation_home:
mTextMessage.setText(R.string.title_home);
return true;
case R.id.navigation_dashboard:
Intent intent = new Intent(MainActivityController.this, SecondActvty.class);
startActivity(intent);
return true;
case R.id.navigation_notifications:
mTextMessage.setText(R.string.title_notifications);
return true;
}
return false;
}
};

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main_view);

mListView = (ListView) findViewById(R.id.listview);

mFirebaseDatabase = FirebaseDatabase.getInstance();
mRootRef = mFirebaseDatabase.getReference();

mTextMessage = (TextView) findViewById(R.id.message);
BottomNavigationView navigation = (BottomNavigationView) findViewById(R.id.navigation);
navigation.setOnNavigationItemSelectedListener(mOnNavigationItemSelectedListener);

mRootRef.addValueEventListener(new ValueEventListener() {
@Override
public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
showData(dataSnapshot);
}

@Override
public void onCancelled(@NonNull DatabaseError databaseError) {

}
});

}

private void showData(DataSnapshot dataSnapshot){
for(DataSnapshot ds : dataSnapshot.getChildren()){
Pill pInfo = new Pill();

pInfo.setName(ds.getValue(Pill.class).getName());
pInfo.setCount(ds.child(Integer.toString(databaseRef)).getValue(Pill.class).getCount());
pInfo.setDose(ds.child(Integer.toString(databaseRef)).getValue(Pill.class).getDose());
pInfo.setDay(ds.child(Integer.toString(databaseRef)).getValue(Pill.class).getDay());

array.add(pInfo.getName());
array.add("Number of Pills Left: " + pInfo.getCount());
array.add("Number of Pills per Dose: " + pInfo.getDose());
array.add("Number of Doses per Day: " + pInfo.getDay());
ArrayAdapter adapter = new ArrayAdapter(this, android.R.layout.simple_list_item_1, array);
mListView.setAdapter(adapter);

}
}

//Database shit
@Override
protected void onStart(){
super.onStart();


}


}







java android firebase firebase-realtime-database






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 27 '18 at 3:43









PradyumanDixit

2,1772819




2,1772819










asked Nov 26 '18 at 18:59









Andrew HunterAndrew Hunter

12




12













  • You're using method of your Pill class in ArrayList of Strings object.

    – user10516751
    Nov 27 '18 at 7:23











  • Please add your database structure and the content of your Pill class. Please also responde with @AlexMamo

    – Alex Mamo
    Nov 27 '18 at 10:43











  • Got it. Thanks @AlexMamo

    – Andrew Hunter
    Nov 27 '18 at 14:03



















  • You're using method of your Pill class in ArrayList of Strings object.

    – user10516751
    Nov 27 '18 at 7:23











  • Please add your database structure and the content of your Pill class. Please also responde with @AlexMamo

    – Alex Mamo
    Nov 27 '18 at 10:43











  • Got it. Thanks @AlexMamo

    – Andrew Hunter
    Nov 27 '18 at 14:03

















You're using method of your Pill class in ArrayList of Strings object.

– user10516751
Nov 27 '18 at 7:23





You're using method of your Pill class in ArrayList of Strings object.

– user10516751
Nov 27 '18 at 7:23













Please add your database structure and the content of your Pill class. Please also responde with @AlexMamo

– Alex Mamo
Nov 27 '18 at 10:43





Please add your database structure and the content of your Pill class. Please also responde with @AlexMamo

– Alex Mamo
Nov 27 '18 at 10:43













Got it. Thanks @AlexMamo

– Andrew Hunter
Nov 27 '18 at 14:03





Got it. Thanks @AlexMamo

– Andrew Hunter
Nov 27 '18 at 14:03












0






active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53487424%2fcant-convert-object-of-type-arraylist-to-type-pill%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53487424%2fcant-convert-object-of-type-arraylist-to-type-pill%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Contact image not getting when fetch all contact list from iPhone by CNContact

count number of partitions of a set with n elements into k subsets

A CLEAN and SIMPLE way to add appendices to Table of Contents and bookmarks