AAPL +0.12% IBM -0.25% etc... )
Using java Syntax Highlighting
- //XML file
- <Ticker id="@+id/ticker"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_marginTop="20dip">
- <TextView id="@+id/tickerText"
- android:layout_width="wrap_content"
- android:layout_height="fill_parent"
- android:text="@string/ticker_1_tickerText_text"/>
- </Ticker>
Parsed in 0.032 seconds, using GeSHi 1.0.8.4
Using java Syntax Highlighting
- //java file
- mTickerText = (TextView) findViewById(R.id.tickerText);
- mUserText = (EditText) findViewById(R.id.userText);
- mTickerText.setText(mUserText.getText());
Parsed in 0.030 seconds, using GeSHi 1.0.8.4
I would like to know how am i supposed to know that i have to put :
<TextView /> inside <Ticker /> ??
I'm asking this because i thought the " mTickerText.setText(mUserText.getText()); " line already took care about this.
if you do:
Using java Syntax Highlighting
- //XML file
- <Ticker id="@+id/ticker"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_marginTop="20dip">
- </Ticker>
- <TextView id="@+id/tickerText"
- android:layout_width="wrap_content"
- android:layout_height="fill_parent"
- android:text="@string/ticker_1_tickerText_text"/>
Parsed in 0.035 seconds, using GeSHi 1.0.8.4
with the " mTickerText.setText(mUserText.getText()); " line, it doesn't work...
It's ok for this, coz now i know i have to put <TextView /> inside <Ticker />, but what if there's that kind of problem with other java class for the xml file?How would i know?


[/align]



