-1
我在20秒後在主要活動中創建了一個彈出窗口。我在我的用戶界面的右上角有一個小的imageview。我希望我的彈出窗口來自該圖像(如動畫或縮放圖像中的閃光並顯示彈出窗口)。我怎樣才能做到這一點?希望你明白我想問什麼。這是我在MainActivity類中完成的彈出代碼。在android中彈出的動畫
Handler handler = new Handler();
handler.postDelayed(new Runnable() {
@Override
public void run() {
new AlertDialog.Builder(context)
.setTitle("Win Free Recharge")
.setMessage("Do you want to earn free recharge?")
.setPositiveButton(R.string.yes, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
// continue with delete
Intent intent = new Intent(MainActivity.this, WebActivity.class);
startActivity(intent);
}
})
.setNegativeButton(R.string.no, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
// do nothing
}
})
.setIcon(R.drawable.inr1)
.show();
}
}, 20000);
Thanks!彈出對話框很好,但我的主要問題是我怎樣才能從我的用戶界面右上角的圖像視圖。我希望我的彈出窗口來自該圖像的閃光燈。這裏只是在一段時間後纔出現。請幫忙!!! –