本文整理汇总了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);
}
}
}
示例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);
}
示例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;
}
示例4: onCreate
import org.irmacard.credentials.info.CredentialDescription; //导入依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
credentialDescription = (CredentialDescription) getArguments()
.getSerializable(EXTRA_CREDENTIAL);
}
示例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;
}
示例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);
}
}
示例7: CredentialPackage
import org.irmacard.credentials.info.CredentialDescription; //导入依赖的package包/类
public CredentialPackage(CredentialDescription credDesc, Attributes attributes) {
this.credDesc = credDesc;
this.attributes = attributes;
}
示例8: getCredentialDescription
import org.irmacard.credentials.info.CredentialDescription; //导入依赖的package包/类
public CredentialDescription getCredentialDescription() {
return credDesc;
}