Project

General

Profile

« Previous | Next » 

Revision 280dc794

Added by Leszek Koltunski over 2 years ago

Improve the behaviour of the Config and Tutorial activities when in the 'PopUpMode'. Also, remember the current object in the COnfig activity so that when we put it to the background and resume - the object stays.

View differences:

src/main/java/org/distorted/tutorials/TutorialActivity.java
134 134
      {
135 135
      super.onAttachedToWindow();
136 136

  
137
      float width = getScreenWidthInPixels();
138

  
139
      LinearLayout viewR = findViewById(R.id.tutorialRightBar);
140
      ViewGroup.LayoutParams paramsR = viewR.getLayoutParams();
141
      paramsR.width = (int)(width*BAR_RATIO);
142
      viewR.setLayoutParams(paramsR);
143

  
144
      if( mScreen==null ) mScreen = new TutorialScreen();
145

  
146
      mScreen.createRightPane(this);
147

  
148
      WebView videoView = findViewById(R.id.tutorialVideoView);
149
      mWebView = new TutorialWebView(videoView);
150
      mWebView.load(URL+mURL);
137
      if( mWebView==null )
138
        {
139
        WebView videoView = findViewById(R.id.tutorialVideoView);
140
        mWebView = new TutorialWebView(videoView);
141
        mWebView.load(URL+mURL);
142
        }
151 143
      }
152 144

  
153 145
///////////////////////////////////////////////////////////////////////////////////////////////////
......
198 190
      TutorialSurfaceView view = findViewById(R.id.tutorialSurfaceView);
199 191
      view.onResume();
200 192

  
193
      float width = getScreenWidthInPixels();
194

  
195
      LinearLayout viewR = findViewById(R.id.tutorialRightBar);
196
      ViewGroup.LayoutParams paramsR = viewR.getLayoutParams();
197
      paramsR.width = (int)(width*BAR_RATIO);
198
      viewR.setLayoutParams(paramsR);
199

  
200
      if( mScreen==null ) mScreen = new TutorialScreen();
201

  
202
      mScreen.createRightPane(this);
203

  
201 204
      if( mWebView!=null ) mWebView.onResume();
202 205

  
203 206
      if( mObjectOrdinal>=0 && mObjectOrdinal< RubikObjectList.getNumObjects() )

Also available in: Unified diff