本文整理匯總了Java中net.oschina.app.bean.MyInformation類的典型用法代碼示例。如果您正苦於以下問題:Java MyInformation類的具體用法?Java MyInformation怎麽用?Java MyInformation使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
MyInformation類屬於net.oschina.app.bean包,在下文中一共展示了MyInformation類的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: loadUserInfoThread
import net.oschina.app.bean.MyInformation; //導入依賴的package包/類
private void loadUserInfoThread(final boolean isRefresh) {
loading = new LoadingDialog(this);
loading.show();
new Thread() {
public void run() {
Message msg = new Message();
try {
MyInformation user = ((AppContext) getApplication())
.getMyInformation(isRefresh);
msg.what = 1;
msg.obj = user;
} catch (AppException e) {
e.printStackTrace();
msg.what = -1;
msg.obj = e;
}
mHandler.sendMessage(msg);
}
}.start();
}
示例2: loadUserInfoThread
import net.oschina.app.bean.MyInformation; //導入依賴的package包/類
private void loadUserInfoThread(final boolean isRefresh){
loading = new LoadingDialog(this);
loading.show();
new Thread(){
public void run() {
Message msg = new Message();
try {
MyInformation user = ((AppContext)getApplication()).getMyInformation(isRefresh);
msg.what = 1;
msg.obj = user;
} catch (AppException e) {
e.printStackTrace();
msg.what = -1;
msg.obj = e;
}
mHandler.sendMessage(msg);
}
}.start();
}
示例3: myInformation
import net.oschina.app.bean.MyInformation; //導入依賴的package包/類
/**
* 我的個人資料
* @param appContext
* @param uid
* @return
* @throws AppException
*/
public static MyInformation myInformation(AppContext appContext, int uid) throws AppException {
Map<String,Object> params = new HashMap<String,Object>();
params.put("uid", uid);
try{
return MyInformation.parse(_post(appContext, URLs.MY_INFORMATION, params, null));
}catch(Exception e){
if(e instanceof AppException)
throw (AppException)e;
throw AppException.network(e);
}
}
示例4: initData
import net.oschina.app.bean.MyInformation; //導入依賴的package包/類
private void initData() {
mHandler = new Handler() {
public void handleMessage(Message msg) {
if (loading != null)
loading.dismiss();
if (msg.what == 1 && msg.obj != null) {
user = (MyInformation) msg.obj;
// 加載用戶頭像
UIHelper.showUserFace(face, user.getFace());
// 用戶性別
if (user.getGender() == 1)
gender.setImageResource(R.drawable.widget_gender_man);
else
gender.setImageResource(R.drawable.widget_gender_woman);
// 其他資料
name.setText(user.getName());
jointime.setText(StringUtils.friendly_time(user
.getJointime()));
from.setText(user.getFrom());
devplatform.setText(user.getDevplatform());
expertise.setText(user.getExpertise());
followers.setText(user.getFollowerscount() + "");
fans.setText(user.getFanscount() + "");
favorites.setText(user.getFavoritecount() + "");
favorites_ll.setOnClickListener(favoritesClickListener);
fans_ll.setOnClickListener(fansClickListener);
followers_ll.setOnClickListener(followersClickListener);
} else if (msg.obj != null) {
((AppException) msg.obj).makeToast(UserInfo.this);
}
}
};
this.loadUserInfoThread(false);
}
示例5: initData
import net.oschina.app.bean.MyInformation; //導入依賴的package包/類
private void initData(){
mHandler = new Handler(){
public void handleMessage(Message msg) {
if(loading != null) loading.dismiss();
if(msg.what == 1 && msg.obj != null){
user = (MyInformation)msg.obj;
//加載用戶頭像
UIHelper.showUserFace(face, user.getFace());
//用戶性別
if(user.getGender() == 1)
gender.setImageResource(R.drawable.widget_gender_man);
else
gender.setImageResource(R.drawable.widget_gender_woman);
//其他資料
name.setText(user.getName());
jointime.setText(StringUtils.friendly_time(user.getJointime()));
from.setText(user.getFrom());
devplatform.setText(user.getDevplatform());
expertise.setText(user.getExpertise());
followers.setText(user.getFollowerscount()+"");
fans.setText(user.getFanscount()+"");
favorites.setText(user.getFavoritecount()+"");
favorites_ll.setOnClickListener(favoritesClickListener);
fans_ll.setOnClickListener(fansClickListener);
followers_ll.setOnClickListener(followersClickListener);
}else if(msg.obj != null){
((AppException)msg.obj).makeToast(UserInfo.this);
}
}
};
this.loadUserInfoThread(false);
}