java - 如何更改 CountryCodePicker (CCP) 的对话框
解决方案
非常简单,您检查对话框何时打开,获取标题 textview 并以编程方式更改其文本,如下所示:
CountryCodePicker cpp;
cpp=(CountryCodePicker) findViewById(R.id.yourid);
cpp.setDialogEventsListener(new CountryCodePicker.DialogEventsListener() {
@Override
public void onCcpDialogOpen(Dialog dialog) {
//your code
TextView title =(TextView) dialog.findViewById(R.id.textView_title);
title.setText("Select Country or Region");
}
@Override
public void onCcpDialogDismiss(DialogInterface dialogInterface) {
//your code
}
@Override
public void onCcpDialogCancel(DialogInterface dialogInterface) {
//your code
}
});
推荐阅读
- javascript - 引导表从 DOM 中删除一行会破坏向表中添加更多行的能力
- angularjs - 我如何将相应的 FormGroup 传递给表单布局组件(父级)?
- proxy - Chromium CPU 消耗标签或新实例?
- javascript - 如何仅在满足条件时调用 JS 函数
- python - Pygame 不会在鼠标移动时显示字母瓦的移动
- lc3 - LC-3 如何存储大于 16 位的数字并将其打印到控制台?
- android - 如何从android中的纬度和经度获取完整的地址?
- reactjs - 为什么 Firestore 的 limit() 不更新?
- ethereum - 如何使用智能合约在以太坊区块链上存储 IPFS 哈希?
- python - 当我尝试从表中抓取数据时没有数据出现