first of all sorry for my language. i want to show dialog which has message like this ," hello , your app license about the expire. tap "here" and buy new license! " and also has "do not show again" button and " remind me later" button. i want to make that "here" word clickable. when user click it ,i redirect him to the link. for example https://stackoverflow.com/ thanks for your interests ! have a nice day =)
i tried this but did not work. when i tap "here" after dialog shown, nothing happening. my dialog is here,
AlertDialog.Builder alertLicenseExpire = new AlertDialog.Builder(TabActivity.this);
alertLicenseExpire.setTitle(getString(R.string.dialog_warning_license_title));
alertLicenseExpire.setMessage(String.format(getString(R.string.dialog_warning_license_exparation),getString(R.string.url_here)));
alertLicenseExpire.setCancelable(false);
alertLicenseExpire.setPositiveButton("remind me later", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
handler.post(new Runnable() {
@Override
public void run() {
Toast.makeText(getApplicationContext(),"I am going to do something good..",Toast.LENGTH_SHORT).show(); }
});
}
});
alertLicenseExpire.setNegativeButton("Do not show again", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
handler.post(new Runnable() {
@Override
public void run() {
Toast.makeText(getApplicationContext(),"You won't see that massage again",Toast.LENGTH_SHORT).show(); }
});
}
});
alertLicenseExpire.show();
and here my strings ,
<string name="dialog_warning_license_title">Warning of License Expiration</string>
<string name="dialog_warning_license_exparation">Your license is about expire In order to continue to use app, please click %s for purchase a new license.</string>
<string name="url_here"><a href="https://stackoverflow.com/">here</a><string>