Search in sources :

Example 1 with MentionSuggestionBean

use of org.aisen.weibo.sina.support.bean.MentionSuggestionBean in project AisenWeiBo by wangdan.

the class MentionSuggestionFragment method onItemClick.

@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
    MentionSuggestionBean bean = getAdapterItems().get(position);
    WeiBoUser friend = bean.getUser();
    if (friend == null) {
        friend = new WeiBoUser();
        friend.setIdstr(bean.getSuggestUser().getUid());
        friend.setScreen_name(bean.getSuggestUser().getNickname());
        new UserShowTask().execute(friend.getScreen_name());
    } else {
        FriendMentionDB.addFriend(friend);
    }
    Intent data = new Intent();
    data.putExtra("bean", friend);
    getActivity().setResult(Activity.RESULT_OK, data);
    getActivity().finish();
}
Also used : MentionSuggestionBean(org.aisen.weibo.sina.support.bean.MentionSuggestionBean) WeiBoUser(org.aisen.weibo.sina.sinasdk.bean.WeiBoUser) Intent(android.content.Intent)

Aggregations

Intent (android.content.Intent)1 WeiBoUser (org.aisen.weibo.sina.sinasdk.bean.WeiBoUser)1 MentionSuggestionBean (org.aisen.weibo.sina.support.bean.MentionSuggestionBean)1