¡@

Home 

2014/10/16 ¤W¤È 08:26:03

android Programming Glossary: textstatus.settext

Example: Communication between Activity and Service using Messaging

http://stackoverflow.com/questions/4300291/example-communication-between-activity-and-service-using-messaging

className IBinder service mService new Messenger service textStatus.setText Attached. try Message msg Message.obtain null MyService.MSG_REGISTER_CLIENT.. unexpectedly disconnected process crashed. mService null textStatus.setText Disconnected. @Override public void onCreate Bundle savedInstanceState.. private void restoreMe Bundle state if state null textStatus.setText state.getString textStatus textIntValue.setText state.getString..

Example: Android bi-directional network socket using AsyncTask

http://stackoverflow.com/questions/5135438/example-android-bi-directional-network-socket-using-asynctask

new OnClickListener public void onClick View v textStatus.setText Sending Message to AsyncTask. networktask.SendDataToNetwork.. onProgressUpdate values 0 .length bytes received. textStatus.setText new String values 0 @Override protected void onCancelled .. Log.i AsyncTask onPostExecute Completed with an Error. textStatus.setText There was a connection error. else Log.i AsyncTask onPostExecute..

Example: Communication between Activity and Service using Messaging

http://stackoverflow.com/questions/4300291/example-communication-between-activity-and-service-using-messaging

public void onServiceConnected ComponentName className IBinder service mService new Messenger service textStatus.setText Attached. try Message msg Message.obtain null MyService.MSG_REGISTER_CLIENT msg.replyTo mMessenger mService.send msg.. This is called when the connection with the service has been unexpectedly disconnected process crashed. mService null textStatus.setText Disconnected. @Override public void onCreate Bundle savedInstanceState super.onCreate savedInstanceState setContentView.. outState.putString textStrValue textStrValue.getText .toString private void restoreMe Bundle state if state null textStatus.setText state.getString textStatus textIntValue.setText state.getString textIntValue textStrValue.setText state.getString textStrValue..

Example: Android bi-directional network socket using AsyncTask

http://stackoverflow.com/questions/5135438/example-android-bi-directional-network-socket-using-asynctask

networktask.execute private OnClickListener btnSendListener new OnClickListener public void onClick View v textStatus.setText Sending Message to AsyncTask. networktask.SendDataToNetwork GET HTTP 1.1 r n r n public class NetworkTask extends AsyncTask.. byte ... values if values.length 0 Log.i AsyncTask onProgressUpdate values 0 .length bytes received. textStatus.setText new String values 0 @Override protected void onCancelled Log.i AsyncTask Cancelled. btnStart.setVisibility View.VISIBLE.. protected void onPostExecute Boolean result if result Log.i AsyncTask onPostExecute Completed with an Error. textStatus.setText There was a connection error. else Log.i AsyncTask onPostExecute Completed. btnStart.setVisibility View.VISIBLE @Override..