Project

General

Profile

« Previous | Next » 

Revision ab19c113

Added by Leszek Koltunski about 1 year ago

Progress with Tutorial activity.

View differences:

src/main/java/org/distorted/tutorials/TutorialActivity.java
85 85

  
86 86
///////////////////////////////////////////////////////////////////////////////////////////////////
87 87

  
88
    private void showDialog()
88
    public void showDialog()
89 89
      {
90 90
      RubikObjectList.setCurrObject(mObjectOrdinal);
91 91
      Bundle bundle = new Bundle();
......
129 129
        {
130 130
        WebView videoView = findViewById(R.id.tutorialVideoView);
131 131
        mWebView = new TutorialWebView(videoView);
132
        mWebView.load(URL+url);
133 132
        }
133

  
134
      mWebView.load(URL+url);
134 135
      }
135 136

  
136 137
///////////////////////////////////////////////////////////////////////////////////////////////////
src/main/java/org/distorted/tutorials/TutorialScreen.java
24 24

  
25 25
public class TutorialScreen
26 26
{
27
  private TransparentImageButton mSolveButton, mScrambleButton, mBackButton;
27
  private TransparentImageButton mDialogButton, mSolveButton, mScrambleButton, mBackButton;
28 28
  private TransparentImageButton mLockButton, mEmptyButton1, mEmptyButton2, mEmptyButton3;
29 29
  private final LockController mLockController;
30 30
  private final MovesController mMovesController;
......
74 74
    mEmptyButton3.setClickable(false);
75 75
    }
76 76

  
77
///////////////////////////////////////////////////////////////////////////////////////////////////
78

  
79
  private void setupDialogButton(final TutorialActivity act)
80
    {
81
    LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT,LinearLayout.LayoutParams.MATCH_PARENT,1.0f);
82
    mDialogButton = new TransparentImageButton(act,R.drawable.ui_menu,params);
83

  
84
    mDialogButton.setOnClickListener( new View.OnClickListener()
85
      {
86
      @Override
87
      public void onClick(View v)
88
        {
89
        act.showDialog();
90
        }
91
      });
92
    }
93

  
77 94
///////////////////////////////////////////////////////////////////////////////////////////////////
78 95

  
79 96
  private void setupSolveButton(final TutorialActivity act)
......
139 156
      ObjectControl control = act.getControl();
140 157
      mMovesController.setupButton(act,control);
141 158
      mLockController.setupButton(act,control);
159
      setupDialogButton(act);
142 160
      setupSolveButton(act);
143 161
      setupScrambleButton(act);
162
      layout.addView(mDialogButton);
144 163
      layout.addView(mSolveButton);
145 164
      layout.addView(mScrambleButton);
146 165
      layout.addView(mMovesController.getButton());

Also available in: Unified diff