File tree Expand file tree Collapse file tree
de.vogella.android.ownservice.local
src/de/vogella/android/ownservice/local Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1313 android : id =" @+id/button1"
1414 android : layout_width =" wrap_content"
1515 android : layout_height =" wrap_content"
16- android : onClick =" showServiceData "
17- android : text =" Button " >
16+ android : onClick =" onClick "
17+ android : text =" Update " >
1818 </Button >
1919
2020 <ListView
Original file line number Diff line number Diff line change 1717public class MainActivity extends ListActivity {
1818 private LocalWordService s ;
1919
20- /** Called when the activity is first created. */
2120 @ Override
2221 public void onCreate (Bundle savedInstanceState ) {
2322 super .onCreate (savedInstanceState );
@@ -61,9 +60,8 @@ public void onServiceDisconnected(ComponentName className) {
6160 private ArrayAdapter <String > adapter ;
6261 private List <String > wordList ;
6362
64- public void showServiceData (View view ) {
63+ public void onClick (View view ) {
6564 if (s != null ) {
66-
6765 Toast .makeText (this , "Number of elements" + s .getWordList ().size (),
6866 Toast .LENGTH_SHORT ).show ();
6967 wordList .clear ();
You can’t perform that action at this time.
0 commit comments