commit 0fd3ac1fd215e5550261e4fd0fe3cf32bf54303c
Author: Leszek Koltunski <leszek@koltunski.pl>
Date:   Sun Feb 16 22:30:12 2020 +0000

    Making the Dialogs more consistent.

diff --git a/src/main/java/org/distorted/magic/RubikAbout.java b/src/main/java/org/distorted/magic/RubikAbout.java
deleted file mode 100644
index 0cb2f073..00000000
--- a/src/main/java/org/distorted/magic/RubikAbout.java
+++ /dev/null
@@ -1,61 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////////////////////////
-// Copyright 2019 Leszek Koltunski                                                               //
-//                                                                                               //
-// This file is part of Magic Cube.                                                              //
-//                                                                                               //
-// Magic Cube is free software: you can redistribute it and/or modify                            //
-// it under the terms of the GNU General Public License as published by                          //
-// the Free Software Foundation, either version 2 of the License, or                             //
-// (at your option) any later version.                                                           //
-//                                                                                               //
-// Magic Cube is distributed in the hope that it will be useful,                                 //
-// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
-// GNU General Public License for more details.                                                  //
-//                                                                                               //
-// You should have received a copy of the GNU General Public License                             //
-// along with Magic Cube.  If not, see <http://www.gnu.org/licenses/>.                           //
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-package org.distorted.magic;
-
-import android.app.Dialog;
-import android.content.DialogInterface;
-import android.os.Bundle;
-import android.support.annotation.NonNull;
-import android.support.v4.app.FragmentActivity;
-import android.support.v7.app.AlertDialog;
-import android.support.v7.app.AppCompatDialogFragment;
-import android.view.LayoutInflater;
-import android.view.View;
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-public class RubikAbout extends AppCompatDialogFragment
-  {
-  @NonNull
-  @Override
-  public Dialog onCreateDialog(Bundle savedInstanceState)
-    {
-    FragmentActivity act = getActivity();
-    AlertDialog.Builder builder = new AlertDialog.Builder(act);
-
-    builder.setTitle(R.string.app_version);
-    builder.setIcon(R.drawable.button3);
-    builder.setCancelable(false);
-    builder.setPositiveButton( R.string.ok, new DialogInterface.OnClickListener()
-      {
-      @Override
-      public void onClick(DialogInterface dialog, int which)
-        {
-
-        }
-      });
-
-    LayoutInflater inflater = act.getLayoutInflater();
-    final View view = inflater.inflate(R.layout.about, null);
-    builder.setView(view);
-
-    return builder.create();
-    }
-  }
diff --git a/src/main/java/org/distorted/magic/RubikActivity.java b/src/main/java/org/distorted/magic/RubikActivity.java
index 89abfd34..3e8b4049 100644
--- a/src/main/java/org/distorted/magic/RubikActivity.java
+++ b/src/main/java/org/distorted/magic/RubikActivity.java
@@ -151,7 +151,7 @@ public class RubikActivity extends AppCompatActivity implements View.OnClickList
 
     public void Settings(View v)
       {
-      RubikSettings settings = new RubikSettings();
+      RubikDialogSettings settings = new RubikDialogSettings();
       settings.show(getSupportFragmentManager(), null);
       }
 
@@ -163,7 +163,7 @@ public class RubikActivity extends AppCompatActivity implements View.OnClickList
       Bundle bundle = new Bundle();
       bundle.putInt("tab", view.getRedButton());
 
-      RubikScores scores = new RubikScores();
+      RubikDialogScores scores = new RubikDialogScores();
       scores.setArguments(bundle);
       scores.show(getSupportFragmentManager(), null);
       }
@@ -172,7 +172,7 @@ public class RubikActivity extends AppCompatActivity implements View.OnClickList
 
     public void About(View v)
       {
-      RubikAbout about = new RubikAbout();
+      RubikDialogAbout about = new RubikDialogAbout();
       about.show(getSupportFragmentManager(), null);
       }
 
diff --git a/src/main/java/org/distorted/magic/RubikDialogAbout.java b/src/main/java/org/distorted/magic/RubikDialogAbout.java
new file mode 100644
index 00000000..3b0a9dd8
--- /dev/null
+++ b/src/main/java/org/distorted/magic/RubikDialogAbout.java
@@ -0,0 +1,66 @@
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright 2019 Leszek Koltunski                                                               //
+//                                                                                               //
+// This file is part of Magic Cube.                                                              //
+//                                                                                               //
+// Magic Cube is free software: you can redistribute it and/or modify                            //
+// it under the terms of the GNU General Public License as published by                          //
+// the Free Software Foundation, either version 2 of the License, or                             //
+// (at your option) any later version.                                                           //
+//                                                                                               //
+// Magic Cube is distributed in the hope that it will be useful,                                 //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
+// GNU General Public License for more details.                                                  //
+//                                                                                               //
+// You should have received a copy of the GNU General Public License                             //
+// along with Magic Cube.  If not, see <http://www.gnu.org/licenses/>.                           //
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+package org.distorted.magic;
+
+import android.app.Dialog;
+import android.content.DialogInterface;
+import android.os.Bundle;
+import android.support.annotation.NonNull;
+import android.support.v4.app.FragmentActivity;
+import android.support.v7.app.AlertDialog;
+import android.support.v7.app.AppCompatDialogFragment;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.widget.TextView;
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+public class RubikDialogAbout extends AppCompatDialogFragment
+  {
+  @NonNull
+  @Override
+  public Dialog onCreateDialog(Bundle savedInstanceState)
+    {
+    FragmentActivity act = getActivity();
+    LayoutInflater inflater = act.getLayoutInflater();
+    AlertDialog.Builder builder = new AlertDialog.Builder(act);
+
+    TextView tv = (TextView) inflater.inflate(R.layout.dialog_title, null);
+    tv.setText(R.string.about_title);
+    builder.setCustomTitle(tv);
+
+    builder.setCancelable(true);
+    builder.setPositiveButton( R.string.ok, new DialogInterface.OnClickListener()
+      {
+      @Override
+      public void onClick(DialogInterface dialog, int which)
+        {
+
+        }
+      });
+
+    final View view = inflater.inflate(R.layout.dialog_about, null);
+    TextView text = view.findViewById(R.id.about_version);
+    text.setText(R.string.app_version);
+    builder.setView(view);
+
+    return builder.create();
+    }
+  }
diff --git a/src/main/java/org/distorted/magic/RubikDialogMain.java b/src/main/java/org/distorted/magic/RubikDialogMain.java
new file mode 100644
index 00000000..171da73f
--- /dev/null
+++ b/src/main/java/org/distorted/magic/RubikDialogMain.java
@@ -0,0 +1,61 @@
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright 2019 Leszek Koltunski                                                               //
+//                                                                                               //
+// This file is part of Magic Cube.                                                              //
+//                                                                                               //
+// Magic Cube is free software: you can redistribute it and/or modify                            //
+// it under the terms of the GNU General Public License as published by                          //
+// the Free Software Foundation, either version 2 of the License, or                             //
+// (at your option) any later version.                                                           //
+//                                                                                               //
+// Magic Cube is distributed in the hope that it will be useful,                                 //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
+// GNU General Public License for more details.                                                  //
+//                                                                                               //
+// You should have received a copy of the GNU General Public License                             //
+// along with Magic Cube.  If not, see <http://www.gnu.org/licenses/>.                           //
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+package org.distorted.magic;
+
+import android.app.Dialog;
+import android.content.DialogInterface;
+import android.os.Bundle;
+import android.support.annotation.NonNull;
+import android.support.v4.app.FragmentActivity;
+import android.support.v7.app.AlertDialog;
+import android.support.v7.app.AppCompatDialogFragment;
+import android.view.LayoutInflater;
+import android.view.View;
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+public class RubikDialogMain extends AppCompatDialogFragment
+  {
+  @NonNull
+  @Override
+  public Dialog onCreateDialog(Bundle savedInstanceState)
+    {
+    FragmentActivity act = getActivity();
+    AlertDialog.Builder builder = new AlertDialog.Builder(act);
+
+    builder.setTitle(R.string.app_version);
+    builder.setIcon(R.drawable.button3);
+    builder.setCancelable(false);
+    builder.setPositiveButton( R.string.ok, new DialogInterface.OnClickListener()
+      {
+      @Override
+      public void onClick(DialogInterface dialog, int which)
+        {
+
+        }
+      });
+
+    LayoutInflater inflater = act.getLayoutInflater();
+    final View view = inflater.inflate(R.layout.dialog_about, null);
+    builder.setView(view);
+
+    return builder.create();
+    }
+  }
diff --git a/src/main/java/org/distorted/magic/RubikDialogScores.java b/src/main/java/org/distorted/magic/RubikDialogScores.java
new file mode 100644
index 00000000..5917e5e0
--- /dev/null
+++ b/src/main/java/org/distorted/magic/RubikDialogScores.java
@@ -0,0 +1,99 @@
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright 2019 Leszek Koltunski                                                               //
+//                                                                                               //
+// This file is part of Magic Cube.                                                              //
+//                                                                                               //
+// Magic Cube is free software: you can redistribute it and/or modify                            //
+// it under the terms of the GNU General Public License as published by                          //
+// the Free Software Foundation, either version 2 of the License, or                             //
+// (at your option) any later version.                                                           //
+//                                                                                               //
+// Magic Cube is distributed in the hope that it will be useful,                                 //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
+// GNU General Public License for more details.                                                  //
+//                                                                                               //
+// You should have received a copy of the GNU General Public License                             //
+// along with Magic Cube.  If not, see <http://www.gnu.org/licenses/>.                           //
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+package org.distorted.magic;
+
+import android.app.Dialog;
+import android.content.DialogInterface;
+import android.os.Bundle;
+import android.support.annotation.NonNull;
+import android.support.v4.app.FragmentActivity;
+import android.support.v4.view.ViewPager;
+import android.support.v7.app.AlertDialog;
+import android.support.v7.app.AppCompatDialogFragment;
+import android.support.design.widget.TabLayout;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+public class RubikDialogScores extends AppCompatDialogFragment
+  {
+  RubikDialogScoresPagerAdapter mPagerAdapter;
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  @NonNull
+  @Override
+  public Dialog onCreateDialog(Bundle savedInstanceState)
+    {
+    FragmentActivity act = getActivity();
+    AlertDialog.Builder builder = new AlertDialog.Builder(act);
+
+    LayoutInflater layoutInflater = act.getLayoutInflater();
+    TextView tv = (TextView) layoutInflater.inflate(R.layout.dialog_title, null);
+    tv.setText(R.string.scores_title);
+    builder.setCustomTitle(tv);
+
+    builder.setCancelable(true);
+    builder.setPositiveButton( R.string.ok, new DialogInterface.OnClickListener()
+      {
+      @Override
+      public void onClick(DialogInterface dialog, int which)
+        {
+
+        }
+      });
+
+    Bundle args = getArguments();
+    int curTab;
+
+    try
+      {
+      curTab = args.getInt("tab");
+      }
+    catch(Exception e)
+      {
+      curTab = 0;
+      }
+
+    LayoutInflater inflater = act.getLayoutInflater();
+    final View view = inflater.inflate(R.layout.dialog_scores, null);
+    builder.setView(view);
+
+    ViewPager viewPager = view.findViewById(R.id.viewpager);
+    TabLayout tabLayout = view.findViewById(R.id.sliding_tabs);
+    mPagerAdapter = new RubikDialogScoresPagerAdapter(act,viewPager);
+    tabLayout.setupWithViewPager(viewPager);
+
+    viewPager.setCurrentItem(curTab);
+
+    for (int i = 0; i< RubikSize.LENGTH; i++)
+      {
+      ImageView imageView = new ImageView(act);
+      imageView.setImageResource(RubikSize.getSize(i).getIconID());
+      TabLayout.Tab tab = tabLayout.getTabAt(i);
+      if(tab!=null) tab.setCustomView(imageView);
+      }
+
+    return builder.create();
+    }
+  }
diff --git a/src/main/java/org/distorted/magic/RubikDialogScoresPagerAdapter.java b/src/main/java/org/distorted/magic/RubikDialogScoresPagerAdapter.java
new file mode 100644
index 00000000..723aa380
--- /dev/null
+++ b/src/main/java/org/distorted/magic/RubikDialogScoresPagerAdapter.java
@@ -0,0 +1,192 @@
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright 2020 Leszek Koltunski                                                               //
+//                                                                                               //
+// This file is part of Magic Cube.                                                              //
+//                                                                                               //
+// Magic Cube is free software: you can redistribute it and/or modify                            //
+// it under the terms of the GNU General Public License as published by                          //
+// the Free Software Foundation, either version 2 of the License, or                             //
+// (at your option) any later version.                                                           //
+//                                                                                               //
+// Magic Cube is distributed in the hope that it will be useful,                                 //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
+// GNU General Public License for more details.                                                  //
+//                                                                                               //
+// You should have received a copy of the GNU General Public License                             //
+// along with Magic Cube.  If not, see <http://www.gnu.org/licenses/>.                           //
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+package org.distorted.magic;
+
+import android.support.annotation.NonNull;
+import android.support.v4.app.FragmentActivity;
+import android.support.v4.view.PagerAdapter;
+import android.support.v4.view.ViewPager;
+import android.view.View;
+import android.view.ViewGroup;
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+class RubikDialogScoresPagerAdapter extends PagerAdapter implements RubikScoresDownloader.Receiver
+  {
+  private FragmentActivity mAct;
+  private RubikDialogScoresView[] mViews;
+  private ViewPager mViewPager;
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  public void receive(final int[][][] country, final String[][][] name, final String[][][] time)
+    {
+    prepareView();
+
+    int c = mViewPager.getCurrentItem();
+
+    addPage(mViews[c],country[c],name[c],time[c]);
+
+    for(int i=0; i<RubikSize.LENGTH; i++)
+      {
+      if( i==c ) continue;
+
+      addPage(mViews[i],country[i],name[i],time[i]);
+      }
+    }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  private void prepareView()
+    {
+    mAct.runOnUiThread(new Runnable()
+      {
+      @Override
+      public void run()
+        {
+        for(int i=0; i<RubikSize.LENGTH; i++)
+          {
+          mViews[i].prepareView(mAct);
+          }
+        }
+      });
+    try
+      {
+      Thread.sleep(200);
+      }
+    catch( InterruptedException ie)
+      {
+
+      }
+    }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  private void addPage(final RubikDialogScoresView view, final int[][] country, final String[][] name, final String[][] time)
+    {
+    for(int section=0; section<RubikActivity.MAX_SCRAMBLE; section++)
+      {
+      final int sec = section;
+      final int[] c = country[section];
+      final String[] n = name[section];
+      final String[] t = time[section];
+
+      mAct.runOnUiThread(new Runnable()
+        {
+        @Override
+        public void run()
+          {
+          view.addSection(mAct, sec, c, n, t);
+          }
+        });
+
+      try
+        {
+        Thread.sleep(60);
+        }
+      catch( InterruptedException ie)
+        {
+
+        }
+      }
+    }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  public void exception(final String exce)
+    {
+    mAct.runOnUiThread(new Runnable()
+      {
+      @Override
+      public void run()
+        {
+        for(int i=0; i<RubikSize.LENGTH; i++)
+          {
+          mViews[i].exception(exce);
+          }
+        }
+      });
+    }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  RubikDialogScoresPagerAdapter(FragmentActivity act, ViewPager viewPager)
+    {
+    mAct = act;
+    mViews = new RubikDialogScoresView[RubikSize.LENGTH];
+    mViewPager = viewPager;
+
+    viewPager.setAdapter(this);
+    viewPager.setOffscreenPageLimit( RubikSize.LENGTH-1 );
+    }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  @Override
+  @NonNull
+  public Object instantiateItem(@NonNull ViewGroup collection, int position)
+    {
+    mViews[position] = new RubikDialogScoresView(mAct);
+    collection.addView(mViews[position]);
+
+    boolean allCreated = true;
+
+    for(int i=0; i<RubikSize.LENGTH; i++)
+      {
+      if( mViews[i]==null )
+        {
+        allCreated = false;
+        break;
+        }
+      }
+
+    if( allCreated )
+      {
+      RubikScoresDownloader downloader = new RubikScoresDownloader();
+      downloader.download(this, mAct.getResources(), mAct.getPackageName());
+      }
+
+    return mViews[position];
+    }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  @Override
+  public void destroyItem(ViewGroup collection, int position, @NonNull Object view)
+    {
+    collection.removeView((View) view);
+    }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  @Override
+  public int getCount()
+    {
+    return RubikSize.LENGTH;
+    }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  @Override
+  public boolean isViewFromObject(@NonNull View view, @NonNull Object object)
+    {
+    return view == object;
+    }
+  }
diff --git a/src/main/java/org/distorted/magic/RubikDialogScoresView.java b/src/main/java/org/distorted/magic/RubikDialogScoresView.java
new file mode 100644
index 00000000..a649357e
--- /dev/null
+++ b/src/main/java/org/distorted/magic/RubikDialogScoresView.java
@@ -0,0 +1,108 @@
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright 2020 Leszek Koltunski                                                               //
+//                                                                                               //
+// This file is part of Magic Cube.                                                              //
+//                                                                                               //
+// Magic Cube is free software: you can redistribute it and/or modify                            //
+// it under the terms of the GNU General Public License as published by                          //
+// the Free Software Foundation, either version 2 of the License, or                             //
+// (at your option) any later version.                                                           //
+//                                                                                               //
+// Magic Cube is distributed in the hope that it will be useful,                                 //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
+// GNU General Public License for more details.                                                  //
+//                                                                                               //
+// You should have received a copy of the GNU General Public License                             //
+// along with Magic Cube.  If not, see <http://www.gnu.org/licenses/>.                           //
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+package org.distorted.magic;
+
+import android.content.Context;
+import android.support.v4.app.FragmentActivity;
+import android.util.AttributeSet;
+import android.view.View;
+import android.widget.FrameLayout;
+import android.widget.ImageView;
+import android.widget.LinearLayout;
+import android.widget.TextView;
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+public class RubikDialogScoresView extends FrameLayout
+  {
+  LinearLayout mLayout;
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  public RubikDialogScoresView(Context context, AttributeSet attrs, int defStyle)
+    {
+    super(context, attrs, defStyle);
+    }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  public RubikDialogScoresView(Context context, AttributeSet attrs)
+    {
+    super(context, attrs);
+    }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  public RubikDialogScoresView(Context context)
+    {
+    super(context);
+
+    View view = inflate(context, R.layout.dialog_scores_downloading, null);
+    addView(view);
+    }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  void exception(final String exce)
+    {
+    TextView text = findViewById(R.id.downloading_text);
+    text.setText(exce);
+    }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  void prepareView(FragmentActivity act)
+    {
+    removeAllViews();
+
+    View tab = inflate(act, R.layout.dialog_scores_tab, null);
+    mLayout = tab.findViewById(R.id.tabLayout);
+    addView(tab);
+    }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  void addSection(FragmentActivity act, int scramble, final int[] country, final String[] name, final String[] time)
+    {
+    LinearLayout level = (LinearLayout)inflate(act, R.layout.dialog_scores_scramble_title, null);
+    TextView text = level.findViewById(R.id.scoresScrambleTitle);
+    text.setText(act.getString(R.string.sc_placeholder,(scramble+1)));
+
+    for(int j=0; j<RubikScoresDownloader.MAX_PLACES; j++)
+      {
+      if( name[j] != null )
+        {
+        View row = inflate(act, R.layout.dialog_scores_scramble_row, null);
+
+        ImageView imgCoun = row.findViewById(R.id.scoresScrambleRowCountry);
+        TextView textName = row.findViewById(R.id.scoresScrambleRowName);
+        TextView textTime = row.findViewById(R.id.scoresScrambleRowTime);
+
+        imgCoun.setImageResource(country[j]);
+        textName.setText(name[j]);
+        textTime.setText(time[j]);
+
+        level.addView(row);
+        }
+      }
+
+    mLayout.addView(level);
+    }
+  }
diff --git a/src/main/java/org/distorted/magic/RubikDialogSettings.java b/src/main/java/org/distorted/magic/RubikDialogSettings.java
new file mode 100644
index 00000000..09176d18
--- /dev/null
+++ b/src/main/java/org/distorted/magic/RubikDialogSettings.java
@@ -0,0 +1,279 @@
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright 2019 Leszek Koltunski                                                               //
+//                                                                                               //
+// This file is part of Magic Cube.                                                              //
+//                                                                                               //
+// Magic Cube is free software: you can redistribute it and/or modify                            //
+// it under the terms of the GNU General Public License as published by                          //
+// the Free Software Foundation, either version 2 of the License, or                             //
+// (at your option) any later version.                                                           //
+//                                                                                               //
+// Magic Cube is distributed in the hope that it will be useful,                                 //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
+// GNU General Public License for more details.                                                  //
+//                                                                                               //
+// You should have received a copy of the GNU General Public License                             //
+// along with Magic Cube.  If not, see <http://www.gnu.org/licenses/>.                           //
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+package org.distorted.magic;
+
+import android.app.Dialog;
+import android.content.DialogInterface;
+import android.os.Bundle;
+import android.support.annotation.NonNull;
+import android.support.v4.app.FragmentActivity;
+import android.support.v4.content.ContextCompat;
+import android.support.v7.app.AlertDialog;
+import android.support.v7.app.AppCompatDialogFragment;
+import android.util.DisplayMetrics;
+import android.view.Gravity;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.widget.AdapterView;
+import android.widget.ArrayAdapter;
+import android.widget.LinearLayout;
+import android.widget.SeekBar;
+import android.widget.Spinner;
+import android.widget.TextView;
+
+import org.distorted.effect.BaseEffect;
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+public class RubikDialogSettings extends AppCompatDialogFragment implements SeekBar.OnSeekBarChangeListener, AdapterView.OnItemSelectedListener
+  {
+  private TextView[] mDurationText;
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  private void addSettingsSection(FragmentActivity act, LinearLayout layout, int index)
+    {
+    BaseEffect.Type beType = BaseEffect.Type.getType(index);
+    DisplayMetrics metrics = act.getResources().getDisplayMetrics();
+    float scale = metrics.density;
+
+    int textH=32;
+    int layoH=36;
+    int margH=10;
+/*
+    if( metrics.widthPixels > metrics.heightPixels )
+      {
+      textH = 18;
+      layoH = 25;
+      margH =  5;
+      }
+    else
+      {
+      textH = 32;
+      layoH = 36;
+      margH = 10;
+      }
+*/
+    ///// OUTER LAYOUT ///////////////////////////////////////////////////////////////////
+
+    int margin = (int)(scale*margH + 0.5f);
+    int color  = ContextCompat.getColor(act, R.color.grey);
+    LinearLayout outerLayout = new LinearLayout(act);
+    LinearLayout.LayoutParams outerLayoutParams = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT,LinearLayout.LayoutParams.MATCH_PARENT, 0.5f);
+    outerLayoutParams.topMargin    = margin;
+    outerLayoutParams.bottomMargin = 0;
+    outerLayoutParams.leftMargin   = margin;
+    outerLayoutParams.rightMargin  = margin;
+
+    outerLayout.setLayoutParams(outerLayoutParams);
+    outerLayout.setGravity(Gravity.CENTER|Gravity.FILL_HORIZONTAL);
+    outerLayout.setBackgroundColor(color);
+    outerLayout.setOrientation(LinearLayout.VERTICAL);
+    layout.addView(outerLayout);
+
+    ///// TEXT ///////////////////////////////////////////////////////////////////////////
+
+    int layoutHeight = (int)(scale*textH + 0.5f);
+    int padding      = (int)(scale*10    + 0.5f);
+
+    LinearLayout.LayoutParams textParams = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT,layoutHeight);
+
+    TextView textView = new TextView(act);
+    textView.setText(beType.getText());
+    textView.setLayoutParams(textParams);
+    textView.setGravity(Gravity.CENTER);
+    textView.setPadding(padding,0,padding,0);
+    textView.setTextAppearance(android.R.style.TextAppearance_Small);
+    outerLayout.addView(textView);
+
+    ///// INNER LAYOUT1 //////////////////////////////////////////////////////////////////
+
+    int innerLayout1Height = (int)(scale*layoH + 0.5f);
+    LinearLayout innerLayout1 = new LinearLayout(act);
+    LinearLayout.LayoutParams innerLayout1Params = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT,innerLayout1Height);
+
+    innerLayout1.setLayoutParams(innerLayout1Params);
+    innerLayout1.setGravity(Gravity.CENTER|Gravity.FILL_HORIZONTAL);
+    innerLayout1.setOrientation(LinearLayout.HORIZONTAL);
+    outerLayout.addView(innerLayout1);
+
+    ///// STUFF INSIDE INNER LAYOUT1 /////////////////////////////////////////////////////
+
+    int text1Padding = (int)(scale*5 + 0.5f);
+    LinearLayout.LayoutParams text1LayoutParams = new LinearLayout.LayoutParams(0,layoutHeight,0.2f);
+
+    TextView text1View = new TextView(act);
+    text1View.setText(R.string.duration);
+    text1View.setLayoutParams(text1LayoutParams);
+    text1View.setGravity(Gravity.START|Gravity.CENTER);
+    text1View.setPadding(text1Padding,0,text1Padding,0);
+    text1View.setTextAppearance(android.R.style.TextAppearance_Small);
+    innerLayout1.addView(text1View);
+    //////////////////////////////////////////////////////////////////
+    int text2Padding = (int)(scale*5 + 0.5f);
+    LinearLayout.LayoutParams text2LayoutParams = new LinearLayout.LayoutParams(0,layoutHeight,0.2f);
+
+    mDurationText[index] = new TextView(act);
+    mDurationText[index].setLayoutParams(text2LayoutParams);
+    mDurationText[index].setGravity(Gravity.END|Gravity.CENTER);
+    mDurationText[index].setPadding(text2Padding,0,text2Padding,0);
+    mDurationText[index].setTextAppearance(android.R.style.TextAppearance_Small);
+    innerLayout1.addView(mDurationText[index]);
+    //////////////////////////////////////////////////////////////////
+    int seekPadding = (int)(scale*10 + 0.5f);
+    LinearLayout.LayoutParams seekLayoutParams = new LinearLayout.LayoutParams(0,LinearLayout.LayoutParams.MATCH_PARENT,0.6f);
+
+    SeekBar seekBar = new SeekBar(act);
+    seekBar.setLayoutParams(seekLayoutParams);
+    seekBar.setPadding(seekPadding,0,seekPadding,0);
+    seekBar.setId(index);
+    innerLayout1.addView(seekBar);
+
+    seekBar.setOnSeekBarChangeListener(this);
+    seekBar.setProgress(beType.getCurrentPos());
+
+    ///// INNER LAYOUT2 //////////////////////////////////////////////////////////////////
+
+    int innerLayout2Height = (int)(scale*layoH + 0.5f);
+    LinearLayout innerLayout2 = new LinearLayout(act);
+    LinearLayout.LayoutParams innerLayout2Params = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT,innerLayout2Height);
+
+    innerLayout2.setLayoutParams(innerLayout2Params);
+    innerLayout2.setGravity(Gravity.CENTER|Gravity.FILL_HORIZONTAL);
+    innerLayout2.setOrientation(LinearLayout.HORIZONTAL);
+    outerLayout.addView(innerLayout2);
+
+    ///// STUFF INSIDE INNER LAYOUT2 /////////////////////////////////////////////////////
+
+    int text3Padding = (int)(scale*5 + 0.5f);
+    LinearLayout.LayoutParams text3LayoutParams = new LinearLayout.LayoutParams(0,LinearLayout.LayoutParams.MATCH_PARENT,0.4f);
+
+    TextView text3View = new TextView(act);
+    text3View.setText(R.string.type);
+    text3View.setLayoutParams(text3LayoutParams);
+    text3View.setGravity(Gravity.START|Gravity.CENTER);
+    text3View.setPadding(text3Padding,0,text3Padding,0);
+    text3View.setTextAppearance(android.R.style.TextAppearance_Small);
+    innerLayout2.addView(text3View);
+    //////////////////////////////////////////////////////////////////
+    int spinnerPadding = (int)(scale*10 + 0.5f);
+    LinearLayout.LayoutParams spinnerLayoutParams = new LinearLayout.LayoutParams(0,LinearLayout.LayoutParams.MATCH_PARENT,0.6f);
+
+    Spinner spinner = new Spinner(act);
+    spinner.setLayoutParams(spinnerLayoutParams);
+    spinner.setPadding(spinnerPadding,0,spinnerPadding,0);
+    spinner.setTextAlignment(View.TEXT_ALIGNMENT_CENTER);
+    spinner.setId(index+BaseEffect.Type.LENGTH);
+    innerLayout2.addView(spinner);
+
+    spinner.setOnItemSelectedListener(this);
+    String[] appear = BaseEffect.Type.getType(index).getNames();
+
+    ArrayAdapter<String> adapterType = new ArrayAdapter<>(act,android.R.layout.simple_spinner_item, appear);
+    adapterType.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
+    spinner.setAdapter(adapterType);
+    spinner.setSelection(beType.getCurrentType());
+    }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// PUBLIC API
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  public RubikDialogSettings()
+    {
+    mDurationText = new TextView[BaseEffect.Type.LENGTH];
+    }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  @NonNull
+  @Override
+  public Dialog onCreateDialog(Bundle savedInstanceState)
+    {
+    FragmentActivity act = getActivity();
+    LayoutInflater inflater = act.getLayoutInflater();
+    AlertDialog.Builder builder = new AlertDialog.Builder(act);
+    TextView tv = (TextView) inflater.inflate(R.layout.dialog_title, null);
+    tv.setText(R.string.settings_title);
+    builder.setCustomTitle(tv);
+
+    builder.setCancelable(true);
+    builder.setPositiveButton( R.string.ok, new DialogInterface.OnClickListener()
+      {
+      @Override
+      public void onClick(DialogInterface dialog, int which)
+        {
+
+        }
+      });
+
+    final View view = inflater.inflate(R.layout.dialog_settings, null);
+    builder.setView(view);
+
+    LinearLayout linearLayout = view.findViewById(R.id.settingsLayout);
+
+    if( linearLayout!=null )
+      {
+      for (int i=0; i< BaseEffect.Type.LENGTH; i++)
+        {
+        addSettingsSection(act,linearLayout,i);
+        }
+      }
+    else
+      {
+      android.util.Log.e("dialog_settings", "linearLayout NULL!");
+      }
+
+    return builder.create();
+    }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  public void onItemSelected(AdapterView<?> parent, View view, int pos, long id)
+    {
+    int parentID = parent.getId();
+    int len = BaseEffect.Type.LENGTH;
+
+    if( parentID>=len && parentID< 2*len) // ith spinner's ID is equal to i+LENGTH (see createSettingSection)
+      {
+      BaseEffect.Type.getType(parentID-len).setCurrentType(pos);
+      }
+    }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  public void onProgressChanged(SeekBar bar, int progress, boolean fromUser)
+    {
+    int barID = bar.getId();
+
+    if( barID>=0 && barID< BaseEffect.Type.LENGTH) // ith seekbar's ID is equal to i (see createSettingSection)
+      {
+      BaseEffect.Type.getType(barID).setCurrentPos(progress);
+      int ms = BaseEffect.Type.translatePos(progress);
+      mDurationText[barID].setText(getString(R.string.ms_placeholder,ms));
+      }
+    }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  public void onNothingSelected(AdapterView<?> parent) { }
+  public void onStartTrackingTouch(SeekBar bar) { }
+  public void onStopTrackingTouch(SeekBar bar)  { }
+  }
diff --git a/src/main/java/org/distorted/magic/RubikRenderer.java b/src/main/java/org/distorted/magic/RubikRenderer.java
index 70c285b6..9b7592e7 100644
--- a/src/main/java/org/distorted/magic/RubikRenderer.java
+++ b/src/main/java/org/distorted/magic/RubikRenderer.java
@@ -38,7 +38,7 @@ import javax.microedition.khronos.opengles.GL10;
 
 public class RubikRenderer implements GLSurfaceView.Renderer, EffectListener
 {
-    public static final float CAMERA_DISTANCE   = 0.6f;  // 0.6 of the length of max(scrHeight,scrWidth)
+    static final float CAMERA_DISTANCE = 0.6f;  // 0.6 of the length of min(scrHeight,scrWidth)
     public static final int TEXTURE_SIZE = 600;
 
     private RubikSurfaceView mView;
@@ -238,7 +238,7 @@ public class RubikRenderer implements GLSurfaceView.Renderer, EffectListener
 
        if( solved && !mIsSolved )
          {
-         mCanDrag        = false;
+         mCanDrag        = true;
          mCanRotate      = false;
          mCanUI          = false;
          doEffectNow( BaseEffect.Type.WIN );
diff --git a/src/main/java/org/distorted/magic/RubikScores.java b/src/main/java/org/distorted/magic/RubikScores.java
deleted file mode 100644
index 1338c9c5..00000000
--- a/src/main/java/org/distorted/magic/RubikScores.java
+++ /dev/null
@@ -1,99 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////////////////////////
-// Copyright 2019 Leszek Koltunski                                                               //
-//                                                                                               //
-// This file is part of Magic Cube.                                                              //
-//                                                                                               //
-// Magic Cube is free software: you can redistribute it and/or modify                            //
-// it under the terms of the GNU General Public License as published by                          //
-// the Free Software Foundation, either version 2 of the License, or                             //
-// (at your option) any later version.                                                           //
-//                                                                                               //
-// Magic Cube is distributed in the hope that it will be useful,                                 //
-// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
-// GNU General Public License for more details.                                                  //
-//                                                                                               //
-// You should have received a copy of the GNU General Public License                             //
-// along with Magic Cube.  If not, see <http://www.gnu.org/licenses/>.                           //
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-package org.distorted.magic;
-
-import android.app.Dialog;
-import android.content.DialogInterface;
-import android.os.Bundle;
-import android.support.annotation.NonNull;
-import android.support.v4.app.FragmentActivity;
-import android.support.v4.view.ViewPager;
-import android.support.v7.app.AlertDialog;
-import android.support.v7.app.AppCompatDialogFragment;
-import android.support.design.widget.TabLayout;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.widget.ImageView;
-import android.widget.TextView;
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-public class RubikScores extends AppCompatDialogFragment
-  {
-  RubikScoresPagerAdapter mPagerAdapter;
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  @NonNull
-  @Override
-  public Dialog onCreateDialog(Bundle savedInstanceState)
-    {
-    FragmentActivity act = getActivity();
-    AlertDialog.Builder builder = new AlertDialog.Builder(act);
-
-    LayoutInflater layoutInflater = act.getLayoutInflater();
-    TextView tv = (TextView) layoutInflater.inflate(R.layout.scores_title, null);
-    tv.setText(R.string.scores_title);
-    builder.setCustomTitle(tv);
-
-    builder.setCancelable(true);
-    builder.setPositiveButton( R.string.ok, new DialogInterface.OnClickListener()
-      {
-      @Override
-      public void onClick(DialogInterface dialog, int which)
-        {
-
-        }
-      });
-
-    Bundle args = getArguments();
-    int curTab;
-
-    try
-      {
-      curTab = args.getInt("tab");
-      }
-    catch(Exception e)
-      {
-      curTab = 0;
-      }
-
-    LayoutInflater inflater = act.getLayoutInflater();
-    final View view = inflater.inflate(R.layout.scores, null);
-    builder.setView(view);
-
-    ViewPager viewPager = view.findViewById(R.id.viewpager);
-    TabLayout tabLayout = view.findViewById(R.id.sliding_tabs);
-    mPagerAdapter = new RubikScoresPagerAdapter(act,viewPager);
-    tabLayout.setupWithViewPager(viewPager);
-
-    viewPager.setCurrentItem(curTab);
-
-    for (int i = 0; i< RubikSize.LENGTH; i++)
-      {
-      ImageView imageView = new ImageView(act);
-      imageView.setImageResource(RubikSize.getSize(i).getIconID());
-      TabLayout.Tab tab = tabLayout.getTabAt(i);
-      if(tab!=null) tab.setCustomView(imageView);
-      }
-
-    return builder.create();
-    }
-  }
diff --git a/src/main/java/org/distorted/magic/RubikScoresPagerAdapter.java b/src/main/java/org/distorted/magic/RubikScoresPagerAdapter.java
deleted file mode 100644
index 4e2313dd..00000000
--- a/src/main/java/org/distorted/magic/RubikScoresPagerAdapter.java
+++ /dev/null
@@ -1,192 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////////////////////////
-// Copyright 2020 Leszek Koltunski                                                               //
-//                                                                                               //
-// This file is part of Magic Cube.                                                              //
-//                                                                                               //
-// Magic Cube is free software: you can redistribute it and/or modify                            //
-// it under the terms of the GNU General Public License as published by                          //
-// the Free Software Foundation, either version 2 of the License, or                             //
-// (at your option) any later version.                                                           //
-//                                                                                               //
-// Magic Cube is distributed in the hope that it will be useful,                                 //
-// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
-// GNU General Public License for more details.                                                  //
-//                                                                                               //
-// You should have received a copy of the GNU General Public License                             //
-// along with Magic Cube.  If not, see <http://www.gnu.org/licenses/>.                           //
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-package org.distorted.magic;
-
-import android.support.annotation.NonNull;
-import android.support.v4.app.FragmentActivity;
-import android.support.v4.view.PagerAdapter;
-import android.support.v4.view.ViewPager;
-import android.view.View;
-import android.view.ViewGroup;
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-class RubikScoresPagerAdapter extends PagerAdapter implements RubikScoresDownloader.Receiver
-  {
-  private FragmentActivity mAct;
-  private RubikScoresView[] mViews;
-  private ViewPager mViewPager;
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  public void receive(final int[][][] country, final String[][][] name, final String[][][] time)
-    {
-    prepareView();
-
-    int c = mViewPager.getCurrentItem();
-
-    addPage(mViews[c],country[c],name[c],time[c]);
-
-    for(int i=0; i<RubikSize.LENGTH; i++)
-      {
-      if( i==c ) continue;
-
-      addPage(mViews[i],country[i],name[i],time[i]);
-      }
-    }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  private void prepareView()
-    {
-    mAct.runOnUiThread(new Runnable()
-      {
-      @Override
-      public void run()
-        {
-        for(int i=0; i<RubikSize.LENGTH; i++)
-          {
-          mViews[i].prepareView(mAct);
-          }
-        }
-      });
-    try
-      {
-      Thread.sleep(200);
-      }
-    catch( InterruptedException ie)
-      {
-
-      }
-    }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  private void addPage(final RubikScoresView view, final int[][] country, final String[][] name, final String[][] time)
-    {
-    for(int section=0; section<RubikActivity.MAX_SCRAMBLE; section++)
-      {
-      final int sec = section;
-      final int[] c = country[section];
-      final String[] n = name[section];
-      final String[] t = time[section];
-
-      mAct.runOnUiThread(new Runnable()
-        {
-        @Override
-        public void run()
-          {
-          view.addSection(mAct, sec, c, n, t);
-          }
-        });
-
-      try
-        {
-        Thread.sleep(60);
-        }
-      catch( InterruptedException ie)
-        {
-
-        }
-      }
-    }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  public void exception(final String exce)
-    {
-    mAct.runOnUiThread(new Runnable()
-      {
-      @Override
-      public void run()
-        {
-        for(int i=0; i<RubikSize.LENGTH; i++)
-          {
-          mViews[i].exception(exce);
-          }
-        }
-      });
-    }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  RubikScoresPagerAdapter(FragmentActivity act, ViewPager viewPager)
-    {
-    mAct = act;
-    mViews = new RubikScoresView[RubikSize.LENGTH];
-    mViewPager = viewPager;
-
-    viewPager.setAdapter(this);
-    viewPager.setOffscreenPageLimit( RubikSize.LENGTH-1 );
-    }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  @Override
-  @NonNull
-  public Object instantiateItem(@NonNull ViewGroup collection, int position)
-    {
-    mViews[position] = new RubikScoresView(mAct);
-    collection.addView(mViews[position]);
-
-    boolean allCreated = true;
-
-    for(int i=0; i<RubikSize.LENGTH; i++)
-      {
-      if( mViews[i]==null )
-        {
-        allCreated = false;
-        break;
-        }
-      }
-
-    if( allCreated )
-      {
-      RubikScoresDownloader downloader = new RubikScoresDownloader();
-      downloader.download(this, mAct.getResources(), mAct.getPackageName());
-      }
-
-    return mViews[position];
-    }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  @Override
-  public void destroyItem(ViewGroup collection, int position, @NonNull Object view)
-    {
-    collection.removeView((View) view);
-    }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  @Override
-  public int getCount()
-    {
-    return RubikSize.LENGTH;
-    }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  @Override
-  public boolean isViewFromObject(@NonNull View view, @NonNull Object object)
-    {
-    return view == object;
-    }
-  }
diff --git a/src/main/java/org/distorted/magic/RubikScoresView.java b/src/main/java/org/distorted/magic/RubikScoresView.java
deleted file mode 100644
index 14a92fc9..00000000
--- a/src/main/java/org/distorted/magic/RubikScoresView.java
+++ /dev/null
@@ -1,108 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////////////////////////
-// Copyright 2020 Leszek Koltunski                                                               //
-//                                                                                               //
-// This file is part of Magic Cube.                                                              //
-//                                                                                               //
-// Magic Cube is free software: you can redistribute it and/or modify                            //
-// it under the terms of the GNU General Public License as published by                          //
-// the Free Software Foundation, either version 2 of the License, or                             //
-// (at your option) any later version.                                                           //
-//                                                                                               //
-// Magic Cube is distributed in the hope that it will be useful,                                 //
-// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
-// GNU General Public License for more details.                                                  //
-//                                                                                               //
-// You should have received a copy of the GNU General Public License                             //
-// along with Magic Cube.  If not, see <http://www.gnu.org/licenses/>.                           //
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-package org.distorted.magic;
-
-import android.content.Context;
-import android.support.v4.app.FragmentActivity;
-import android.util.AttributeSet;
-import android.view.View;
-import android.widget.FrameLayout;
-import android.widget.ImageView;
-import android.widget.LinearLayout;
-import android.widget.TextView;
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-public class RubikScoresView extends FrameLayout
-  {
-  LinearLayout mLayout;
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  public RubikScoresView(Context context, AttributeSet attrs, int defStyle)
-    {
-    super(context, attrs, defStyle);
-    }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  public RubikScoresView(Context context, AttributeSet attrs)
-    {
-    super(context, attrs);
-    }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  public RubikScoresView(Context context)
-    {
-    super(context);
-
-    View view = inflate(context, R.layout.scores_downloading, null);
-    addView(view);
-    }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  void exception(final String exce)
-    {
-    TextView text = findViewById(R.id.downloading_text);
-    text.setText(exce);
-    }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  void prepareView(FragmentActivity act)
-    {
-    removeAllViews();
-
-    View tab = inflate(act, R.layout.scores_tab, null);
-    mLayout = tab.findViewById(R.id.tabLayout);
-    addView(tab);
-    }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  void addSection(FragmentActivity act, int scramble, final int[] country, final String[] name, final String[] time)
-    {
-    LinearLayout level = (LinearLayout)inflate(act, R.layout.scores_scramble_title, null);
-    TextView text = level.findViewById(R.id.scoresScrambleTitle);
-    text.setText(act.getString(R.string.sc_placeholder,(scramble+1)));
-
-    for(int j=0; j<RubikScoresDownloader.MAX_PLACES; j++)
-      {
-      if( name[j] != null )
-        {
-        View row = inflate(act, R.layout.scores_scramble_row, null);
-
-        ImageView imgCoun = row.findViewById(R.id.scoresScrambleRowCountry);
-        TextView textName = row.findViewById(R.id.scoresScrambleRowName);
-        TextView textTime = row.findViewById(R.id.scoresScrambleRowTime);
-
-        imgCoun.setImageResource(country[j]);
-        textName.setText(name[j]);
-        textTime.setText(time[j]);
-
-        level.addView(row);
-        }
-      }
-
-    mLayout.addView(level);
-    }
-  }
diff --git a/src/main/java/org/distorted/magic/RubikSettings.java b/src/main/java/org/distorted/magic/RubikSettings.java
deleted file mode 100644
index 19187594..00000000
--- a/src/main/java/org/distorted/magic/RubikSettings.java
+++ /dev/null
@@ -1,273 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////////////////////////
-// Copyright 2019 Leszek Koltunski                                                               //
-//                                                                                               //
-// This file is part of Magic Cube.                                                              //
-//                                                                                               //
-// Magic Cube is free software: you can redistribute it and/or modify                            //
-// it under the terms of the GNU General Public License as published by                          //
-// the Free Software Foundation, either version 2 of the License, or                             //
-// (at your option) any later version.                                                           //
-//                                                                                               //
-// Magic Cube is distributed in the hope that it will be useful,                                 //
-// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
-// GNU General Public License for more details.                                                  //
-//                                                                                               //
-// You should have received a copy of the GNU General Public License                             //
-// along with Magic Cube.  If not, see <http://www.gnu.org/licenses/>.                           //
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-package org.distorted.magic;
-
-import android.app.Dialog;
-import android.content.DialogInterface;
-import android.os.Bundle;
-import android.support.annotation.NonNull;
-import android.support.v4.app.FragmentActivity;
-import android.support.v4.content.ContextCompat;
-import android.support.v7.app.AlertDialog;
-import android.support.v7.app.AppCompatDialogFragment;
-import android.util.DisplayMetrics;
-import android.view.Gravity;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.widget.AdapterView;
-import android.widget.ArrayAdapter;
-import android.widget.LinearLayout;
-import android.widget.SeekBar;
-import android.widget.Spinner;
-import android.widget.TextView;
-
-import org.distorted.effect.BaseEffect;
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-public class RubikSettings extends AppCompatDialogFragment implements SeekBar.OnSeekBarChangeListener, AdapterView.OnItemSelectedListener
-  {
-  private TextView[] mDurationText;
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  private void createSettingsSection(FragmentActivity act, LinearLayout layout, int index)
-    {
-    BaseEffect.Type beType = BaseEffect.Type.getType(index);
-    DisplayMetrics metrics = act.getResources().getDisplayMetrics();
-    float scale = metrics.density;
-
-    int textH;
-    int layoH;
-
-    if( metrics.widthPixels > metrics.heightPixels )
-      {
-      textH = 20;
-      layoH = 26;
-      }
-    else
-      {
-      textH = 32;
-      layoH = 36;
-      }
-
-    ///// OUTER LAYOUT ///////////////////////////////////////////////////////////////////
-
-    int margin = (int)(scale*10 + 0.5f);
-    int color  = ContextCompat.getColor(act, R.color.grey);
-    LinearLayout outerLayout = new LinearLayout(act);
-    LinearLayout.LayoutParams outerLayoutParams = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT,LinearLayout.LayoutParams.MATCH_PARENT, 0.5f);
-    outerLayoutParams.topMargin    = margin;
-    outerLayoutParams.bottomMargin = 0;
-    outerLayoutParams.leftMargin   = margin;
-    outerLayoutParams.rightMargin  = margin;
-
-    outerLayout.setLayoutParams(outerLayoutParams);
-    outerLayout.setGravity(Gravity.CENTER|Gravity.FILL_HORIZONTAL);
-    outerLayout.setBackgroundColor(color);
-    outerLayout.setOrientation(LinearLayout.VERTICAL);
-    layout.addView(outerLayout);
-
-    ///// TEXT ///////////////////////////////////////////////////////////////////////////
-
-    int layoutHeight = (int)(scale*textH + 0.5f);
-    int padding      = (int)(scale*10    + 0.5f);
-
-    LinearLayout.LayoutParams textParams = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT,layoutHeight);
-
-    TextView textView = new TextView(act);
-    textView.setText(beType.getText());
-    textView.setLayoutParams(textParams);
-    textView.setGravity(Gravity.CENTER);
-    textView.setPadding(padding,0,padding,0);
-    textView.setTextAppearance(android.R.style.TextAppearance_Small);
-    outerLayout.addView(textView);
-
-    ///// INNER LAYOUT1 //////////////////////////////////////////////////////////////////
-
-    int innerLayout1Height = (int)(scale*layoH + 0.5f);
-    LinearLayout innerLayout1 = new LinearLayout(act);
-    LinearLayout.LayoutParams innerLayout1Params = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT,innerLayout1Height);
-
-    innerLayout1.setLayoutParams(innerLayout1Params);
-    innerLayout1.setGravity(Gravity.CENTER|Gravity.FILL_HORIZONTAL);
-    innerLayout1.setOrientation(LinearLayout.HORIZONTAL);
-    outerLayout.addView(innerLayout1);
-
-    ///// STUFF INSIDE INNER LAYOUT1 /////////////////////////////////////////////////////
-
-    int text1Padding = (int)(scale*5 + 0.5f);
-    LinearLayout.LayoutParams text1LayoutParams = new LinearLayout.LayoutParams(0,layoutHeight,0.2f);
-
-    TextView text1View = new TextView(act);
-    text1View.setText(R.string.duration);
-    text1View.setLayoutParams(text1LayoutParams);
-    text1View.setGravity(Gravity.START|Gravity.CENTER);
-    text1View.setPadding(text1Padding,0,text1Padding,0);
-    text1View.setTextAppearance(android.R.style.TextAppearance_Small);
-    innerLayout1.addView(text1View);
-    //////////////////////////////////////////////////////////////////
-    int text2Padding = (int)(scale*5 + 0.5f);
-    LinearLayout.LayoutParams text2LayoutParams = new LinearLayout.LayoutParams(0,layoutHeight,0.2f);
-
-    mDurationText[index] = new TextView(act);
-    mDurationText[index].setLayoutParams(text2LayoutParams);
-    mDurationText[index].setGravity(Gravity.END|Gravity.CENTER);
-    mDurationText[index].setPadding(text2Padding,0,text2Padding,0);
-    mDurationText[index].setTextAppearance(android.R.style.TextAppearance_Small);
-    innerLayout1.addView(mDurationText[index]);
-    //////////////////////////////////////////////////////////////////
-    int seekPadding = (int)(scale*10 + 0.5f);
-    LinearLayout.LayoutParams seekLayoutParams = new LinearLayout.LayoutParams(0,LinearLayout.LayoutParams.MATCH_PARENT,0.6f);
-
-    SeekBar seekBar = new SeekBar(act);
-    seekBar.setLayoutParams(seekLayoutParams);
-    seekBar.setPadding(seekPadding,0,seekPadding,0);
-    seekBar.setId(index);
-    innerLayout1.addView(seekBar);
-
-    seekBar.setOnSeekBarChangeListener(this);
-    seekBar.setProgress(beType.getCurrentPos());
-
-    ///// INNER LAYOUT2 //////////////////////////////////////////////////////////////////
-
-    int innerLayout2Height = (int)(scale*layoH + 0.5f);
-    LinearLayout innerLayout2 = new LinearLayout(act);
-    LinearLayout.LayoutParams innerLayout2Params = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT,innerLayout2Height);
-
-    innerLayout2.setLayoutParams(innerLayout2Params);
-    innerLayout2.setGravity(Gravity.CENTER|Gravity.FILL_HORIZONTAL);
-    innerLayout2.setOrientation(LinearLayout.HORIZONTAL);
-    outerLayout.addView(innerLayout2);
-
-    ///// STUFF INSIDE INNER LAYOUT2 /////////////////////////////////////////////////////
-
-    int text3Padding = (int)(scale*5 + 0.5f);
-    LinearLayout.LayoutParams text3LayoutParams = new LinearLayout.LayoutParams(0,LinearLayout.LayoutParams.MATCH_PARENT,0.4f);
-
-    TextView text3View = new TextView(act);
-    text3View.setText(R.string.type);
-    text3View.setLayoutParams(text3LayoutParams);
-    text3View.setGravity(Gravity.START|Gravity.CENTER);
-    text3View.setPadding(text3Padding,0,text3Padding,0);
-    text3View.setTextAppearance(android.R.style.TextAppearance_Small);
-    innerLayout2.addView(text3View);
-    //////////////////////////////////////////////////////////////////
-    int spinnerPadding = (int)(scale*10 + 0.5f);
-    LinearLayout.LayoutParams spinnerLayoutParams = new LinearLayout.LayoutParams(0,LinearLayout.LayoutParams.MATCH_PARENT,0.6f);
-
-    Spinner spinner = new Spinner(act);
-    spinner.setLayoutParams(spinnerLayoutParams);
-    spinner.setPadding(spinnerPadding,0,spinnerPadding,0);
-    spinner.setTextAlignment(View.TEXT_ALIGNMENT_CENTER);
-    spinner.setId(index+BaseEffect.Type.LENGTH);
-    innerLayout2.addView(spinner);
-
-    spinner.setOnItemSelectedListener(this);
-    String[] appear = BaseEffect.Type.getType(index).getNames();
-
-    ArrayAdapter<String> adapterType = new ArrayAdapter<>(act,android.R.layout.simple_spinner_item, appear);
-    adapterType.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
-    spinner.setAdapter(adapterType);
-    spinner.setSelection(beType.getCurrentType());
-    }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-// PUBLIC API
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  public RubikSettings()
-    {
-    mDurationText = new TextView[BaseEffect.Type.LENGTH];
-    }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  @NonNull
-  @Override
-  public Dialog onCreateDialog(Bundle savedInstanceState)
-    {
-    FragmentActivity act = getActivity();
-    AlertDialog.Builder builder = new AlertDialog.Builder(act);
-
-    builder.setCancelable(true);
-    builder.setPositiveButton( R.string.ok, new DialogInterface.OnClickListener()
-      {
-      @Override
-      public void onClick(DialogInterface dialog, int which)
-        {
-
-        }
-      });
-
-    LayoutInflater inflater = act.getLayoutInflater();
-    final View view = inflater.inflate(R.layout.settings, null);
-    builder.setView(view);
-
-    LinearLayout linearLayout = view.findViewById(R.id.main_settings_layout);
-
-    if( linearLayout!=null )
-      {
-      for (int i=0; i< BaseEffect.Type.LENGTH; i++)
-        {
-        createSettingsSection(act,linearLayout,i);
-        }
-      }
-    else
-      {
-      android.util.Log.e("settings", "linearLayout NULL!");
-      }
-
-    return builder.create();
-    }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  public void onItemSelected(AdapterView<?> parent, View view, int pos, long id)
-    {
-    int parentID = parent.getId();
-    int len = BaseEffect.Type.LENGTH;
-
-    if( parentID>=len && parentID< 2*len) // ith spinner's ID is equal to i+LENGTH (see createSettingSection)
-      {
-      BaseEffect.Type.getType(parentID-len).setCurrentType(pos);
-      }
-    }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  public void onProgressChanged(SeekBar bar, int progress, boolean fromUser)
-    {
-    int barID = bar.getId();
-
-    if( barID>=0 && barID< BaseEffect.Type.LENGTH) // ith seekbar's ID is equal to i (see createSettingSection)
-      {
-      BaseEffect.Type.getType(barID).setCurrentPos(progress);
-      int ms = BaseEffect.Type.translatePos(progress);
-      mDurationText[barID].setText(getString(R.string.ms_placeholder,ms));
-      }
-    }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  public void onNothingSelected(AdapterView<?> parent) { }
-  public void onStartTrackingTouch(SeekBar bar) { }
-  public void onStopTrackingTouch(SeekBar bar)  { }
-  }
diff --git a/src/main/java/org/distorted/magic/RubikSurfaceView.java b/src/main/java/org/distorted/magic/RubikSurfaceView.java
index 99f68f1e..d05b9116 100644
--- a/src/main/java/org/distorted/magic/RubikSurfaceView.java
+++ b/src/main/java/org/distorted/magic/RubikSurfaceView.java
@@ -55,9 +55,7 @@ public class RubikSurfaceView extends GLSurfaceView
 
     private RubikRenderer mRenderer;
     private RubikCubeMovement mMovement;
-
     private boolean mInScrambleMode;
-
     private boolean mDragging, mBeginningRotation, mContinuingRotation;
     private float mX, mY;
     private int mScreenWidth, mScreenHeight, mScreenMin;
@@ -68,6 +66,85 @@ public class RubikSurfaceView extends GLSurfaceView
     private static Static4D mTempCurrent    = new Static4D(0,0,0,1);
     private static Static4D mTempAccumulated= new Static4D(0,0,0,1);
 
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+    void setScreenSize(int width, int height)
+      {
+      mScreenWidth = width;
+      mScreenHeight= height;
+
+      mScreenMin = width<height ? width:height;
+      }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+    RubikRenderer getRenderer()
+      {
+      return mRenderer;
+      }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+    static int getRedButton()
+      {
+      return mButton;
+      }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+    void setQuatAccumulated()
+      {
+      mQuatAccumulated.set(mTempAccumulated);
+      }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+    void setQuatCurrent()
+      {
+      mQuatCurrent.set(mTempCurrent);
+      }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+    Static4D getQuatAccumulated()
+      {
+      return mQuatAccumulated;
+      }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+    Static4D getQuatCurrent()
+      {
+      return mQuatCurrent;
+      }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+    private Static4D quatFromDrag(float dragX, float dragY)
+      {
+      float axisX = dragY;  // inverted X and Y - rotation axis is perpendicular to (dragX,dragY)
+      float axisY = dragX;  // Why not (-dragY, dragX) ? because Y axis is also inverted!
+      float axisZ = 0;
+      float axisL = (float)Math.sqrt(axisX*axisX + axisY*axisY + axisZ*axisZ);
+
+      if( axisL>0 )
+        {
+        axisX /= axisL;
+        axisY /= axisL;
+        axisZ /= axisL;
+
+        float ratio = axisL;
+        ratio = ratio - (int)ratio;     // the cos() is only valid in (0,Pi)
+
+        float cosA = (float)Math.cos(Math.PI*ratio);
+        float sinA = (float)Math.sqrt(1-cosA*cosA);
+
+        return new Static4D(axisX*sinA, axisY*sinA, axisZ*sinA, cosA);
+        }
+
+      return new Static4D(0f, 0f, 0f, 1f);
+      }
+
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 // return quat1*quat2
 
@@ -123,30 +200,6 @@ public class RubikSurfaceView extends GLSurfaceView
       return quatMultiply(tmp,quat);
       }
 
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-    void setScreenSize(int width, int height)
-      {
-      mScreenWidth = width;
-      mScreenHeight= height;
-
-      mScreenMin = width<height ? width:height;
-      }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-    RubikRenderer getRenderer()
-      {
-      return mRenderer;
-      }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-    static int getRedButton()
-      {
-      return mButton;
-      }
-
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
     void markButton(int button)
@@ -261,61 +314,6 @@ public class RubikSurfaceView extends GLSurfaceView
         });
       }
 
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-    void setQuatAccumulated()
-      {
-      mQuatAccumulated.set(mTempAccumulated);
-      }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-    void setQuatCurrent()
-      {
-      mQuatCurrent.set(mTempCurrent);
-      }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-    Static4D getQuatAccumulated()
-      {
-      return mQuatAccumulated;
-      }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-    Static4D getQuatCurrent()
-      {
-      return mQuatCurrent;
-      }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-    private Static4D quatFromDrag(float dragX, float dragY)
-      {
-      float axisX = dragY;  // inverted X and Y - rotation axis is perpendicular to (dragX,dragY)
-      float axisY = dragX;  // Why not (-dragY, dragX) ? because Y axis is also inverted!
-      float axisZ = 0;
-      float axisL = (float)Math.sqrt(axisX*axisX + axisY*axisY + axisZ*axisZ);
-
-      if( axisL>0 )
-        {
-        axisX /= axisL;
-        axisY /= axisL;
-        axisZ /= axisL;
-
-        float ratio = axisL;
-        ratio = ratio - (int)ratio;     // the cos() is only valid in (0,Pi)
-
-        float cosA = (float)Math.cos(Math.PI*ratio);
-        float sinA = (float)Math.sqrt(1-cosA*cosA);
-
-        return new Static4D(axisX*sinA, axisY*sinA, axisZ*sinA, cosA);
-        }
-
-      return new Static4D(0f, 0f, 0f, 1f);
-      }
-
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 // PUBLIC API
 ///////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/main/res/layout/about.xml b/src/main/res/layout/about.xml
deleted file mode 100644
index 720c6cff..00000000
--- a/src/main/res/layout/about.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:gravity="center_horizontal"
-    android:orientation="vertical">
-
-
-    <LinearLayout
-        android:layout_width="fill_parent"
-        android:layout_height="fill_parent"
-        android:gravity="center|fill_horizontal"
-        android:layout_marginLeft="10dp"
-        android:layout_marginRight="10dp"
-        android:layout_marginTop="20dp"
-        android:background="@color/grey"
-        android:orientation="vertical">
-
-        <TextView
-            android:layout_width="match_parent"
-            android:layout_height="fill_parent"
-            android:layout_weight="0.40"
-            android:layout_marginTop="10dp"
-            android:layout_marginLeft="10dp"
-            android:layout_marginRight="10dp"
-            android:layout_marginBottom="10dp"
-            android:text="@string/credits1"/>
-
-        <TextView
-            android:layout_width="match_parent"
-            android:layout_height="fill_parent"
-            android:layout_weight="0.60"
-            android:layout_marginBottom="10dp"
-            android:layout_marginTop="10dp"
-            android:layout_marginLeft="10dp"
-            android:layout_marginRight="10dp"
-            android:linksClickable="true"
-            android:autoLink="web"
-            android:text="@string/credits2"/>
-
-    </LinearLayout>
-
-</LinearLayout>
\ No newline at end of file
diff --git a/src/main/res/layout/dialog_about.xml b/src/main/res/layout/dialog_about.xml
new file mode 100644
index 00000000..7516b7f3
--- /dev/null
+++ b/src/main/res/layout/dialog_about.xml
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:gravity="center_horizontal"
+    android:orientation="vertical">
+
+
+    <LinearLayout
+        android:layout_width="fill_parent"
+        android:layout_height="fill_parent"
+        android:gravity="center|fill_horizontal"
+        android:layout_marginLeft="10dp"
+        android:layout_marginRight="10dp"
+        android:layout_marginTop="0dp"
+        android:background="@color/grey"
+        android:orientation="vertical">
+
+        <TextView
+            android:id="@+id/about_version"
+            android:layout_width="match_parent"
+            android:layout_height="fill_parent"
+            android:layout_weight="0.40"
+            android:layout_marginTop="10dp"
+            android:layout_marginLeft="10dp"
+            android:layout_marginRight="10dp"
+            android:layout_marginBottom="10dp"/>
+
+        <TextView
+            android:layout_width="match_parent"
+            android:layout_height="fill_parent"
+            android:layout_weight="0.40"
+            android:layout_marginTop="10dp"
+            android:layout_marginLeft="10dp"
+            android:layout_marginRight="10dp"
+            android:layout_marginBottom="10dp"
+            android:text="@string/credits1"/>
+
+        <TextView
+            android:layout_width="match_parent"
+            android:layout_height="fill_parent"
+            android:layout_weight="0.60"
+            android:layout_marginBottom="10dp"
+            android:layout_marginTop="10dp"
+            android:layout_marginLeft="10dp"
+            android:layout_marginRight="10dp"
+            android:linksClickable="true"
+            android:autoLink="web"
+            android:text="@string/credits2"/>
+
+    </LinearLayout>
+
+</LinearLayout>
\ No newline at end of file
diff --git a/src/main/res/layout/dialog_main.xml b/src/main/res/layout/dialog_main.xml
new file mode 100644
index 00000000..720c6cff
--- /dev/null
+++ b/src/main/res/layout/dialog_main.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:gravity="center_horizontal"
+    android:orientation="vertical">
+
+
+    <LinearLayout
+        android:layout_width="fill_parent"
+        android:layout_height="fill_parent"
+        android:gravity="center|fill_horizontal"
+        android:layout_marginLeft="10dp"
+        android:layout_marginRight="10dp"
+        android:layout_marginTop="20dp"
+        android:background="@color/grey"
+        android:orientation="vertical">
+
+        <TextView
+            android:layout_width="match_parent"
+            android:layout_height="fill_parent"
+            android:layout_weight="0.40"
+            android:layout_marginTop="10dp"
+            android:layout_marginLeft="10dp"
+            android:layout_marginRight="10dp"
+            android:layout_marginBottom="10dp"
+            android:text="@string/credits1"/>
+
+        <TextView
+            android:layout_width="match_parent"
+            android:layout_height="fill_parent"
+            android:layout_weight="0.60"
+            android:layout_marginBottom="10dp"
+            android:layout_marginTop="10dp"
+            android:layout_marginLeft="10dp"
+            android:layout_marginRight="10dp"
+            android:linksClickable="true"
+            android:autoLink="web"
+            android:text="@string/credits2"/>
+
+    </LinearLayout>
+
+</LinearLayout>
\ No newline at end of file
diff --git a/src/main/res/layout/dialog_scores.xml b/src/main/res/layout/dialog_scores.xml
new file mode 100644
index 00000000..d70ded5e
--- /dev/null
+++ b/src/main/res/layout/dialog_scores.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:layout_weight="1"
+    android:orientation="vertical" >
+
+    <android.support.design.widget.TabLayout
+        android:id="@+id/sliding_tabs"
+        android:layout_width="match_parent"
+        android:layout_height="32dp"
+        android:theme="@style/Theme.AppCompat.NoActionBar">
+    </android.support.design.widget.TabLayout>
+
+    <android.support.v4.view.ViewPager
+        android:id="@+id/viewpager"
+        android:layout_width="match_parent"
+        android:layout_height="0dp"
+        android:layout_weight="1"
+        android:background="@android:color/black" />
+
+</LinearLayout>
diff --git a/src/main/res/layout/dialog_scores_downloading.xml b/src/main/res/layout/dialog_scores_downloading.xml
new file mode 100644
index 00000000..dc4bb8a3
--- /dev/null
+++ b/src/main/res/layout/dialog_scores_downloading.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<TextView xmlns:android="http://schemas.android.com/apk/res/android"
+  android:id="@+id/downloading_text"
+  android:layout_width="match_parent"
+  android:layout_height="match_parent"
+  android:textSize="32sp"
+  android:gravity="center"
+  android:text="@string/downloading"
+  android:padding="10dp"/>
\ No newline at end of file
diff --git a/src/main/res/layout/dialog_scores_scramble_row.xml b/src/main/res/layout/dialog_scores_scramble_row.xml
new file mode 100644
index 00000000..88031674
--- /dev/null
+++ b/src/main/res/layout/dialog_scores_scramble_row.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="fill_parent"
+    android:layout_height="0dp"
+    android:paddingBottom="2dp"
+    android:paddingTop="2dp"
+    android:orientation="horizontal" >
+
+    <ImageView
+        android:id="@+id/scoresScrambleRowCountry"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:layout_weight="1.5"
+        android:textSize="20sp"
+        android:gravity="left"
+        android:background="@color/black"
+        android:paddingLeft="0dp"/>
+
+    <TextView
+        android:id="@+id/scoresScrambleRowName"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:layout_weight="1"
+        android:textSize="20sp"
+        android:gravity="left"
+        android:background="@color/black"
+        />
+
+    <TextView
+        android:id="@+id/scoresScrambleRowTime"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:layout_weight="1.5"
+        android:textSize="20sp"
+        android:gravity="right"
+        android:background="@color/black"
+        android:paddingRight="5dp"
+        />
+</LinearLayout>
diff --git a/src/main/res/layout/dialog_scores_scramble_title.xml b/src/main/res/layout/dialog_scores_scramble_title.xml
new file mode 100644
index 00000000..81a0fca4
--- /dev/null
+++ b/src/main/res/layout/dialog_scores_scramble_title.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/scoresScrambleLayout"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:background="@color/grey"
+
+    android:paddingBottom="0dp"
+    android:paddingTop="0dp"
+    android:paddingLeft="5dp"
+    android:paddingRight="5dp"
+    android:orientation="vertical" >
+
+    <TextView
+        android:id="@+id/scoresScrambleTitle"
+        android:layout_width="match_parent"
+        android:layout_height="32dp"
+        android:textSize="24sp"
+        android:gravity="center"
+        android:background="@color/grey"
+        android:paddingBottom="0dp"
+        android:paddingTop="0dp"
+        android:paddingLeft="5dp"
+        android:paddingRight="5dp"/>
+
+</LinearLayout>
\ No newline at end of file
diff --git a/src/main/res/layout/dialog_scores_tab.xml b/src/main/res/layout/dialog_scores_tab.xml
new file mode 100644
index 00000000..74f63cd8
--- /dev/null
+++ b/src/main/res/layout/dialog_scores_tab.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8"?>
+<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/tabScrollView"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent">
+
+    <LinearLayout
+        android:id="@+id/tabLayout"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="vertical" >
+    </LinearLayout>
+
+</ScrollView>
+
diff --git a/src/main/res/layout/dialog_settings.xml b/src/main/res/layout/dialog_settings.xml
new file mode 100644
index 00000000..05c64595
--- /dev/null
+++ b/src/main/res/layout/dialog_settings.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/settingsScroll"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent">
+
+    <LinearLayout
+        android:id="@+id/settingsLayout"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="vertical" >
+    </LinearLayout>
+
+</ScrollView>
\ No newline at end of file
diff --git a/src/main/res/layout/dialog_title.xml b/src/main/res/layout/dialog_title.xml
new file mode 100644
index 00000000..5b1fc0c0
--- /dev/null
+++ b/src/main/res/layout/dialog_title.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<TextView xmlns:android="http://schemas.android.com/apk/res/android"
+  android:layout_width="match_parent"
+  android:layout_height="match_parent"
+  android:textSize="20sp"
+  android:gravity="center"
+  android:padding="10dp"/>
\ No newline at end of file
diff --git a/src/main/res/layout/scores.xml b/src/main/res/layout/scores.xml
deleted file mode 100644
index d70ded5e..00000000
--- a/src/main/res/layout/scores.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:layout_weight="1"
-    android:orientation="vertical" >
-
-    <android.support.design.widget.TabLayout
-        android:id="@+id/sliding_tabs"
-        android:layout_width="match_parent"
-        android:layout_height="32dp"
-        android:theme="@style/Theme.AppCompat.NoActionBar">
-    </android.support.design.widget.TabLayout>
-
-    <android.support.v4.view.ViewPager
-        android:id="@+id/viewpager"
-        android:layout_width="match_parent"
-        android:layout_height="0dp"
-        android:layout_weight="1"
-        android:background="@android:color/black" />
-
-</LinearLayout>
diff --git a/src/main/res/layout/scores_downloading.xml b/src/main/res/layout/scores_downloading.xml
deleted file mode 100644
index dc4bb8a3..00000000
--- a/src/main/res/layout/scores_downloading.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<TextView xmlns:android="http://schemas.android.com/apk/res/android"
-  android:id="@+id/downloading_text"
-  android:layout_width="match_parent"
-  android:layout_height="match_parent"
-  android:textSize="32sp"
-  android:gravity="center"
-  android:text="@string/downloading"
-  android:padding="10dp"/>
\ No newline at end of file
diff --git a/src/main/res/layout/scores_scramble_row.xml b/src/main/res/layout/scores_scramble_row.xml
deleted file mode 100644
index 88031674..00000000
--- a/src/main/res/layout/scores_scramble_row.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="fill_parent"
-    android:layout_height="0dp"
-    android:paddingBottom="2dp"
-    android:paddingTop="2dp"
-    android:orientation="horizontal" >
-
-    <ImageView
-        android:id="@+id/scoresScrambleRowCountry"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:layout_weight="1.5"
-        android:textSize="20sp"
-        android:gravity="left"
-        android:background="@color/black"
-        android:paddingLeft="0dp"/>
-
-    <TextView
-        android:id="@+id/scoresScrambleRowName"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:layout_weight="1"
-        android:textSize="20sp"
-        android:gravity="left"
-        android:background="@color/black"
-        />
-
-    <TextView
-        android:id="@+id/scoresScrambleRowTime"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:layout_weight="1.5"
-        android:textSize="20sp"
-        android:gravity="right"
-        android:background="@color/black"
-        android:paddingRight="5dp"
-        />
-</LinearLayout>
diff --git a/src/main/res/layout/scores_scramble_title.xml b/src/main/res/layout/scores_scramble_title.xml
deleted file mode 100644
index 81a0fca4..00000000
--- a/src/main/res/layout/scores_scramble_title.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:id="@+id/scoresScrambleLayout"
-    android:layout_width="match_parent"
-    android:layout_height="wrap_content"
-    android:background="@color/grey"
-
-    android:paddingBottom="0dp"
-    android:paddingTop="0dp"
-    android:paddingLeft="5dp"
-    android:paddingRight="5dp"
-    android:orientation="vertical" >
-
-    <TextView
-        android:id="@+id/scoresScrambleTitle"
-        android:layout_width="match_parent"
-        android:layout_height="32dp"
-        android:textSize="24sp"
-        android:gravity="center"
-        android:background="@color/grey"
-        android:paddingBottom="0dp"
-        android:paddingTop="0dp"
-        android:paddingLeft="5dp"
-        android:paddingRight="5dp"/>
-
-</LinearLayout>
\ No newline at end of file
diff --git a/src/main/res/layout/scores_tab.xml b/src/main/res/layout/scores_tab.xml
deleted file mode 100644
index 58a5ccc8..00000000
--- a/src/main/res/layout/scores_tab.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="fill_parent"
-    android:layout_height="fill_parent"
-    android:orientation="vertical" >
-
-    <ScrollView
-         android:id="@+id/tabScrollView"
-         android:layout_width="match_parent"
-         android:layout_height="match_parent"
-         android:background="@color/grey">
-
-         <LinearLayout
-             android:id="@+id/tabLayout"
-             android:layout_width="match_parent"
-             android:layout_height="wrap_content"
-             android:background="@color/grey"
-             android:orientation="vertical" >
-         </LinearLayout>
-
-    </ScrollView>
-
-</LinearLayout>
diff --git a/src/main/res/layout/scores_title.xml b/src/main/res/layout/scores_title.xml
deleted file mode 100644
index fa2f7832..00000000
--- a/src/main/res/layout/scores_title.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<TextView xmlns:android="http://schemas.android.com/apk/res/android"
-  android:layout_width="match_parent"
-  android:layout_height="match_parent"
-  android:textSize="22sp"
-  android:gravity="center"
-  android:padding="10dp"/>
\ No newline at end of file
diff --git a/src/main/res/layout/settings.xml b/src/main/res/layout/settings.xml
deleted file mode 100644
index 6ff21232..00000000
--- a/src/main/res/layout/settings.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:id="@+id/main_settings_layout"
-    android:gravity="center_horizontal"
-    android:orientation="vertical">
-
-</LinearLayout>
\ No newline at end of file
diff --git a/src/main/res/values/strings.xml b/src/main/res/values/strings.xml
index c149499d..11b9c760 100644
--- a/src/main/res/values/strings.xml
+++ b/src/main/res/values/strings.xml
@@ -7,6 +7,8 @@
     <string name="settings">Settings</string>
     <string name="scores">Scores</string>
     <string name="scores_title">High Scores</string>
+    <string name="settings_title">Settings</string>
+    <string name="about_title">About</string>
     <string name="about">About</string>
     <string name="save">SAVE</string>
     <string name="ok">OK</string>
