commit 50ac40a621cb360073f3b28339afc5ed19a45391
Author: Leszek Koltunski <leszek@distorted.org>
Date:   Thu Jun 30 00:53:22 2016 +0100

    some improvements for the way we test DistortedObjects.

diff --git a/src/main/java/org/distorted/examples/cubes/CubesActivity.java b/src/main/java/org/distorted/examples/cubes/CubesActivity.java
index 61e9d75..d9acc8b 100644
--- a/src/main/java/org/distorted/examples/cubes/CubesActivity.java
+++ b/src/main/java/org/distorted/examples/cubes/CubesActivity.java
@@ -21,32 +21,39 @@ package org.distorted.examples.cubes;
 
 import org.distorted.library.Distorted;
 import org.distorted.examples.R;
+import org.distorted.library.DistortedBitmap;
+import org.distorted.library.DistortedCubes;
+import org.distorted.library.DistortedObject;
 
 import android.app.Activity;
 import android.opengl.GLSurfaceView;
 import android.os.Bundle;
 import android.view.Gravity;
 import android.view.View;
+import android.widget.AdapterView;
+import android.widget.ArrayAdapter;
 import android.widget.Button;
 import android.widget.LinearLayout;
 import android.widget.NumberPicker;
 import android.widget.NumberPicker.OnValueChangeListener;
+import android.widget.Spinner;
 import android.widget.TableRow;
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-public class CubesActivity extends Activity implements View.OnClickListener
+public class CubesActivity extends Activity implements View.OnClickListener, AdapterView.OnItemSelectedListener
 {
-    private static int mNumCols = 3;
-    private static int mNumRows = 3;
-    
     private static final int COLOR_OFF = 0xffffe81f;
     private static final int COLOR_ON  = 0xff0000ff;
-    
+
+    private int mNumCols = 3;
+    private int mNumRows = 3;
     private NumberPicker mColsPicker, mRowsPicker;
     private LinearLayout mLay;
-    private static boolean[] mShape;
-    
+    private boolean[] mShape;
+    private DistortedObject mObject;
+    private int mObjectType;
+
 ///////////////////////////////////////////////////////////////////////////////////////////////////
     
     @Override
@@ -54,12 +61,12 @@ public class CubesActivity extends Activity implements View.OnClickListener
       {
       super.onCreate(savedState);
 
-      setContentView(R.layout.cubes1layout);
+      setContentView(R.layout.objectpickerlayout);
       
-      mLay = (LinearLayout)findViewById(R.id.buttongrid);
+      mLay = (LinearLayout)findViewById(R.id.objectpicker_buttongrid);
       
-      mColsPicker = (NumberPicker)findViewById(R.id.colsPicker);
-      mRowsPicker = (NumberPicker)findViewById(R.id.rowsPicker);
+      mColsPicker = (NumberPicker)findViewById(R.id.objectpicker_cols);
+      mRowsPicker = (NumberPicker)findViewById(R.id.objectpicker_rows);
       
       mColsPicker.setMaxValue(10);
       mColsPicker.setMinValue( 0);
@@ -83,32 +90,22 @@ public class CubesActivity extends Activity implements View.OnClickListener
            setGrid();
            }
          });
-      }
 
-///////////////////////////////////////////////////////////////////////////////////////////////////
+      mObjectType = 0;
 
-    public static int getCols()
-      {
-      return mNumCols; 
-      }
+      Spinner typeSpinner  = (Spinner)findViewById(R.id.objectpicker_spinnerType);
+      typeSpinner.setOnItemSelectedListener(this);
 
-///////////////////////////////////////////////////////////////////////////////////////////////////
+      String[] objectType = new String[] {"DistortedCubes", "DistortedBitmap"};
 
-    public static String getShape()
-      {
-      String str = ""; 
-       
-      for(int i=0; i<mNumRows*mNumCols; i++)
-        str += mShape[i] ? "1" : "0";
-      
-      //android.util.Log.d("CUBES", str);
-      
-      return str; 
+      ArrayAdapter<String> adapter = new ArrayAdapter<>(this, android.R.layout.simple_spinner_item, objectType);
+      adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
+      typeSpinner.setAdapter(adapter);
       }
-    
+
 ///////////////////////////////////////////////////////////////////////////////////////////////////
     
-    public void setGrid()
+    private void setGrid()
       {
       mNumCols = mColsPicker.getValue();
       mNumRows = mRowsPicker.getValue();
@@ -153,6 +150,22 @@ public class CubesActivity extends Activity implements View.OnClickListener
         }
       }
 
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  public void onItemSelected(AdapterView<?> parent, View view, int pos, long id)
+    {
+    switch(parent.getId())
+      {
+      case R.id.objectpicker_spinnerType: mObjectType = pos; break;
+      }
+    }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  public void onNothingSelected(AdapterView<?> parent)
+    {
+    }
+
 ///////////////////////////////////////////////////////////////////////////////////////////////////
     
     public void onClick(View view) 
@@ -209,8 +222,29 @@ public class CubesActivity extends Activity implements View.OnClickListener
  
 ///////////////////////////////////////////////////////////////////////////////////////////////////
     
-    public void Continue(View v)
-      {   
-      setContentView(R.layout.cubes2layout);
-      }     
+    public void Create(View v)
+      {
+      if( mObjectType==1 )
+        {
+        mObject = new DistortedBitmap(100,100,mNumCols);
+        }
+      else
+        {
+        String str = "";
+
+        for(int i=0; i<mNumRows*mNumCols; i++)
+          str += mShape[i] ? "1" : "0";
+
+        mObject = new DistortedCubes(mNumCols, str, 10);
+        }
+
+      setContentView(R.layout.cubeslayout);
+      }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+    public DistortedObject getObject()
+      {
+      return mObject;
+      }
 }
diff --git a/src/main/java/org/distorted/examples/cubes/CubesRenderer.java b/src/main/java/org/distorted/examples/cubes/CubesRenderer.java
index 4c98ac7..ffeb96e 100644
--- a/src/main/java/org/distorted/examples/cubes/CubesRenderer.java
+++ b/src/main/java/org/distorted/examples/cubes/CubesRenderer.java
@@ -59,7 +59,7 @@ class CubesRenderer implements GLSurfaceView.Renderer
       {
       mView = v;
 
-      mObject = new DistortedCubes( CubesActivity.getCols(), CubesActivity.getShape(), 100);
+      mObject = ((CubesActivity)v.getContext()).getObject();
 
       mObjWidth = mObject.getWidth();
       mObjHeight= mObject.getHeight();
diff --git a/src/main/java/org/distorted/examples/effects2d/Effects2DActivity.java b/src/main/java/org/distorted/examples/effects2d/Effects2DActivity.java
index 56d30f8..4753c07 100644
--- a/src/main/java/org/distorted/examples/effects2d/Effects2DActivity.java
+++ b/src/main/java/org/distorted/examples/effects2d/Effects2DActivity.java
@@ -43,8 +43,8 @@ import java.util.HashMap;
 
 public class Effects2DActivity extends Activity implements AdapterView.OnItemSelectedListener
   {
-  private Spinner mID, mName, mType;
-  private static ArrayAdapter<String> mAdapterName, mAdapterType;
+  private Spinner mAdd, mID, mName, mType;
+  private static ArrayAdapter<String> mAdapterAdd, mAdapterName, mAdapterType;
   private static ArrayAdapter<Long> mAdapterID;
 
   private int mPosID, mPosName, mPosType;
@@ -65,10 +65,12 @@ public class Effects2DActivity extends Activity implements AdapterView.OnItemSel
     mPosName = 0;
     mPosType = 0;
 
+    mAdd  = (Spinner)findViewById(R.id.effects2d_spinnerAdd );
     mID   = (Spinner)findViewById(R.id.effects2d_spinnerID  );
     mName = (Spinner)findViewById(R.id.effects2d_spinnerName);
     mType = (Spinner)findViewById(R.id.effects2d_spinnerType);
 
+    mAdd.setOnItemSelectedListener(this);
     mID.setOnItemSelectedListener(this);
     mName.setOnItemSelectedListener(this);
     mType.setOnItemSelectedListener(this);
@@ -83,6 +85,10 @@ public class Effects2DActivity extends Activity implements AdapterView.OnItemSel
 
     String[] itemsType = new String[] {"VERTEX", "FRAGMENT"};
 
+    mAdapterAdd = new ArrayAdapter<>(this, android.R.layout.simple_spinner_item, itemsName);
+    mAdapterAdd.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
+    mAdd.setAdapter(mAdapterAdd);
+
     mAdapterID = new ArrayAdapter<>(this, android.R.layout.simple_spinner_item, itemsID);
     mAdapterID.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
     mID.setAdapter(mAdapterID);
@@ -136,41 +142,6 @@ public class Effects2DActivity extends Activity implements AdapterView.OnItemSel
     Distorted.onDestroy();
     super.onDestroy();
     }     
- 
-///////////////////////////////////////////////////////////////////////////////////////////////////
-    
-  public void Distort(View v)
-    {
-    Effects2DSurfaceView.setEffect(0);
-    }     
-    
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  public void Sink(View v)
-    {
-    Effects2DSurfaceView.setEffect(1);
-    }       
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-    
-  public void Transparency(View v)
-    {
-    Effects2DSurfaceView.setEffect(2);
-    }     
-    
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  public void Macroblock(View v)
-    {
-    Effects2DSurfaceView.setEffect(3);
-    }       
- 
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  public void Chroma(View v)
-    {
-    Effects2DSurfaceView.setEffect(4);
-    }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
@@ -178,6 +149,7 @@ public class Effects2DActivity extends Activity implements AdapterView.OnItemSel
     {
     switch(parent.getId())
       {
+      case R.id.effects2d_spinnerAdd : Effects2DSurfaceView.setEffect(pos); break;
       case R.id.effects2d_spinnerID  : mPosID   = pos; break;
       case R.id.effects2d_spinnerName: mPosName = pos; break;
       case R.id.effects2d_spinnerType: mPosType = pos; break;
diff --git a/src/main/java/org/distorted/examples/olimpic/OlimpicRenderer.java b/src/main/java/org/distorted/examples/olimpic/OlimpicRenderer.java
index aa271e6..e6762fe 100644
--- a/src/main/java/org/distorted/examples/olimpic/OlimpicRenderer.java
+++ b/src/main/java/org/distorted/examples/olimpic/OlimpicRenderer.java
@@ -103,7 +103,7 @@ class OlimpicRenderer implements GLSurfaceView.Renderer
         tmp = (DistortedBitmap)mCircleNode[i].getObject();
         tmp.move( new Static3D(positions[2*i], positions[2*i+1], 0) );
         tmp.rotate( mRot, axis, center );
-        tmp.chroma( new Static1D(0.8f), new Static3D(colors[3*i],colors[3*i+1], colors[3*i+2]) );
+        tmp.chroma( new Static1D(0.5f), new Static3D(colors[3*i],colors[3*i+1], colors[3*i+2]) );
         }
       }
 
diff --git a/src/main/java/org/distorted/examples/vertex3d/Vertex3DActivity.java b/src/main/java/org/distorted/examples/vertex3d/Vertex3DActivity.java
index 9335b42..312b5ca 100644
--- a/src/main/java/org/distorted/examples/vertex3d/Vertex3DActivity.java
+++ b/src/main/java/org/distorted/examples/vertex3d/Vertex3DActivity.java
@@ -24,35 +24,43 @@ import android.opengl.GLSurfaceView;
 import android.os.Bundle;
 import android.view.Gravity;
 import android.view.View;
+import android.widget.AdapterView;
+import android.widget.ArrayAdapter;
 import android.widget.Button;
 import android.widget.LinearLayout;
 import android.widget.NumberPicker;
 import android.widget.SeekBar;
 import android.widget.SeekBar.OnSeekBarChangeListener;
+import android.widget.Spinner;
 import android.widget.TableRow;
 import android.widget.TextView;
 
 import org.distorted.examples.R;
 import org.distorted.library.Distorted;
+import org.distorted.library.DistortedBitmap;
+import org.distorted.library.DistortedCubes;
+import org.distorted.library.DistortedObject;
 import org.distorted.library.EffectNames;
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-public class Vertex3DActivity extends Activity implements OnSeekBarChangeListener, View.OnClickListener
+public class Vertex3DActivity extends Activity
+                              implements OnSeekBarChangeListener,
+                                         View.OnClickListener,
+                                         AdapterView.OnItemSelectedListener
   {
+  private static final int COLOR_OFF = 0xffffe81f;
+  private static final int COLOR_ON  = 0xff0000ff;
+
   private boolean firstScreen;
 
   // fields needed for the first 'pick-a-shape' screen
   //
-  private static int mNumCols = 3;
-  private static int mNumRows = 3;
-
-  private static final int COLOR_OFF = 0xffffe81f;
-  private static final int COLOR_ON  = 0xff0000ff;
-
+  private int mNumCols = 3;
+  private int mNumRows = 3;
   private NumberPicker mColsPicker, mRowsPicker;
   private LinearLayout mLay;
-  private static boolean[] mShape;
+  private boolean[] mShape;
 
   // fields needed for the second 'apply vertex effects' screen
   //
@@ -70,8 +78,11 @@ public class Vertex3DActivity extends Activity implements OnSeekBarChangeListene
   private float fswirlA;
   private float fcenterX, fcenterY;
 
+  private DistortedObject mObject;
+
   private EffectNames[] effects = new EffectNames[4];
-    
+  private int mObjectType;
+
 ///////////////////////////////////////////////////////////////////////////////////////////////////
     
   @Override
@@ -79,12 +90,12 @@ public class Vertex3DActivity extends Activity implements OnSeekBarChangeListene
     {
     super.onCreate(savedState);
 
-    setContentView(R.layout.cubes1layout);
+    setContentView(R.layout.objectpickerlayout);
 
-    mLay = (LinearLayout)findViewById(R.id.buttongrid);
+    mLay = (LinearLayout)findViewById(R.id.objectpicker_buttongrid);
 
-    mColsPicker = (NumberPicker)findViewById(R.id.colsPicker);
-    mRowsPicker = (NumberPicker)findViewById(R.id.rowsPicker);
+    mColsPicker = (NumberPicker)findViewById(R.id.objectpicker_cols);
+    mRowsPicker = (NumberPicker)findViewById(R.id.objectpicker_rows);
 
     mColsPicker.setMaxValue(10);
     mColsPicker.setMinValue( 0);
@@ -110,33 +121,22 @@ public class Vertex3DActivity extends Activity implements OnSeekBarChangeListene
       });
 
     firstScreen = true;
-    }
 
-///////////////////////////////////////////////////////////////////////////////////////////////////
-// 'first screen' methods
+    mObjectType = 0;
 
-  public static int getCols()
-    {
-    return mNumCols;
-    }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  public static String getShape()
-    {
-    String str = "";
+    Spinner typeSpinner  = (Spinner)findViewById(R.id.objectpicker_spinnerType);
+    typeSpinner.setOnItemSelectedListener(this);
 
-    for(int i=0; i<mNumRows*mNumCols; i++)
-      str += mShape[i] ? "1" : "0";
+    String[] objectType = new String[] {"DistortedCubes", "DistortedBitmap"};
 
-    //android.util.Log.d("CUBES", str);
-
-    return str;
+    ArrayAdapter<String> adapter = new ArrayAdapter<>(this, android.R.layout.simple_spinner_item, objectType);
+    adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
+    typeSpinner.setAdapter(adapter);
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-  public void setGrid()
+  private void setGrid()
     {
     mNumCols = mColsPicker.getValue();
     mNumRows = mRowsPicker.getValue();
@@ -181,6 +181,13 @@ public class Vertex3DActivity extends Activity implements OnSeekBarChangeListene
       }
     }
 
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  public DistortedObject getObject()
+    {
+    return mObject;
+    }
+
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
   public void onClick(View view)
@@ -193,13 +200,45 @@ public class Vertex3DActivity extends Activity implements OnSeekBarChangeListene
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-  public void Continue(View v)
+  public void Create(View v)
     {
     firstScreen = false;
+
+    if( mObjectType==1 )
+      {
+      mObject = new DistortedBitmap(100,100,mNumCols);
+      }
+    else
+      {
+      String str = "";
+
+      for(int i=0; i<mNumRows*mNumCols; i++)
+        str += mShape[i] ? "1" : "0";
+
+      mObject = new DistortedCubes(mNumCols, str, 10);
+      }
+
     setContentView(R.layout.vertex3dlayout);
     Default(null);
     }
 
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  public void onItemSelected(AdapterView<?> parent, View view, int pos, long id)
+    {
+    switch(parent.getId())
+      {
+      case R.id.objectpicker_spinnerType: mObjectType = pos; break;
+      }
+    }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  public void onNothingSelected(AdapterView<?> parent)
+    {
+    }
+
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 // 'second screen' methods
 
diff --git a/src/main/java/org/distorted/examples/vertex3d/Vertex3DRenderer.java b/src/main/java/org/distorted/examples/vertex3d/Vertex3DRenderer.java
index db0f5e5..aaefcbc 100644
--- a/src/main/java/org/distorted/examples/vertex3d/Vertex3DRenderer.java
+++ b/src/main/java/org/distorted/examples/vertex3d/Vertex3DRenderer.java
@@ -145,8 +145,7 @@ class Vertex3DRenderer implements GLSurfaceView.Renderer
       {
       mView = v;
 
-      mObject = new DistortedCubes( Vertex3DActivity.getCols(), Vertex3DActivity.getShape(), SIZE);
-      //mObject = new DistortedBitmap( SIZE, SIZE, 3);
+      mObject = ((Vertex3DActivity)v.getContext()).getObject();
       mCenter = new DistortedBitmap(SIZE, SIZE, 1);
 
       mObjWidth = mObject.getWidth();
diff --git a/src/main/res/layout/cubes1layout.xml b/src/main/res/layout/cubes1layout.xml
deleted file mode 100644
index edc0880..0000000
--- a/src/main/res/layout/cubes1layout.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="fill_vertical"
-    android:orientation="vertical" >
-
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:gravity="center_vertical|center_horizontal" >
-
-        <NumberPicker
-            android:id="@+id/rowsPicker"
-            android:layout_width="wrap_content"
-            android:layout_height="match_parent"
-            android:layout_marginRight="10dp" />
-
-        <NumberPicker
-            android:id="@+id/colsPicker"
-            android:layout_width="wrap_content"
-            android:layout_height="match_parent"
-            android:paddingRight="10dp" />
-
-        <Button
-            android:id="@+id/matrix3dRowMove"
-            android:layout_width="124dp"
-            android:layout_height="match_parent"
-            android:layout_weight="0.64"
-            android:onClick="Continue"
-            android:text="@string/continu" />
-    </LinearLayout>
-
-    <LinearLayout
-        android:id="@+id/buttongrid"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:gravity="center"
-        android:orientation="vertical" >
-
-    </LinearLayout>
-
-</LinearLayout>
diff --git a/src/main/res/layout/cubes2layout.xml b/src/main/res/layout/cubes2layout.xml
deleted file mode 100644
index 825afa1..0000000
--- a/src/main/res/layout/cubes2layout.xml
+++ /dev/null
@@ -1,14 +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:gravity="center_horizontal"
-    android:orientation="vertical" >
-
-    <org.distorted.examples.cubes.CubesSurfaceView
-        android:id="@+id/cubesSurfaceView"
-        android:layout_width="match_parent"
-        android:layout_height="0dp"
-        android:layout_weight="1.00" />
-
-</LinearLayout>
diff --git a/src/main/res/layout/cubeslayout.xml b/src/main/res/layout/cubeslayout.xml
new file mode 100644
index 0000000..825afa1
--- /dev/null
+++ b/src/main/res/layout/cubeslayout.xml
@@ -0,0 +1,14 @@
+<?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:gravity="center_horizontal"
+    android:orientation="vertical" >
+
+    <org.distorted.examples.cubes.CubesSurfaceView
+        android:id="@+id/cubesSurfaceView"
+        android:layout_width="match_parent"
+        android:layout_height="0dp"
+        android:layout_weight="1.00" />
+
+</LinearLayout>
diff --git a/src/main/res/layout/effects2dlayout.xml b/src/main/res/layout/effects2dlayout.xml
index 8ec5384..5fd165b 100644
--- a/src/main/res/layout/effects2dlayout.xml
+++ b/src/main/res/layout/effects2dlayout.xml
@@ -25,76 +25,6 @@
         android:orientation="vertical"
         android:weightSum="1">
 
-        <View
-            android:layout_height="2dip"
-            android:background="#FF0000"
-            android:layout_width="match_parent"
-            />
-
-        <TextView
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:text="@string/add"
-            android:id="@+id/textView"
-            android:layout_gravity="center_horizontal"/>
-
-        <RadioGroup
-            android:id="@+id/radioGroup1"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:paddingLeft="5dp"
-            android:paddingRight="10dp"
-            android:orientation="horizontal"
-            android:layout_gravity="center_horizontal">
-
-            <RadioButton
-                android:id="@+id/effects2dDistort"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:checked="true"
-                android:onClick="Distort"
-                android:text="@string/distort"
-                android:textSize="12dp"/>
-
-            <RadioButton
-                android:id="@+id/effects2dSink"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:onClick="Sink"
-                android:text="@string/sink"
-                android:textSize="12dp"/>
-
-            <RadioButton
-                android:id="@+id/effects2dTransparency"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:onClick="Transparency"
-                android:text="@string/transparency"
-                android:textSize="12dp"/>
-
-            <RadioButton
-                android:id="@+id/effects2dMacroblock"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:onClick="Macroblock"
-                android:text="@string/macroblock"
-                android:textSize="12dp"/>
-
-            <RadioButton
-                android:id="@+id/effects2dBrightness"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:onClick="Chroma"
-                android:text="@string/chroma"
-                android:textSize="12dp"/>
-
-        </RadioGroup>
-
-        <View
-            android:layout_height="2dip"
-            android:background="#FF0000"
-            android:layout_width="match_parent"/>
-
         <TableLayout
             android:layout_width="fill_parent"
             android:layout_height="wrap_content"
@@ -104,6 +34,26 @@
             android:paddingLeft="10dp"
             android:paddingRight="10dp">
 
+            <TableRow
+                android:layout_width="match_parent"
+                android:layout_height="match_parent">
+
+                <TextView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:text="@string/add"
+                    android:id="@+id/textView"
+                    android:layout_gravity="center_vertical"
+                    android:layout_span="2"
+                    android:layout_marginLeft="8dp"/>
+
+                <Spinner
+                    android:layout_width="fill_parent"
+                    android:layout_height="40dp"
+                    android:id="@+id/effects2d_spinnerAdd"
+                    />
+            </TableRow>
+
             <TableRow
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
@@ -183,7 +133,7 @@
         </TableLayout>
         <View
             android:layout_height="2dip"
-            android:background="#FF0000"
+            android:background="#333333"
             android:layout_width="match_parent"
             />
 
diff --git a/src/main/res/layout/matrix3dmove.xml b/src/main/res/layout/matrix3dmove.xml
index 6758825..cbeaf8f 100644
--- a/src/main/res/layout/matrix3dmove.xml
+++ b/src/main/res/layout/matrix3dmove.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 
             <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-                android:id="@id/matrix3dRowMove"
+                android:id="@+id/matrix3dRowMov"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
                 android:orientation="horizontal" >
diff --git a/src/main/res/layout/objectpickerlayout.xml b/src/main/res/layout/objectpickerlayout.xml
new file mode 100644
index 0000000..e6bb1db
--- /dev/null
+++ b/src/main/res/layout/objectpickerlayout.xml
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+   <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:orientation="vertical"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent">
+
+       <TableLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:stretchColumns="1,2,3"
+        android:shrinkColumns="1,2,3">
+
+        <TableRow
+            android:layout_width="match_parent"
+            android:layout_height="match_parent">
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:textAppearance="?android:attr/textAppearanceMedium"
+                android:text="@string/Create"
+                android:id="@+id/textView2"
+                android:layout_gravity="center_vertical"
+                android:layout_marginLeft="10dp"/>
+
+            <Spinner
+                android:layout_width="fill_parent"
+                android:layout_height="50dp"
+                android:id="@+id/objectpicker_spinnerType"
+                android:layout_span="3"/>
+        </TableRow>
+
+        <TableRow
+            android:layout_width="match_parent"
+            android:layout_height="match_parent">
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:textAppearance="?android:attr/textAppearanceMedium"
+                android:text="@string/rows"
+                android:id="@+id/textView8"
+                android:layout_gravity="center_vertical"
+                android:layout_marginLeft="10dp"/>
+
+            <NumberPicker
+                android:id="@+id/objectpicker_rows"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:orientation="vertical"
+                android:layout_span="1"
+                />
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:textAppearance="?android:attr/textAppearanceMedium"
+                android:text="@string/cols"
+                android:id="@+id/textView9"
+                android:layout_marginLeft="10dp"
+                android:layout_gravity="center_vertical"/>
+
+            <NumberPicker
+                android:id="@+id/objectpicker_cols"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:orientation="vertical"
+                />
+        </TableRow>
+
+       </TableLayout>
+
+    <LinearLayout
+        android:id="@+id/objectpicker_buttongrid"
+        android:layout_width="match_parent"
+        android:layout_height="0dp"
+        android:gravity="center"
+        android:orientation="vertical"
+        android:layout_weight="0.8">
+    </LinearLayout>
+
+    <Button
+        android:id="@+id/objectpicker_create"
+        android:onClick="Create"
+        android:text="@string/Create"
+        android:layout_width="match_parent"
+        android:layout_height="50dp"
+        android:layout_span="4"
+        android:layout_marginTop="5dp"/>
+
+</LinearLayout>
\ No newline at end of file
diff --git a/src/main/res/values/strings.xml b/src/main/res/values/strings.xml
index a4ab762..5c2bd66 100644
--- a/src/main/res/values/strings.xml
+++ b/src/main/res/values/strings.xml
@@ -45,6 +45,7 @@
     <string name="Up">Up</string>
     <string name="Default">Default</string>
     <string name="save">Save</string>
+    <string name="Create">Create</string>
 
     <string name="example_monalisa">Mona Lisa</string>  
     <string name="example_monalisa_subtitle">The basics of Distortions.</string>
