怎麼回事是代碼:使用Twitter的API創建Android應用程序,控制不線程
public void onClick(View v) {
Log.d(TAG, "hay i am working till here");
new Thread() {
public void run() {
try {
Log.d(TAG, "hay i reached till here");
twitter = new Twitter("student", "password");
twitter.setAPIRootUrl("http://yamba.marakana.com/api");
twitter.setStatus(editText.getText().toString());
Log.d(TAG,"Successfully Posted");
} catch (TwitterException e) {
Log.e(TAG, "Died", e);
}
}
}.start();
Log.d(TAG, "onClicked");
}
當我運行它,它只是達到第一個日誌即Log.d(TAG, "hay i am working till here");
我無法找出什麼問題是。
但你的問題是什麼? –