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

Refreshing Activity When Dialog Dismisses
how to find out the file to which a particular resource belongs to in eclipse, for android development?
UDP packets between WiFi-tethered device and WiFi tether provider?
Make a hyperlink textview in android
Android widgets: addView not working with RemoteViews object
How to make an Android phone as bluetooth headset
Mixing PhoneGap and Native Application Views
Is there any way to compile GnuTLS in eclipse?
Android SQLiteDatabase query sorting order
Where does android set padding for nine-patch image?
Android USB accessory/ Host Mode
How can I get a “done” button in softkeyboard?
Android how to make EditText editable inside a ListView
What is android.permission.SET_PROCESS_LIMIT used for in an android application?
Manifest Defined Broadcast Receiver for email CRUD
How can I disable Activesync if I detect a rooted phone on Android?

Categories

HOME
paraview
webdriver
flex
requirements
grafana
scripting
character
bing-maps
distribution
line
automatic-ref-counting
flash-player
template-engine
shortest-path
bourbon
lilypond
blade
squashfs
ember-cli
parcelable
joptionpane
scriptella
aggregation
resourcebundle
bulletphysics
errbot
cppreference
testcomplete
kudu
paragraph
glib
fstream
catch-unit-test
jett
dsx-desktop
html-encode
reverse
baidu-map
searchkit
google-knowledge-graph
graphhopper
dm-script
amazon-ses
css-position
chef-solo
azure-arm
magento-1.9.3
stringtokenizer
sharp-snmp
optimizely
fwrite
remedy
arq
tinkerpop
static-cast
jqchart
rackspace-cloud
objectscript
django-1.10
polyline
redbeard-ios
watch-os-2
greatest-n-per-group
android-dateutils
fuzzywuzzy
exim4
user-management
jaunt-api
dynamics-nav-2016
vigenere
dronekit-android
avahi
telepat
snackbar
variadic-templates
showdialog
ghcjs
teaspoon
parallel-testing
mt4j
rolify
mongohq
frameworkelementfactory
os.system
subgraph
oracle-enterprise-linux
httponly
cross-database
hibernateexception
denied
update-statement
google-floodlight
lr
ajax-polling
eclipse-marketplace
sun
todos

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