1
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
2
|
// Copyright 2023 Leszek Koltunski //
|
3
|
// //
|
4
|
// This file is part of Magic Cube. //
|
5
|
// //
|
6
|
// Magic Cube is proprietary software licensed under an EULA which you should have received //
|
7
|
// along with the code. If not, check https://distorted.org/magic/License-Magic-Cube.html //
|
8
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
9
|
|
10
|
package org.distorted.dialogs;
|
11
|
|
12
|
import android.app.Activity;
|
13
|
import android.app.Dialog;
|
14
|
import android.view.View;
|
15
|
|
16
|
import androidx.fragment.app.FragmentActivity;
|
17
|
|
18
|
import org.distorted.main.R;
|
19
|
|
20
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
21
|
|
22
|
public class RubikDialogExit extends RubikDialogAbstract
|
23
|
{
|
24
|
public int getResource() { return R.layout.exit_app; }
|
25
|
public int getTitleResource() { return -1; }
|
26
|
public boolean hasArgument() { return false; }
|
27
|
public int getPositive() { return R.string.yes; }
|
28
|
public int getNegative() { return R.string.no; }
|
29
|
public void negativeAction() { }
|
30
|
public void prepareBody(Dialog dialog, View view, FragmentActivity act, float size) { }
|
31
|
|
32
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
33
|
|
34
|
public void positiveAction()
|
35
|
{
|
36
|
final Activity act = (Activity)getContext();
|
37
|
if( act!=null ) act.finish();
|
38
|
}
|
39
|
}
|