当前位置: 首页>>代码示例>>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;未经允许,请勿转载。