Project

General

Profile

Download (2.04 KB) Statistics
| Branch: | Tag: | Revision:

magiccube / src / main / java / org / distorted / dialogs / RubikDialogAbandon.java @ master

1 9f006481 Leszek Koltunski
///////////////////////////////////////////////////////////////////////////////////////////////////
2
// Copyright 2020 Leszek Koltunski                                                               //
3
//                                                                                               //
4
// This file is part of Magic Cube.                                                              //
5
//                                                                                               //
6 68191e7d Leszek Koltunski
// 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 9f006481 Leszek Koltunski
///////////////////////////////////////////////////////////////////////////////////////////////////
9
10
package org.distorted.dialogs;
11
12
import android.app.Dialog;
13
import android.view.View;
14 e1637420 leszek
import android.widget.TextView;
15 9f006481 Leszek Koltunski
16
import androidx.fragment.app.FragmentActivity;
17
18
import org.distorted.main.R;
19 7bb30586 leszek
import org.distorted.playui.PlayActivity;
20
import org.distorted.playui.ScreenList;
21 9f006481 Leszek Koltunski
22
///////////////////////////////////////////////////////////////////////////////////////////////////
23
24 b5c2adb4 Leszek Koltunski
public class RubikDialogAbandon extends RubikDialogAbstract
25 9f006481 Leszek Koltunski
  {
26 e1637420 leszek
  public int getResource()      { return R.layout.dialog_message; }
27 f8a21f6b Leszek Koltunski
  public int getTitleResource() { return -1; }
28
  public boolean hasArgument()  { return false; }
29
  public int getPositive()      { return R.string.yes; }
30
  public int getNegative()      { return R.string.no; }
31 7bb30586 leszek
  public void negativeAction()  { }
32 c02fa107 Leszek Koltunski
33 b5c2adb4 Leszek Koltunski
///////////////////////////////////////////////////////////////////////////////////////////////////
34 9f006481 Leszek Koltunski
35 f8a21f6b Leszek Koltunski
  public void positiveAction()
36 b5c2adb4 Leszek Koltunski
    {
37 7bb30586 leszek
    final PlayActivity act = (PlayActivity)getContext();
38
    ScreenList.goBack(act);
39 9f006481 Leszek Koltunski
    }
40 e1637420 leszek
41
///////////////////////////////////////////////////////////////////////////////////////////////////
42
43
  public void prepareBody(Dialog dialog, View view, FragmentActivity act, float size)
44
    {
45
    TextView mess = view.findViewById(R.id.dialog_message);
46
    mess.setText(R.string.abandon_solve);
47
    }
48 9f006481 Leszek Koltunski
  }