commit edafb4a7e193f22c82b8858fc6900a4ee756fe3f
Author: Leszek Koltunski <leszek@distoretedandroid.org>
Date:   Mon Jul 4 17:12:29 2016 +0100

    Some progress with Fragment3D app - doesn't compile yet!

diff --git a/src/main/java/org/distorted/examples/fragment3d/Fragment3DActivity.java b/src/main/java/org/distorted/examples/fragment3d/Fragment3DActivity.java
index 9338c06..693435d 100644
--- a/src/main/java/org/distorted/examples/fragment3d/Fragment3DActivity.java
+++ b/src/main/java/org/distorted/examples/fragment3d/Fragment3DActivity.java
@@ -42,11 +42,12 @@ import org.distorted.library.DistortedCubes;
 import org.distorted.library.DistortedObject;
 import org.distorted.library.EffectNames;
 
+import java.util.ArrayList;
+
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
 public class Fragment3DActivity extends Activity
-                                implements OnSeekBarChangeListener,
-                                           View.OnClickListener,
+                                implements View.OnClickListener,
                                            AdapterView.OnItemSelectedListener
   {
   private static final int COLOR_OFF = 0xffffe81f;
@@ -54,8 +55,6 @@ public class Fragment3DActivity extends Activity
 
   private boolean firstScreen;
 
-  // fields needed for the first 'pick-a-shape' screen
-  //
   private int mNumCols = 3;
   private int mNumRows = 3;
   private NumberPicker mColsPicker, mRowsPicker;
@@ -65,22 +64,8 @@ public class Fragment3DActivity extends Activity
   private int mObjectType;
   private int mBitmap;
 
-  // fields needed for the second 'apply fragment effects' screen
-  //
-  private SeekBar bar;
-  private TextView textChroma, textAlpha, textBrightness, textSaturation, textCenter;
-  private int chromaL, chromaR, chromaG, chromaB;
-  private int alphaL;
-  private int brightnessL;
-  private int saturationL;
-  private int centerX, centerY;
-
-  private float fchromaL, fchromaR, fchromaG, fchromaB;
-  private float falphaL;
-  private float fbrightnessL;
-  private float fsaturationL;
-  private float fcenterX, fcenterY;
-  private EffectNames[] effects = new EffectNames[4];
+  private ArrayList<Fragment3DEffect> mEffects = new ArrayList<>();
+  private DistortedBitmap mCenter = null;
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
     
@@ -219,7 +204,6 @@ public class Fragment3DActivity extends Activity
       firstScreen = false;
       mObject = new DistortedBitmap(100,100,mNumCols);
       setContentView(R.layout.fragment3dlayout);
-      Default(null);
       }
     else
       {
@@ -248,9 +232,7 @@ public class Fragment3DActivity extends Activity
       str += mShape[i] ? "1" : "0";
 
     mObject = new DistortedCubes(mNumCols, str, 10);
-
     setContentView(R.layout.fragment3dlayout);
-    Default(null);
     }
 
 
@@ -281,272 +263,72 @@ public class Fragment3DActivity extends Activity
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 // 'second screen' methods
 
-  public void Default(View view)
-    {
-    effects[0] = EffectNames.CHROMA;
-    effects[1] = EffectNames.ALPHA;
-    effects[2] = EffectNames.BRIGHTNESS;
-    effects[3] = EffectNames.SATURATION;
-    
-    chromaL = 0;
-    chromaR = 0;
-    chromaG = 0;
-    chromaB = 0;
-
-    alphaL     = 0;
-    brightnessL= 0;
-    saturationL= 0;
-
-    centerX = 50;
-    centerY = 50;
-
-    textCenter = (TextView)findViewById(R.id.fragment3dcenterText);
-    computeCenter();
-    setCenterText();
-
-    setBar(R.id.fragment3dcenterX, centerX);
-    setBar(R.id.fragment3dcenterY, centerY);
-
-    addViews();
-    }
-    
-///////////////////////////////////////////////////////////////////////////////////////////////////
-    
-  private void addViews()
+  private void removeAllViews()
     {
     LinearLayout layout = (LinearLayout)findViewById(R.id.fragment3dlayout);
-    
-    layout.removeAllViews();
-      
-    View chroma    = getLayoutInflater().inflate(R.layout.fragment3dchroma    , null);
-    View alpha     = getLayoutInflater().inflate(R.layout.fragment3dalpha     , null);
-    View brightness= getLayoutInflater().inflate(R.layout.fragment3dbrightness, null);
-    View saturation= getLayoutInflater().inflate(R.layout.fragment3dsaturation, null);
-     
-    for( int i=effects.length-1 ; i>=0 ; i-- )
-      {
-      switch(effects[i])
-        {
-        case CHROMA     : layout.addView(chroma    , 0); break;
-        case ALPHA      : layout.addView(alpha     , 0); break;
-        case BRIGHTNESS : layout.addView(brightness, 0); break;
-        case SATURATION : layout.addView(saturation, 0); break;
-        }
-      }
-      
-    textChroma    = (TextView)findViewById(R.id.fragment3dchromaText);
-    textAlpha     = (TextView)findViewById(R.id.fragment3dalphaText);
-    textBrightness= (TextView)findViewById(R.id.fragment3dbrightnessText);
-    textSaturation= (TextView)findViewById(R.id.fragment3dsaturationText);
-     
-    setChromaText();
-    setAlphaText();
-    setBrightnessText();
-    setSaturationText();
-      
-    setBar(R.id.fragment3dchromaBar1, chromaL);
-    setBar(R.id.fragment3dchromaBar2, chromaR);
-    setBar(R.id.fragment3dchromaBar3, chromaG);
-    setBar(R.id.fragment3dchromaBar4, chromaB);
-
-    setBar(R.id.fragment3dalphaBar1     , alphaL);
-    setBar(R.id.fragment3dbrightnessBar1, brightnessL);
-    setBar(R.id.fragment3dsaturationBar1, saturationL);
-
-    Fragment3DSurfaceView view = (Fragment3DSurfaceView)findViewById(R.id.fragment3dSurfaceView);
-    view.getRenderer().setOrder(effects);
-    }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  private void moveUp(EffectNames name)
-    {
-    int len = effects.length-1;
-    int index = -1;
-
-    for(int i=0; i<=len; i++)
-      {
-      if( effects[i]==name )
-        {
-        index=i;
-        break;
-        }
-      }
-
-    if( index==0 )
-      {
-      for(int i=0; i<len; i++)
-        effects[i] = effects[i+1];
-
-      effects[len] = name;
-      }
-    else if( index>0 )
-      {
-      effects[index]   = effects[index-1];
-      effects[index-1] = name;
-      }
-
-    addViews();
-    }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  public void ButtonChroma(View v)
-    {
-    moveUp(EffectNames.CHROMA);
-    }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  public void ButtonAlpha(View v)
-    {
-    moveUp(EffectNames.ALPHA);
-    }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  public void ButtonBrightness(View v)
-    {
-    moveUp(EffectNames.BRIGHTNESS);
-    }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  public void ButtonSaturation(View v)
-    {
-    moveUp(EffectNames.SATURATION);
-    }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
 
-  private void setBar(int id, int value)
-    {
-    bar = (SeekBar)findViewById(id);
-    bar.setOnSeekBarChangeListener(this);
-    bar.setProgress(value);
+    layout.removeAllViews();
+    mEffects.clear();
+    mCenter = null;
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-  private void computeChroma()
+  private void addView(EffectNames name)
     {
-    Fragment3DSurfaceView view = (Fragment3DSurfaceView)findViewById(R.id.fragment3dSurfaceView);
-    Fragment3DRenderer renderer = view.getRenderer();
-
-    fchromaL = chromaL/100.0f;
-    fchromaR = chromaR*255/100.0f;
-    fchromaG = chromaG*255/100.0f;
-    fchromaB = chromaB*255/100.0f;
-
-    renderer.setChroma( fchromaL, fchromaR, fchromaG, fchromaB );
+    Fragment3DEffect newInfo = new Fragment3DEffect(name);
+    LinearLayout layout = (LinearLayout)findViewById(R.id.fragment3dlayout);
+    newInfo.addView(layout);
+    mEffects.add(newInfo);
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-  private void setChromaText()
+  public void Remove(View v)
     {
-    fchromaL = ((int)(100*fchromaL))/100.0f;
-    fchromaR = (float)((int)fchromaR);
-    fchromaG = (float)((int)fchromaG);
-    fchromaB = (float)((int)fchromaB);
-
-    textChroma.setText("chroma("+fchromaL+"( "+fchromaR+" , "+fchromaG+" , "+fchromaB+" )");
+    removeAllViews();
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-  private void computeAlpha()
+  public void newChroma(View v)
     {
-    Fragment3DSurfaceView view = (Fragment3DSurfaceView)findViewById(R.id.fragment3dSurfaceView);
-
-    falphaL = alphaL/100.0f;
-
-    view.getRenderer().setAlpha(falphaL);
+    addView(EffectNames.CHROMA);
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-  private void setAlphaText()
+  public void newAlpha(View v)
     {
-    falphaL = ((int)(100*falphaL))/100.0f;
-
-    textAlpha.setText("alpha("+falphaL+")");
+    addView(EffectNames.ALPHA);
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-  private void computeBrightness()
+  public void newBrightness(View v)
     {
-    Fragment3DSurfaceView view = (Fragment3DSurfaceView)findViewById(R.id.fragment3dSurfaceView);
-
-    fbrightnessL = brightnessL/100.0f;
-
-    view.getRenderer().setBrightness( fbrightnessL );
+    addView(EffectNames.BRIGHTNESS);
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-  private void setBrightnessText()
+  public void newSaturation(View v)
     {
-    fbrightnessL = ((int)(100*fbrightnessL))/100.0f;
-
-    textBrightness.setText("brightness("+fbrightnessL+")");
+    addView(EffectNames.SATURATION);
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-  private void computeSaturation()
-    {
-    Fragment3DSurfaceView view = (Fragment3DSurfaceView)findViewById(R.id.fragment3dSurfaceView);
-
-    fsaturationL = saturationL/100.0f;
-
-    view.getRenderer().setSaturation( fsaturationL );
-    }
-    
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  private void setSaturationText()
+  public DistortedBitmap getCenter()
     {
-    fsaturationL = ((int)(100*fsaturationL))/100.0f;
-
-    textSaturation.setText("saturation("+fsaturationL+")");
+    return mCenter;
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-  private void computeCenter()
+  public void setCenter(DistortedBitmap center  )
     {
-    Fragment3DSurfaceView view = (Fragment3DSurfaceView)findViewById(R.id.fragment3dSurfaceView);
-
-    fcenterX = centerX;
-    fcenterY = centerY;
-
-    view.getRenderer().setCenter( fcenterX, fcenterY );
-    }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  private void setCenterText()
-    {
-    fcenterX = ((int)(100*fcenterX))/100.0f;
-    fcenterY = ((int)(100*fcenterY))/100.0f;
-
-    textCenter.setText("center("+fcenterX+","+fcenterY+")");
-    }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  public float getCenterX()
-    {
-    return fcenterX;
-    }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  public float getCenterY()
-    {
-    return fcenterY;
+    mCenter = center;
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
@@ -592,30 +374,4 @@ public class Fragment3DActivity extends Activity
     Distorted.onDestroy();
     super.onDestroy();
     }
-    
-///////////////////////////////////////////////////////////////////////////////////////////////////
-    
-  public void onProgressChanged(SeekBar bar, int progress, boolean fromUser)
-    {
-    switch (bar.getId())
-      {
-      case R.id.fragment3dcenterX       : centerX    = progress; computeCenter()    ; setCenterText()    ; break;
-      case R.id.fragment3dcenterY       : centerY    = progress; computeCenter()    ; setCenterText()    ; break;
-      case R.id.fragment3dchromaBar1    : chromaL    = progress; computeChroma()    ; setChromaText()    ; break;
-      case R.id.fragment3dchromaBar2    : chromaR    = progress; computeChroma()    ; setChromaText()    ; break;
-      case R.id.fragment3dchromaBar3    : chromaG    = progress; computeChroma()    ; setChromaText()    ; break;
-      case R.id.fragment3dchromaBar4    : chromaB    = progress; computeChroma()    ; setChromaText()    ; break;
-      case R.id.fragment3dalphaBar1     : alphaL     = progress; computeAlpha()     ; setAlphaText()     ; break;
-      case R.id.fragment3dbrightnessBar1: brightnessL= progress; computeBrightness(); setBrightnessText(); break;
-      case R.id.fragment3dsaturationBar1: saturationL= progress; computeSaturation(); setSaturationText(); break;
-      }
-    }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  public void onStartTrackingTouch(SeekBar bar) { }
-    
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  public void onStopTrackingTouch(SeekBar bar)  { }
   }
diff --git a/src/main/java/org/distorted/examples/fragment3d/Fragment3DEffect.java b/src/main/java/org/distorted/examples/fragment3d/Fragment3DEffect.java
new file mode 100644
index 0000000..57a8c7c
--- /dev/null
+++ b/src/main/java/org/distorted/examples/fragment3d/Fragment3DEffect.java
@@ -0,0 +1,95 @@
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright 2016 Leszek Koltunski                                                               //
+//                                                                                               //
+// This file is part of Distorted.                                                               //
+//                                                                                               //
+// Distorted 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.                                                           //
+//                                                                                               //
+// Distorted 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 Distorted.  If not, see <http://www.gnu.org/licenses/>.                            //
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+package org.distorted.examples.fragment3d;
+
+import android.widget.LinearLayout;
+import android.widget.SeekBar;
+import android.widget.TextView;
+
+import org.distorted.library.DistortedBitmap;
+import org.distorted.library.EffectNames;
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+public class Fragment3DEffect implements SeekBar.OnSeekBarChangeListener
+
+  {
+  private static Fragment3DActivity activity;
+
+  private EffectNames name;
+  private float inter1, inter2, inter3, inter4;
+  private float regX, regY, regRX, regRY;
+
+  private TextView textEffect, textCenter;
+  private SeekBar[] mSpinRegion;
+  private SeekBar[] mSpinInter;
+
+  private DistortedBitmap mRegion;
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  public static void setActivity(Fragment3DActivity act)
+    {
+    activity = act;
+    }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  public Fragment3DEffect(EffectNames name)
+    {
+    this.name = name;
+    mSpinInter = new SeekBar[name.getDimension()];
+    mSpinRegion= new SeekBar[4];
+    }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  public void addView(LinearLayout layout)
+    {
+
+    }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  private void setBar(int id, int value)
+    {
+    SeekBar bar = (SeekBar)activity.findViewById(id);
+    bar.setOnSeekBarChangeListener(this);
+    bar.setProgress(value);
+    }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  public void onProgressChanged(SeekBar bar, int progress, boolean fromUser)
+    {
+    switch (bar.getId())
+      {
+      // TODO
+      }
+    }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  public void onStartTrackingTouch(SeekBar bar) { }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  public void onStopTrackingTouch(SeekBar bar)  { }
+  }
diff --git a/src/main/java/org/distorted/examples/fragment3d/Fragment3DRenderer.java b/src/main/java/org/distorted/examples/fragment3d/Fragment3DRenderer.java
index b7224cb..14db0fd 100644
--- a/src/main/java/org/distorted/examples/fragment3d/Fragment3DRenderer.java
+++ b/src/main/java/org/distorted/examples/fragment3d/Fragment3DRenderer.java
@@ -61,85 +61,9 @@ class Fragment3DRenderer implements GLSurfaceView.Renderer
 
     private DynamicQuat mQuatInt1, mQuatInt2;
 
-    private EffectNames[] order;
-
-    private Dynamic2D mCenterInter;
-    private Dynamic3D mChromaInter, mMoveInter;
-    private Dynamic1D mChromaLevelInter, mAlphaInter, mBrightnessInter, mSaturationInter;
-
-    private Static2D mCenterPoint;
-    private Static3D mChromaPoint, mMovePoint;
-    private Static1D mChromaLevel, mAlphaPoint, mBrightnessPoint, mSaturationPoint;
-
     Static4D mQuat1, mQuat2;
     int mScreenMin;
 
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-    public void setChroma(float level, float r, float g, float b)
-      {
-      mChromaLevel.set(level);
-      mChromaPoint.set(r, g, b);
-      }
-    
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-    public void setAlpha(float level)
-      {
-      mAlphaPoint.set(level);
-      }
-     
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-    public void setBrightness(float level)
-      {
-      mBrightnessPoint.set(level);
-      }
-    
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-    public void setSaturation(float level)
-      {
-      mSaturationPoint.set(level);
-      }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-    public void setCenter(float x, float y)
-      {
-      x = (0.012f*x-0.1f)*mObjWidth;
-      y = (0.012f*y-0.1f)*mObjHeight;
-
-      mCenterPoint.set(x,y);
-      mMovePoint.set(mFactorObj*x,mFactorObj*y,0);
-      }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-    public void setOrder(EffectNames[] effects)
-      {
-      order = effects;
-      setFragmentEffects();
-      }
-      
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-    private void setFragmentEffects()
-      {
-      mObject.abortEffects(EffectTypes.FRAGMENT);
-
-      for( int i=0; i<=order.length-1 ; i++ )
-        {
-        switch(order[i])
-          {
-          case CHROMA    : mObject.chroma    ( mChromaLevelInter , mChromaInter) ; break;
-          case ALPHA     : mObject.alpha     ( mAlphaInter                     ) ; break;
-          case BRIGHTNESS: mObject.brightness( mBrightnessInter                ) ; break;
-          case SATURATION: mObject.saturation( mSaturationInter                ) ; break;
-          }
-        }
-      }
-    
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
     public Fragment3DRenderer(GLSurfaceView v)
@@ -147,35 +71,10 @@ class Fragment3DRenderer implements GLSurfaceView.Renderer
       mView = v;
 
       mObject = ((Fragment3DActivity)v.getContext()).getObject();
-      mCenter = new DistortedBitmap(SIZE, SIZE, 1);
 
       mObjWidth = mObject.getWidth();
       mObjHeight= mObject.getHeight();
 
-      mCenterPoint    = new Static2D(0,0);
-      mMovePoint      = new Static3D(0,0,0);
-      mChromaPoint    = new Static3D(0,0,0);
-      mChromaLevel    = new Static1D(0);
-      mAlphaPoint     = new Static1D(1);
-      mBrightnessPoint= new Static1D(1);
-      mSaturationPoint= new Static1D(0.5f);
-
-      mCenterInter     = new Dynamic2D();
-      mMoveInter       = new Dynamic3D();
-      mChromaInter     = new Dynamic3D();
-      mChromaLevelInter= new Dynamic1D();
-      mAlphaInter      = new Dynamic1D();
-      mBrightnessInter = new Dynamic1D();
-      mSaturationInter = new Dynamic1D();
-
-      mCenterInter.add(mCenterPoint);
-      mMoveInter.add(mMovePoint);
-      mChromaInter.add(mChromaPoint);
-      mChromaLevelInter.add(mChromaLevel);
-      mAlphaInter.add(mAlphaPoint);
-      mBrightnessInter.add(mBrightnessPoint);
-      mSaturationInter.add(mSaturationPoint);
-
       mQuat1 = new Static4D(0,0,0,1);  // unity
       mQuat2 = new Static4D(0,0,0,1);  // quaternions
 
@@ -196,6 +95,9 @@ class Fragment3DRenderer implements GLSurfaceView.Renderer
       long time = System.currentTimeMillis();
 
       mObject.draw(time);
+
+      mCenter = mView.
+
       mCenter.draw(time);
       }
 
@@ -221,6 +123,14 @@ class Fragment3DRenderer implements GLSurfaceView.Renderer
         mFactorCen = (0.15f*width)/centerSize;
         }
 
+
+      Static3D rotateObj = new Static3D(mObjWidth/2,mObjHeight/2, 0);
+
+      mObject.move( new Static3D( (width-mFactorObj*mObjWidth)/2 , (height-mFactorObj*mObjHeight)/2 , 0) );
+      mObject.scale(mFactorObj);
+      mObject.quaternion(mQuatInt1, rotateObj);
+      mObject.quaternion(mQuatInt2, rotateObj);
+
       Fragment3DActivity act = (Fragment3DActivity)mView.getContext();
       float cX = act.getCenterX();
       float cY = act.getCenterY();
@@ -230,13 +140,6 @@ class Fragment3DRenderer implements GLSurfaceView.Renderer
 
       mMovePoint.set(cX*mFactorObj,cY*mFactorObj,0);
 
-      Static3D rotateObj = new Static3D(mObjWidth/2,mObjHeight/2, 0);
-
-      mObject.move( new Static3D( (width-mFactorObj*mObjWidth)/2 , (height-mFactorObj*mObjHeight)/2 , 0) );
-      mObject.scale(mFactorObj);
-      mObject.quaternion(mQuatInt1, rotateObj);
-      mObject.quaternion(mQuatInt2, rotateObj);
-
       Static3D rotateCen = new Static3D(width/2,height/2, 0);
 
       mCenter.quaternion(mQuatInt1, rotateCen);
diff --git a/src/main/res/layout/fragment3dlayout.xml b/src/main/res/layout/fragment3dlayout.xml
index 844ac60..c959a5f 100644
--- a/src/main/res/layout/fragment3dlayout.xml
+++ b/src/main/res/layout/fragment3dlayout.xml
@@ -13,56 +13,42 @@
     <LinearLayout
         android:orientation="horizontal"
         android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_marginBottom="5dp"
-        android:background="@android:color/holo_green_dark">
+        android:layout_height="50dp">
 
-        <LinearLayout
-            android:orientation="vertical"
-            android:layout_width="0dp"
-            android:layout_height="match_parent"
-            android:layout_weight="0.8">
-
-            <TextView
-                android:id="@+id/fragment3dcenterText"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_marginEnd="5dp"
-                android:layout_marginStart="5dp"
-                android:layout_marginTop="3dp"
-                />
-
-            <LinearLayout
-                android:orientation="horizontal"
-                android:layout_width="match_parent"
-                android:layout_height="match_parent"
-                >
+        <Button
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="@string/chroma"
+            android:id="@+id/newChroma"
+            android:onClick="newChroma"/>
 
-                <SeekBar
-                    android:layout_width="fill_parent"
-                    android:layout_height="wrap_content"
-                    android:id="@+id/fragment3dcenterX"
-                    android:layout_weight="0.5"
-                    android:paddingLeft="5dp"
-                    android:paddingRight="3dp"/>
+        <Button
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="@string/alpha"
+            android:id="@+id/newAlpha"
+            android:onClick="newAlpha"/>
 
-                <SeekBar
-                    android:layout_width="fill_parent"
-                    android:layout_height="wrap_content"
-                    android:id="@+id/fragment3dcenterY"
-                    android:layout_weight="0.5"
-                    android:paddingLeft="3dp"
-                    android:paddingRight="5dp"/>
-            </LinearLayout>
+        <Button
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="@string/brightness"
+            android:id="@+id/newBrigthness"
+            android:onClick="newBrightness"/>
 
-        </LinearLayout>
+        <Button
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="@string/saturation"
+            android:id="@+id/newSaturation"
+            android:onClick="newSaturation"/>
 
         <Button
             android:id="@+id/buttonDefault"
-            android:layout_width="60dp"
+            android:layout_width="fill_parent"
             android:layout_height="wrap_content"
-            android:onClick="Default"
-            android:text="@string/reset"
+            android:onClick="Remove"
+            android:text="@string/removebut"
             android:layout_gravity="right"
             android:layout_marginTop="3dp"/>
     </LinearLayout>
diff --git a/src/main/res/values/strings.xml b/src/main/res/values/strings.xml
index 61bcd94..7ef67b1 100644
--- a/src/main/res/values/strings.xml
+++ b/src/main/res/values/strings.xml
@@ -3,22 +3,26 @@
     <string name="app_name">Distorted Examples</string>
     <string name="tocHeader">Welcome to the Distorted Examples!\nCode, Tutorials, Wiki: http://distorted.org/</string>
     
-    <string name="continu">Continue</string>
-    <string name="rows">Rows</string>
-    <string name="cols">Cols</string>
     <string name="distort">Distort</string>
     <string name="deform">Deform</string>
     <string name="shear">Shear</string>
+    <string name="sink">Sink</string>
+    <string name="alpha">Alpha</string>
+    <string name="macroblock">Macro</string>
+    <string name="chroma">Chroma</string>
+    <string name="brightness">Brightness</string>
+    <string name="saturation">Saturation</string>
+    <string name="contrast">Contrast</string>
+
+    <string name="continu">Continue</string>
+    <string name="rows">Rows</string>
+    <string name="cols">Cols</string>
     <string name="path">Path</string>
     <string name="loop">Loop</string>
     <string name="jump">Jump</string>
     <string name="duration">Duration</string>
     <string name="reset">Reset</string>
     <string name="bubble">Bubble</string>
-    <string name="sink">Sink</string>
-    <string name="transparency">Trans</string>
-    <string name="macroblock">Macro</string>
-    <string name="chroma">Chroma</string>
     <string name="add">Touch screen to add new</string>
     <string name="remove">Remove existing effect(s) by</string>
     <string name="removebut">Remove</string>
