commit eb49fa90657cb76160f0a249773d712db99d632c
Author: Leszek Koltunski <leszek@koltunski.pl>
Date:   Wed Oct 6 01:04:53 2021 +0200

    Use the off-center objects to display the object in Tutorial mode properly.
    Now it is not covered by the right bar!

diff --git a/src/main/java/org/distorted/tutorials/TutorialActivity.java b/src/main/java/org/distorted/tutorials/TutorialActivity.java
index 6b99ad41..bbc8f1cc 100644
--- a/src/main/java/org/distorted/tutorials/TutorialActivity.java
+++ b/src/main/java/org/distorted/tutorials/TutorialActivity.java
@@ -41,14 +41,13 @@ import org.distorted.objectlib.main.ObjectType;
 import org.distorted.main.R;
 import org.distorted.dialogs.RubikDialogError;
 
-import static org.distorted.main.RubikRenderer.BRIGHTNESS;
-
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
 public class TutorialActivity extends AppCompatActivity
 {
     private static final String URL = "https://www.youtube.com/embed/";
 
+    public static final float BAR_RATIO = 0.15f;
     public static final float DIALOG_BUTTON_SIZE  = 0.06f;
     public static final float MENU_BIG_TEXT_SIZE  = 0.05f;
 
@@ -128,22 +127,13 @@ public class TutorialActivity extends AppCompatActivity
       {
       super.onAttachedToWindow();
 
-      final float RATIO = 0.15f;
       float width = getScreenWidthInPixels();
 
-      TutorialSurfaceView viewL = findViewById(R.id.tutorialSurfaceView);
-      ViewGroup.LayoutParams paramsL = viewL.getLayoutParams();
-      paramsL.width = (int)(width*(1.0f-RATIO));
-      viewL.setLayoutParams(paramsL);
-
       LinearLayout viewR = findViewById(R.id.tutorialRightBar);
       ViewGroup.LayoutParams paramsR = viewR.getLayoutParams();
-      paramsR.width = (int)(width*RATIO);
+      paramsR.width = (int)(width*BAR_RATIO);
       viewR.setLayoutParams(paramsR);
 
-      final int color = (int)(BRIGHTNESS*255);
-      viewR.setBackgroundColor( (0xFF<<24)+(color<<16)+(color<<8)+color);
-
       if( mState==null ) mState = new TutorialScreen();
 
       mState.createRightPane(this,width);
diff --git a/src/main/java/org/distorted/tutorials/TutorialSurfaceView.java b/src/main/java/org/distorted/tutorials/TutorialSurfaceView.java
index f4d39a46..45a43c22 100644
--- a/src/main/java/org/distorted/tutorials/TutorialSurfaceView.java
+++ b/src/main/java/org/distorted/tutorials/TutorialSurfaceView.java
@@ -48,6 +48,7 @@ public class TutorialSurfaceView extends GLSurfaceView
       mScreenWidth = width;
       mScreenHeight= height;
       mObjectController.setScreenSize(width,height);
+      mObjectController.setMove( (int)(-0.5f*width*TutorialActivity.BAR_RATIO), 0);
       }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/main/res/layout/main.xml b/src/main/res/layout/main.xml
index 1292a41f..882c41d7 100644
--- a/src/main/res/layout/main.xml
+++ b/src/main/res/layout/main.xml
@@ -1,20 +1,20 @@
 <?xml version="1.0" encoding="utf-8"?>
 <RelativeLayout  xmlns:android="http://schemas.android.com/apk/res/android"
     android:id="@+id/relativeLayout"
-    android:layout_width="fill_parent"
-    android:layout_height="fill_parent" >
+    android:layout_width="match_parent"
+    android:layout_height="match_parent" >
 
     <org.distorted.main.RubikSurfaceView
         android:id="@+id/rubikSurfaceView"
-        android:layout_width="fill_parent"
-        android:layout_height="fill_parent"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
         android:layout_alignParentStart="true"
         android:layout_alignParentTop="true"/>
 
     <LinearLayout
         android:id="@+id/hiddenBar"
         android:layout_alignParentTop="true"
-        android:layout_width="fill_parent"
+        android:layout_width="match_parent"
         android:layout_height="0dp"
         android:gravity="center"
         android:orientation="horizontal"
diff --git a/src/main/res/layout/tutorial.xml b/src/main/res/layout/tutorial.xml
index d6b6a914..c83676e0 100644
--- a/src/main/res/layout/tutorial.xml
+++ b/src/main/res/layout/tutorial.xml
@@ -13,28 +13,27 @@
         android:layout_height="0dp"
         android:layout_weight="1"/>
 
-    <LinearLayout
+    <RelativeLayout
         android:id="@+id/tutorialLowerPart"
         android:layout_width="match_parent"
         android:layout_height="0dp"
-        android:layout_weight="1.2"
-        android:orientation="horizontal"
-        android:background="@android:color/transparent">
+        android:layout_weight="1.2">
 
         <org.distorted.tutorials.TutorialSurfaceView
            android:id="@+id/tutorialSurfaceView"
-           android:layout_width="0dp"
-           android:layout_height="match_parent"/>
+           android:layout_width="match_parent"
+           android:layout_height="match_parent"
+           android:layout_alignParentStart="true"/>
 
         <LinearLayout
            android:id="@+id/tutorialRightBar"
+           android:layout_alignParentRight="true"
            android:layout_width="0dp"
            android:layout_height="match_parent"
-
            android:orientation="vertical"
            android:background="@android:color/transparent">
+        </LinearLayout>
 
+    </RelativeLayout>
+</LinearLayout>
 
-        </LinearLayout>
-    </LinearLayout>
-</LinearLayout>
\ No newline at end of file
