Advertisement
Guest User

Untitled

a guest
Nov 16th, 2013
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.12 KB | None | 0 0
  1. // Changes the values for a bunch of TextViews on the GUI
  2.         protected void onPostExecute(String result){
  3.            
  4.            
  5.             if (xmlPullParserArray[9][1].toString().equals(null)) {
  6.            
  7.                 companyNameTextView.setText(xmlPullParserArray[9][1]);
  8.                 yearLowTextView.setText("Year Low: " + xmlPullParserArray[4][1]);
  9.                 yearHighTextView.setText("Year High: " + xmlPullParserArray[5][1]);
  10.                 daysLowTextView.setText("Days Low: " + xmlPullParserArray[2][1]);
  11.                 daysHighTextView.setText("Days High: " + xmlPullParserArray[3][1]);
  12.                 lastTradePriceOnlyTextView.setText("Last Price: " + xmlPullParserArray[7][1]);
  13.                 changeTextView.setText("Change: " + xmlPullParserArray[1][1]);
  14.                 daysRangeTextView.setText("Daily Price Range: " + xmlPullParserArray[8][1]);
  15.             } else {
  16.                 AlertDialog.Builder builder = new AlertDialog.Builder(StockInfoActivity.this);
  17.                
  18.                 builder.setTitle(R.string.invalid_stock_symbol);
  19.                
  20.                 builder.setPositiveButton(R.string.ok, null);
  21.                
  22.                 builder.setMessage(R.string.missing_stock_symbol);
  23.                
  24.                 AlertDialog theAlertDialog = builder.create();
  25.                
  26.                 theAlertDialog.show();
  27.             }
  28.            
  29.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement