android


How to set json response to the RecyclerView and cardview


I am making an app using retrofit where after payment successful JSON data shows and I want to set that data on the last page which is thank you page. I want to set some data on RecyclerView and cardview I don't understand how to set this data on last page after payment successful. Following is my code please tell me how to set json data on RecyclerView and cardview.
JSONObject jObject;
try {
jObject = new JSONObject(response.toString());
PaymentId = jObject.getString("PaymentId");
AccountId = jObject.getString("AccountId");
MerchantRefNo = jObject.getString("MerchantRefNo");
Amount = jObject.getString("Amount");
DateCreated = jObject.getString("DateCreated");
Description = jObject.getString("Description");
Mode = jObject.getString("Mode");
IsFlagged = jObject.getString("IsFlagged");
BillingName = jObject.getString("BillingName");
BillingAddress = jObject
.getString("BillingAddress");
BillingCity = jObject.getString("BillingCity");
BillingState = jObject.getString("BillingState");
BillingPostalCode = jObject
.getString("BillingPostalCode");
BillingCountry = jObject
.getString("BillingCountry");
BillingPhone = jObject.getString("BillingPhone");
BillingEmail = jObject.getString("BillingEmail");
DeliveryName = jObject.getString("DeliveryName");
DeliveryAddress = jObject
.getString("DeliveryAddress");
DeliveryCity = jObject.getString("DeliveryCity");
DeliveryState = jObject.getString("DeliveryState");
DeliveryPostalCode = jObject
.getString("DeliveryPostalCode");
DeliveryCountry = jObject
.getString("DeliveryCountry");
DeliveryPhone = jObject.getString("DeliveryPhone");
PaymentStatus = jObject.getString("PaymentStatus");
PaymentMode = jObject.getString("PaymentMode");
SecureHash = jObject.getString("SecureHash");
ResponseCode = jObject.getString("ResponseCode");
Error = "-";
Unmappedstatus = jObject.getString("ResponseMessage");
TransactionID = jObject.getString("TransactionId");
SortOrder = "0";
IsEnable = "1";
CreateDate = date;
LastModified = date;
Remark = "-";
HDFCID = "0";
System.out.println("paymentid_rsp" + PaymentId);
if(PaymentStatus.equalsIgnoreCase("failed")){
tryAgainLayout.setVisibility(View.VISIBLE);
btn_payment_success.setVisibility(View.GONE);
}else{
btn_payment_success.setVisibility(View.VISIBLE);
tryAgainLayout.setVisibility(View.GONE);
}
TableLayout table_payment = (TableLayout) findViewById(R.id.table_payment);
ArrayList<String> arrlist = new ArrayList<>();
arrlist.add("PaymentId");
arrlist.add("AccountId ");
arrlist.add("MerchantRefNo");
arrlist.add("Amount");
arrlist.add("DateCreated");
arrlist.add("Description");
arrlist.add("Mode");
arrlist.add("IsFlagged");
arrlist.add("BillingName");
arrlist.add("BillingAddress");
arrlist.add("BillingCity");
arrlist.add("BillingState");
arrlist.add("BillingPostalCode");
arrlist.add("BillingCountry");
arrlist.add("BillingPhone");
arrlist.add("BillingEmail");
arrlist.add("DeliveryName");
arrlist.add("DeliveryAddress");
arrlist.add("DeliveryCity");
arrlist.add("DeliveryState");
arrlist.add("DeliveryPostalCode");
arrlist.add("DeliveryCountry");
arrlist.add("DeliveryPhone");
arrlist.add("PaymentStatus");
arrlist.add("PaymentMode");
arrlist.add("SecureHash");
arrlist.add("SortOrder");
arrlist.add("IsEnable");
arrlist.add("CreateDate");
arrlist.add("LastModified");
arrlist.add("Remark");
arrlist.add("HDFCID");
ArrayList<String> arrlist1 = new ArrayList<>();
arrlist1.add(PaymentId);
arrlist1.add(AccountId );
arrlist1.add(MerchantRefNo);
arrlist1.add(Amount);
arrlist1.add(DateCreated);
arrlist1.add(Description);
arrlist1.add(Mode);
arrlist1.add(IsFlagged);
arrlist1.add(BillingName);
arrlist1.add(BillingAddress);
arrlist1.add(BillingCity);
arrlist1.add(BillingState);
arrlist1.add(BillingPostalCode);
arrlist1.add(BillingCountry);
arrlist1.add(BillingPhone);
arrlist1.add(BillingEmail);
arrlist1.add(DeliveryName);
arrlist1.add(DeliveryAddress);
arrlist1.add(DeliveryCity);
arrlist1.add(DeliveryState);
arrlist1.add(DeliveryPostalCode);
arrlist1.add(DeliveryCountry);
arrlist1.add(DeliveryPhone);
arrlist1.add(PaymentStatus);
arrlist1.add(PaymentMode);
arrlist1.add(SecureHash);
arrlist1.add(SortOrder);
arrlist1.add(IsEnable);
arrlist1.add(CreateDate);
arrlist1.add(LastModified);
arrlist1.add(Remark);
arrlist1.add(HDFCID);
I want to set BillingName and amount from this activity to next activity. Please tell me how to do this , any suggestion is welcomed.

Related Links

How to bypass the automatic selection of the display of the form (Customized View) on Android device?
Camera Preview not working when i added surface view as Header of GridView | Andorid
Receive a notification for my application when a download completes
Listview items were added in wrong place
Using android camera with an explicit intent
android how to disable changing through apps
How to start a DialogFragment with transition in Android?
Node GCM with proxy - port 443 disabled
How to design a paragraph style title in android:
how to use getExternalStoragePublicDirectory()?
How to use/import a github project into existing android studio project?
Missing api_key/current key with Google Services 3.0.0
Null Pointer Exception In Method Boolean.Org.Json.Jsonobject Do in background async task
Android, Location Coordinates changing when sitting still [closed]
Spotify player not showing in emulator
How do I store information and add new content whenever needed?

Categories

HOME
beautifulsoup
phpword
prism
gdb
gpu
phpmyadmin
google-spreadsheet
angular-formly
powerpoint
themes
fftw
jwplayer
bitbucket-api
nsbundle
scripting
spring-session
azure-container-service
gluon-mobile
banner
nfs
arangodb
little-proxy
openstreetmap
endeca
text-mining
mod-security
enterprise-architect
docx
bitnami
package-managers
null-pointer
standards
google-container-registry
cgbitmapcontext
object-storage
jboss6.x
windows-server-2003
syntax-highlighting
shared
appirater
outliers
ms-access-2003
winexe
custom-controls
left-join
cart
autolisp
clickjacking
mailkit
code-snippets
github3.py
reactjs.net
numpy-broadcasting
z-notation
recurrent-neural-network
attributeerror
movilizer
microsoft-metro
claims
apollostack
monkey-testing
identification
magic-draw
aquamacs
boxing
yii2-user
libjpeg
structuremap4
rsa-archer-grc
stax
microstation
vulcanize
model-associations
clipboard.js
swizzling
freepbx
kango-framework
lua-telegram-bot
lz77
nupic
themoviedb-api
poppler
jdk1.7
bufferedinputstream
rapidsvn
machine-instruction
raygun
angular-carousel
kissfft
grails-plugin-rabbitmq
memset
radiant
drupal-nodes
accesscontrolexception
artemis
gtm-oauth2
cocoalibspotify-2.0
hidapi
observium
workitem
nebula
poker
server-administration
virtual-pc
patricia-trie
landscape-portrait
catransform3d
clrstoredprocedure
diagrams
resharper-6.0
instantiationexception
facebook-iframe
drupal-fivestar
scrubyt
movieplayer
cardspace

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App