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


Java CredentialDescription類代碼示例

本文整理匯總了Java中org.irmacard.credentials.info.CredentialDescription的典型用法代碼示例。如果您正苦於以下問題:Java CredentialDescription類的具體用法?Java CredentialDescription怎麽用?Java CredentialDescription使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


CredentialDescription類屬於org.irmacard.credentials.info包,在下文中一共展示了CredentialDescription類的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: onActivityResult

import org.irmacard.credentials.info.CredentialDescription; //導入依賴的package包/類
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
	if(requestCode == SETTINGS_REQUEST) {
		if(resultCode == SettingsActivity.RESULT_CHANGE_CARD_PIN)
			onChangeCardPIN();
		else if(resultCode == SettingsActivity.RESULT_CHANGE_CRED_PIN)
			onChangeCredPIN();
	} else if(requestCode == DETAIL_REQUEST) {
		if (resultCode == CredentialDetailActivity.RESULT_DELETE) {
			CredentialDescription cd = (CredentialDescription) data
					.getSerializableExtra(CredentialDetailActivity.ARG_RESULT_DELETE);
			onDeleteCredential(cd);
		}
	}
}
 
開發者ID:credentials,項目名稱:irma_android_management,代碼行數:16,代碼來源:CredentialListActivity.java

示例2: onDeleteCredential

import org.irmacard.credentials.info.CredentialDescription; //導入依賴的package包/類
public void onDeleteCredential(CredentialDescription cd) {
	Log.i("blaat", "Delete credential called");
	toBeDeleted = cd;
	currentAction = Action.DELETE_CREDENTIAL;
	Log.i("blaat", "Will delete: " + cd.toString());

	gotoState(State.TEST_CARD_PRESENCE);
}
 
開發者ID:credentials,項目名稱:irma_android_management,代碼行數:9,代碼來源:CredentialListActivity.java

示例3: getInstance

import org.irmacard.credentials.info.CredentialDescription; //導入依賴的package包/類
public static ConfirmDeleteDialogFragment getInstance(CredentialDescription cd) {
       ConfirmDeleteDialogFragment f = new ConfirmDeleteDialogFragment();

       Bundle args = new Bundle();
       args.putSerializable(EXTRA_CREDENTIAL, cd);
       f.setArguments(args);

       return f;
}
 
開發者ID:credentials,項目名稱:irma_android_management,代碼行數:10,代碼來源:ConfirmDeleteDialogFragment.java

示例4: onCreate

import org.irmacard.credentials.info.CredentialDescription; //導入依賴的package包/類
@Override
  public void onCreate(Bundle savedInstanceState) {
  	super.onCreate(savedInstanceState);

credentialDescription = (CredentialDescription) getArguments()
		.getSerializable(EXTRA_CREDENTIAL);
  }
 
開發者ID:credentials,項目名稱:irma_android_management,代碼行數:8,代碼來源:ConfirmDeleteDialogFragment.java

示例5: getView

import org.irmacard.credentials.info.CredentialDescription; //導入依賴的package包/類
@Override
public View getView(int position, View convert_view, ViewGroup parent) {
	View view = convert_view;
	if (view == null) {
		view = inflater.inflate(R.layout.list_item, null);
	}

	TextView name = (TextView) view
			.findViewById(R.id.item_label);

	CredentialDescription desc = credentials.get(position).getCredentialDescription();
	name.setText(desc.getShortName());
	return view;
}
 
開發者ID:credentials,項目名稱:irma_android_management,代碼行數:15,代碼來源:CredentialListAdapter.java

示例6: render

import org.irmacard.credentials.info.CredentialDescription; //導入依賴的package包/類
/**
 * Render the specified attributes, adding them to the specified list.
 *
 * @param credential The credential.
 * @param list The list to add the rendered attributes to.
 * @param includeTitle If true, the title of the credential will also be rendered and the attributes get a bullet
 *                     in front of them (creating an unordered list).
 * @param disclosedAttributes If specified, those attributes found in the credential but not here will be shown in
 *                            light grey to indicate they are not being disclosed.
 */
public void render(Attributes attributes, LinearLayout list, boolean includeTitle, Attributes
		disclosedAttributes) {
	CredentialDescription cd = attributes.getCredentialDescription();

	if (includeTitle) {
		TextView attrName = new TextView(context);
		attrName.setTextAppearance(context, R.style.DetailHeading);
		attrName.setText(cd.getName());
		attrName.setTextColor(Color.BLACK);
		list.addView(attrName);
	}

	for (AttributeDescription desc : cd.getAttributes()) {
		View attributeView = inflater.inflate(R.layout.row_attribute, null);

		TextView name = (TextView) attributeView.findViewById(R.id.detail_attribute_name);
		TextView value = (TextView) attributeView.findViewById(R.id.detail_attribute_value);

		if (disclosedAttributes != null) {
			if (disclosedAttributes.get(desc.getName()) != null) {
				value.setTextColor(Color.BLACK);
				value.setTextAppearance(context, R.style.DetailHeading);
			} else {
				name.setTextColor(context.getResources().getColor(R.color.irmagrey));
				value.setTextColor(context.getResources().getColor(R.color.irmagrey));
			}
		}

		if (includeTitle) {
			name.setText(" \u2022 " + desc.getName() + ":");
		} else {
			name.setText(desc.getName() + ":");
		}
		value.setText(new String(attributes.get(desc.getName())));

		list.addView(attributeView);
	}
}
 
開發者ID:credentials,項目名稱:irma_android_library,代碼行數:49,代碼來源:AttributesRenderer.java

示例7: CredentialPackage

import org.irmacard.credentials.info.CredentialDescription; //導入依賴的package包/類
public CredentialPackage(CredentialDescription credDesc, Attributes attributes) {
	this.credDesc = credDesc;
	this.attributes = attributes;
}
 
開發者ID:credentials,項目名稱:irma_android_library,代碼行數:5,代碼來源:CredentialPackage.java

示例8: getCredentialDescription

import org.irmacard.credentials.info.CredentialDescription; //導入依賴的package包/類
public CredentialDescription getCredentialDescription() {
	return credDesc;
}
 
開發者ID:credentials,項目名稱:irma_android_library,代碼行數:4,代碼來源:CredentialPackage.java


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