use of org.qii.weiciyuan.bean.UserBean in project weiciyuan by qii.
the class UserInfoFragment method newMsgLoaderSuccessCallback.
@Override
protected void newMsgLoaderSuccessCallback(MessageListBean newValue, Bundle loaderArgs) {
stopRefreshMenuAnimationIfPossible();
getListView().removeFooterView(progressFooter);
if (getActivity() != null && newValue.getSize() > 0) {
getList().addNewData(newValue);
getAdapter().notifyDataSetChanged();
getListView().setSelectionAfterHeaderView();
getActivity().invalidateOptionsMenu();
moreFooter.setVisibility(View.VISIBLE);
if (isMyself()) {
MyStatusDBTask.asyncReplace(getList(), userBean.getId());
}
UserBean userInfoFromServer = newValue.getItem(0).getUser();
if (userInfoFromServer != null && !isSinaWeiboBlockWeiciyuanFetchUserInfo(userInfoFromServer)) {
UserInfoFragment.this.userBean = userInfoFromServer;
displayBasicInfo();
displayCoverPicture();
if (getActivity() instanceof UserInfoActivity) {
((UserInfoActivity) getActivity()).setUser(userInfoFromServer);
getActivity().invalidateOptionsMenu();
}
}
}
}
use of org.qii.weiciyuan.bean.UserBean in project weiciyuan by qii.
the class UserTimeLineActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getActionBar().setDisplayHomeAsUpEnabled(true);
getActionBar().setDisplayShowTitleEnabled(true);
getActionBar().setDisplayShowHomeEnabled(false);
String token = getIntent().getStringExtra("token");
UserBean bean = getIntent().getParcelableExtra("user");
getActionBar().setTitle(bean.getScreen_name());
if (getSupportFragmentManager().findFragmentByTag(StatusesByIdTimeLineFragment.class.getName()) == null) {
getSupportFragmentManager().beginTransaction().replace(android.R.id.content, StatusesByIdTimeLineFragment.newInstance(bean, token), StatusesByIdTimeLineFragment.class.getName()).commit();
}
}
use of org.qii.weiciyuan.bean.UserBean in project weiciyuan by qii.
the class UserInfoActivity method processIntent.
private void processIntent(Intent intent) {
Parcelable[] rawMsgs = intent.getParcelableArrayExtra(NfcAdapter.EXTRA_NDEF_MESSAGES);
// only one message sent during the beam
NdefMessage msg = (NdefMessage) rawMsgs[0];
Toast.makeText(this, new String(msg.getRecords()[0].getPayload()), Toast.LENGTH_SHORT).show();
bean = new UserBean();
bean.setScreen_name(new String(msg.getRecords()[0].getPayload()));
}
use of org.qii.weiciyuan.bean.UserBean in project weiciyuan by qii.
the class DMActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getActionBar().setDisplayShowHomeEnabled(false);
getActionBar().setDisplayShowTitleEnabled(true);
getActionBar().setDisplayHomeAsUpEnabled(true);
UserBean bean = (UserBean) getIntent().getParcelableExtra("user");
setTitle(bean.getScreen_name());
if (savedInstanceState == null) {
getSupportFragmentManager().beginTransaction().replace(android.R.id.content, DMConversationListFragment.newInstance(bean), DMConversationListFragment.class.getName()).commit();
}
}
use of org.qii.weiciyuan.bean.UserBean in project weiciyuan by qii.
the class FanDao method removeFan.
public UserBean removeFan() throws WeiboException {
String url = URLHelper.FRIENDSHIPS_FOLLOWERS_DESTROY;
Map<String, String> map = new HashMap<String, String>();
map.put("access_token", access_token);
map.put("uid", uid);
String jsonData = HttpUtility.getInstance().executeNormalTask(HttpMethod.Post, url, map);
try {
UserBean value = new Gson().fromJson(jsonData, UserBean.class);
if (value != null) {
return value;
}
} catch (JsonSyntaxException e) {
AppLogger.e(e.getMessage());
}
return null;
}
Aggregations