當前位置: 首頁>>代碼示例>>Java>>正文


Java MyInformation類代碼示例

本文整理匯總了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();
}
 
開發者ID:WallaceLiu,項目名稱:oschina-android-app,代碼行數:22,代碼來源:UserInfo.java

示例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();
}
 
開發者ID:segerbing,項目名稱:OSChina,代碼行數:21,代碼來源:UserInfo.java

示例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);
	}
}
 
開發者ID:WallaceLiu,項目名稱:oschina-android-app,代碼行數:20,代碼來源:ApiClient.java

示例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);
}
 
開發者ID:WallaceLiu,項目名稱:oschina-android-app,代碼行數:40,代碼來源:UserInfo.java

示例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);
}
 
開發者ID:segerbing,項目名稱:OSChina,代碼行數:38,代碼來源:UserInfo.java


注:本文中的net.oschina.app.bean.MyInformation類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。