当前位置: 首页>>代码示例>>Java>>正文


Java QuickContactBadge.assignContactUri方法代码示例

本文整理汇总了Java中android.widget.QuickContactBadge.assignContactUri方法的典型用法代码示例。如果您正苦于以下问题:Java QuickContactBadge.assignContactUri方法的具体用法?Java QuickContactBadge.assignContactUri怎么用?Java QuickContactBadge.assignContactUri使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在android.widget.QuickContactBadge的用法示例。


在下文中一共展示了QuickContactBadge.assignContactUri方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: addContact

import android.widget.QuickContactBadge; //导入方法依赖的package包/类
private void addContact(final Player contact, int place) {
	final View v = LayoutInflater.from(this).inflate(R.layout.player_prize_item, null);
	TextView p = (TextView) v.findViewById(R.id.playerPlace);
    p.setText((place + 1) + "");
	
    TextView name = (TextView) v.findViewById(R.id.playerName);
    name.setText(contact.getDisplayName());
    
    TextView spend = (TextView) v.findViewById(R.id.playerSpend);
    spend.setText(contact.getMoneySpend(Helper.getSelectedTournament(this)) + " " + Helper.getCurrency(this));
    
    if (contact.getUri() != null) {
     QuickContactBadge badge =  (QuickContactBadge) v.findViewById(R.id.playerBadge);
     badge.assignContactUri(contact.getUri());
     badge.setMode(QuickContact.MODE_MEDIUM);
     if (contact.getPhoto() != null) {
     	badge.setImageBitmap(contact.getPhoto());
     } 
    }
    
    list.addView(v);
}
 
开发者ID:lebesnec,项目名称:Poker-Director,代码行数:23,代码来源:TournamentEndingActivity.java

示例2: addContactPayout

import android.widget.QuickContactBadge; //导入方法依赖的package包/类
private void addContactPayout(final Player contact, int place, LinearLayout list) {
	final View v = LayoutInflater.from(this).inflate(R.layout.player_prize_item, null);
	TextView p = (TextView) v.findViewById(R.id.playerPlace);
    p.setText((place + 1) + "");
	
    TextView name = (TextView) v.findViewById(R.id.playerName);
    if (contact.isOut()) {
    	name.setText(contact.getDisplayName());
    } else {
    	name.setText("???");
    }
    
    if (contact.isOut() && contact.getUri() != null) {
     QuickContactBadge badge =  (QuickContactBadge) v.findViewById(R.id.playerBadge);
     badge.assignContactUri(contact.getUri());
     badge.setMode(QuickContact.MODE_MEDIUM);
     if (contact.getPhoto() != null) {
     	badge.setImageBitmap(contact.getPhoto());
     } 
    }
    
    list.addView(v);
}
 
开发者ID:lebesnec,项目名称:Poker-Director,代码行数:24,代码来源:RunningTournamentActivity.java

示例3: addQuickContactActionBar

import android.widget.QuickContactBadge; //导入方法依赖的package包/类
private void addQuickContactActionBar(ActionBar actionBar) {

		Drawable avatarDrawable;
		sDefaultContactImage = ComposeMessageActivity.this.getResources()
				.getDrawable(R.drawable.ic_contact_picture);

		ViewGroup v = (ViewGroup) LayoutInflater.from(this).inflate(
				R.layout.test_actionbar, null);
		actionBar.setDisplayShowCustomEnabled(true);
		actionBar.setCustomView(v);

		mAvatar = (QuickContactBadge) v.findViewById(R.id.test_avatar);

		Contact contact = mConversation.getRecipients().get(0);
		avatarDrawable = contact.getAvatar(ComposeMessageActivity.this,
				sDefaultContactImage);

		if (contact.existsInDatabase()) {// 010
			mAvatar.assignContactUri(contact.getUri());
		} else {
			mAvatar.assignContactFromPhone(contact.getNumber(), true);
		}
		mAvatar.setImageDrawable(avatarDrawable);
		mAvatar.setVisibility(View.VISIBLE);
		// mAvatar.assignContactUri(contactUri)

		actionBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM
				| ActionBar.DISPLAY_SHOW_TITLE);

	}
 
开发者ID:CommonQ,项目名称:sms_DualCard,代码行数:31,代码来源:ComposeMessageActivity.java

示例4: prepareContactBadge

import android.widget.QuickContactBadge; //导入方法依赖的package包/类
public static void prepareContactBadge(final Activity activity,
		QuickContactBadge badge, final Contact contact, Context context) {
	if (contact.getSystemAccount() != null) {
		String[] systemAccount = contact.getSystemAccount().split("#");
		long id = Long.parseLong(systemAccount[0]);
		badge.assignContactUri(Contacts.getLookupUri(id, systemAccount[1]));
	}
	badge.setImageBitmap(UIHelper.getContactPicture(contact, 72, context,
			false));
}
 
开发者ID:GitESS,项目名称:SyncChatAndroid,代码行数:11,代码来源:UIHelper.java

示例5: addContact

import android.widget.QuickContactBadge; //导入方法依赖的package包/类
private void addContact(final Player contact) {
  	final View v = LayoutInflater.from(this).inflate(R.layout.player_item, null);
  	this.registerForContextMenu(v);
      TextView name = (TextView) v.findViewById(R.id.playerName);
      name.setText(contact.getDisplayName());
      TextView table = (TextView) v.findViewById(R.id.tableTextView);
      if (contact.getTable() >= 0) {
      	table.setText("table " + (contact.getTable() + 1));
      } else {
      	table.setText("");
      }
      TextView seat = (TextView) v.findViewById(R.id.seatTextView);
      if (contact.getSeat() >= 0) {
      	seat.setText("seat " + (contact.getSeat() + 1));
      } else {
      	seat.setText("");
      }
      
      if (contact.getUri() != null) {
       QuickContactBadge badge =  (QuickContactBadge) v.findViewById(R.id.playerBadge);
       badge.assignContactUri(contact.getUri());
       badge.setMode(QuickContact.MODE_MEDIUM);
       if (contact.getPhoto() != null) {
       	badge.setImageBitmap(contact.getPhoto());
       } 
      }
      
      v.setTag(contact);
      list.addView(v);
      
      View remove = v.findViewById(R.id.list_button);
      remove.setOnClickListener(new OnClickListener() {					
	public void onClick(View theButton) {
		list.removeView(v);
		players.remove(contact);	
		refreshTitle();
	}
});
      
      refreshTitle();
  }
 
开发者ID:lebesnec,项目名称:Poker-Director,代码行数:42,代码来源:PlayersListActivity.java

示例6: getPlayerView1

import android.widget.QuickContactBadge; //导入方法依赖的package包/类
private View getPlayerView1(final Player contact, final boolean buyIn) {
  	final View v = LayoutInflater.from(this).inflate(R.layout.player_check_item, null);
  	
  	TextView val = (TextView) v.findViewById(R.id.buyIn);
  	if (buyIn) {
  		val.setText(tournament.getBuyin() + " " + Helper.getCurrency(this) + " : ");    		
  	} else {
  		val.setText(tournament.getAddon() + " " + Helper.getCurrency(this) + " : ");
  	}
  	
      TextView name = (TextView) v.findViewById(R.id.playerName);
      name.setText(contact.getDisplayName());
      
      if (contact.getUri() != null) {
       QuickContactBadge badge =  (QuickContactBadge) v.findViewById(R.id.playerBadge);
       badge.assignContactUri(contact.getUri());
       badge.setMode(QuickContact.MODE_MEDIUM);
       if (contact.getPhoto() != null) {
       	badge.setImageBitmap(contact.getPhoto());
       } 
      }
      
      CheckBox checkbox = (CheckBox) v.findViewById(R.id.CheckBox);
      checkbox.setOnCheckedChangeListener(new OnCheckedChangeListener() {			
	public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
		if (isChecked) {
			if (buyIn) {
				contact.setPlace(0);
				contact.setOut(false);
				contact.setBuyinUsed(true);
				totalMoney = totalMoney + tournament.getBuyin();
				chipsTotal = chipsTotal + tournament.getChipsBuyin();
			} else {
				contact.setAddonUsed(contact.getAddonUsed() + 1);
				totalMoney = totalMoney + tournament.getAddon();
				chipsTotal = chipsTotal + tournament.getChipsAddon();
			}
		} else {
			if (buyIn) {
				contact.setPlace(tournament.getRemainingPlayer());
				contact.setOut(true);
				contact.setBuyinUsed(false);
				totalMoney = totalMoney - tournament.getBuyin();
				chipsTotal = chipsTotal - tournament.getChipsBuyin();
			} else {
				contact.setAddonUsed(contact.getAddonUsed() - 1);
				totalMoney = totalMoney - tournament.getAddon();
				chipsTotal = chipsTotal - tournament.getChipsAddon();
			}
		}
	}
});
      
      v.setTag(contact);
      return v;
  }
 
开发者ID:lebesnec,项目名称:Poker-Director,代码行数:57,代码来源:RunningTournamentActivity.java


注:本文中的android.widget.QuickContactBadge.assignContactUri方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。