Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void initwallet(){
- new GetWalletsTask(getContext()) {
- @Override
- protected void onSuccess(String wallets) throws Exception {
- super.onSuccess(wallets);
- if (wallets != null) {
- super.onSuccess(wallets);
- JSONObject wallet_json=new JSONObject(wallets);
- TableLayout payment_bottom=(TableLayout)this.findViewById(R.id.payment_bottom);
- total_wallets=wallet_json.getJSONArray("total");
- for(int i=0;i<total_wallets.length();i++){
- JSONObject individual_json=total_wallets.getJSONObject(i);
- //Log.d("walletslist",individual_json.getString("currency")+"/"+individual_json.getString("amount"));
- TableRow row= new TableRow(getContext());
- TableRow.LayoutParams lp = new TableRow.LayoutParams(TableRow.LayoutParams.WRAP_CONTENT);
- row.setLayoutParams(lp);
- TextView tv1 = new TextView(getContext());
- tv1.setText("SAR");
- TextView tv2 = new TextView(getContext());
- tv1.setText("");
- TextView tv3 = new TextView(getContext());
- tv1.setText("100");
- row.addView(tv1);
- row.addView(tv2);
- row.addView(tv3);
- payment_bottom.addView(row,i);
- }
- }
- }
- }.execute();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement