Project

General

Profile

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

magiccube / src / main / java / org / distorted / dialogs / RubikDialogSolverError.java @ 4bd09fe2

1 ca292407 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 ca292407 Leszek Koltunski
///////////////////////////////////////////////////////////////////////////////////////////////////
9
10
package org.distorted.dialogs;
11
12
import android.app.Dialog;
13 66e777b0 Leszek Koltunski
import androidx.fragment.app.FragmentActivity;
14 fb37b424 Leszek Koltunski
15
import android.util.TypedValue;
16 ca292407 Leszek Koltunski
import android.view.View;
17
import android.widget.TextView;
18
19
import org.distorted.main.R;
20
21
///////////////////////////////////////////////////////////////////////////////////////////////////
22
23 c02fa107 Leszek Koltunski
public class RubikDialogSolverError extends RubikDialogAbstract
24 ca292407 Leszek Koltunski
  {
25 f8a21f6b Leszek Koltunski
  public int getResource()      { return R.layout.dialog_solver_error; }
26
  public int getTitleResource() { return R.string.error; }
27
  public boolean hasArgument()  { return true; }
28
  public int getPositive()      { return R.string.ok; }
29
  public int getNegative()      { return -1; }
30 244cc23f leszek
  public void positiveAction()  { }
31
  public void negativeAction()  { }
32 85248b04 Leszek Koltunski
33 c02fa107 Leszek Koltunski
///////////////////////////////////////////////////////////////////////////////////////////////////
34 fb37b424 Leszek Koltunski
35 c02fa107 Leszek Koltunski
  public void prepareBody(Dialog dialog, View view, FragmentActivity act, float size)
36
    {
37
    TextView text = view.findViewById(R.id.solver_error);
38
    text.setTextSize(TypedValue.COMPLEX_UNIT_PX, size);
39
    text.setText(mArgument);
40 ca292407 Leszek Koltunski
    }
41
  }