我有大约60个.pfx文件用于项目的所有主要程序集.它们是唯一的文件,但我使用相同的密码.
从Windows Vista升级到Windows 7后,当我单击Visual Studio 2008中的Build时,我会收到一个Import Key File对话框,要求输入密码.
这本来没问题,但插入密码后我得到一个错误对话框:错误导入密钥 - 对象已经存在.
有任何想法吗?
我创建了一个带按钮和非按下状态选择器的ImageButton,这很好用.
但是按钮的形状不规则,我只希望它可以在底层矩形图像不透明的地方点击.
所以我实现了一个OnTouchListener,它根据Bitmap的像素值检查触摸事件的坐标(如第一个答案中所述:链接).就判断是否按下按钮的逻辑而言,这是有效的,但现在按钮的图像不再变为按下的图像.
这是我有的:
选择器xml文件:
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
<item android:state_pressed="true" android:drawable="@drawable/button_start_call_pressed" />
<item android:drawable="@drawable/button_start_call_normal" />
</selector>
Run Code Online (Sandbox Code Playgroud)
布局中部分透明的ImageButton:
<ImageButton
android:id="@+id/dashboardStartCallButton"
android:background="@null"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/start_call_button_selector"
/>
Run Code Online (Sandbox Code Playgroud)
在活动中:
public void onCreate(Bundle savedInstance) {
super.onCreate(savedInstance);
...
ImageButton startCallButton = (ImageButton) this.findViewById(R.id.dashboardStartCallButton);
startCallButton.setOnTouchListener(new OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
return OnStartCallButtonTouch(v,event);
}
});
}
public boolean OnStartCallButtonTouch(View v, MotionEvent event)
{
Bitmap TheBitmap = BitmapFactory.decodeResource(getResources(), R.drawable.button_start_call_normal);
int eventPadTouch = event.getAction();
int iX = (int) event.getX();
int …
Run Code Online (Sandbox Code Playgroud) android ×1
certificate ×1
clickable ×1
imagebutton ×1
pfx ×1
touch ×1
transparent ×1
windows-7 ×1