I\'ve created one model class to store my product name,price and quantity,and then I attach it to another Fragment
and try to display it in my TextView
I can't really follow all this code. If I understand you correctly, you are having a problem passing the data around between your Activity
, AsyncTask
and Fragment
s. A good architecture here would be to have the Activity
keep track of the data. The Fragment
can always ask the Activity
for the data and the AsyncTask
can also call back to the Activity
to update the data.
If this isn't enough information to solve your problem, please show exactly the place where you are having trouble.