mirror of
https://github.com/KokaKiwi/BarInsta
synced 2024-11-22 22:57:29 +00:00
make changes in dialog
This commit is contained in:
parent
38b7f29d44
commit
407f0680c1
@ -445,31 +445,10 @@ public class StoryViewerFragment extends Fragment {
|
|||||||
binding.swipeUp.setOnClickListener(v -> {
|
binding.swipeUp.setOnClickListener(v -> {
|
||||||
final Object tag = v.getTag();
|
final Object tag = v.getTag();
|
||||||
if (tag instanceof CharSequence) {
|
if (tag instanceof CharSequence) {
|
||||||
DialogInterface.OnClickListener dialogClickListener = new DialogInterface.OnClickListener() {
|
new AlertDialog.Builder(context)
|
||||||
@Override
|
.setTitle(R.string.swipe_up_confirmation)
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
.setMessage(tag.toString()).setPositiveButton(R.string.yes, (d, w) -> Utils.openURL(context, tag.toString()))
|
||||||
switch (which){
|
.setNegativeButton(R.string.no, (d, w) -> d.dismiss()).show();
|
||||||
case DialogInterface.BUTTON_POSITIVE:
|
|
||||||
//Yes button clicked
|
|
||||||
Utils.openURL(context, tag.toString());
|
|
||||||
break;
|
|
||||||
|
|
||||||
case DialogInterface.BUTTON_NEGATIVE:
|
|
||||||
//No button clicked
|
|
||||||
dialog.dismiss();
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
dialog.dismiss();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
AlertDialog.Builder builder = new AlertDialog.Builder(context);
|
|
||||||
builder.setTitle(R.string.swipe_up_confirmation);
|
|
||||||
builder.setMessage(tag.toString()).setPositiveButton("Yes", dialogClickListener)
|
|
||||||
.setNegativeButton("No", dialogClickListener).show();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
binding.viewStoryPost.setOnClickListener(v -> {
|
binding.viewStoryPost.setOnClickListener(v -> {
|
||||||
|
Loading…
Reference in New Issue
Block a user