Skip to content

Instantly share code, notes, and snippets.

@pbrewczynski
Created June 3, 2013 20:00
Show Gist options
  • Save pbrewczynski/5700899 to your computer and use it in GitHub Desktop.
Save pbrewczynski/5700899 to your computer and use it in GitHub Desktop.
private void insertStockInScrollView(String stock, int arrayIndex) {
LayoutInflater inflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View myRootTableLayout = inflater.inflate(R.layout.stock_qoute_row, stockTableL);
System.out.println(myRootTableLayout);
TextView newStockTextView = (TextView) myRootTableLayout.findViewById(R.id.stockSymbolTextView);
newStockTextView.setText(stock);
System.out.println(newStockTextView);
Button stockQuoteButton = (Button) myRootTableLayout.findViewById(R.id.stockQuoteButton);
stockQuoteButton.setOnClickListener(getStockActivityListener);
Button qoteFromWebButton = (Button) myRootTableLayout.findViewById(R.id.qoteFromWebButton);
qoteFromWebButton.setOnClickListener(getStockFromWebsiteListener);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment