private void loadProfileInfo() { MyTwitterApp.getRestClient() .getMyInfo( new JsonHttpResponseHandler() { @Override public void onSuccess(JSONObject json) { User u = User.fromJson(json); getActionBar().setTitle("@" + u.getScreenName()); populateProfileHeader(u); } }); }
private void loadProfileInfo(String username) { MyTwitterApp.getRestClient() .getUserInfo( username, new JsonHttpResponseHandler() { @Override public void onSuccess(JSONObject json) { User user = User.fromJson(json); getActionBar().setTitle("@" + user.getScreenName()); // updateUserInfo(); populateProfileHeader(user); } public void onFailure(Throwable e, JSONObject error) { Log.e("ERROR", e.toString()); } }); }