mirror of
https://gitee.com/shuto/customCamera.git
synced 2026-04-14 00:00:03 +08:00
Optimisation de la barre d'optimisation
This commit is contained in:
@@ -120,7 +120,8 @@
|
|||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:alpha="0.6"
|
android:alpha="0.6"
|
||||||
android:background="@color/black" >
|
android:background="@color/black"
|
||||||
|
android:gravity="bottom" >
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/refuser"
|
android:id="@+id/refuser"
|
||||||
|
|||||||
@@ -1,12 +1,10 @@
|
|||||||
package org.geneanet.customcamera;
|
package org.geneanet.customcamera;
|
||||||
|
|
||||||
import java.io.FileNotFoundException;
|
|
||||||
import java.io.FileOutputStream;
|
import java.io.FileOutputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.content.Context;
|
|
||||||
import android.content.res.Configuration;
|
import android.content.res.Configuration;
|
||||||
import android.hardware.Camera;
|
import android.hardware.Camera;
|
||||||
import android.hardware.Camera.PictureCallback;
|
import android.hardware.Camera.PictureCallback;
|
||||||
@@ -117,32 +115,8 @@ public class CameraView extends Activity {
|
|||||||
public void onProgressChanged(SeekBar seekBar, int progresValue, boolean fromUser) {
|
public void onProgressChanged(SeekBar seekBar, int progresValue, boolean fromUser) {
|
||||||
progress = progresValue;
|
progress = progresValue;
|
||||||
ImageView imageView = (ImageView) findViewById(R.id.normal);
|
ImageView imageView = (ImageView) findViewById(R.id.normal);
|
||||||
switch(progress){
|
float newOpacity = (float) (0.2+progress*0.1);
|
||||||
case 0 :
|
imageView.setAlpha(newOpacity);
|
||||||
imageView.setAlpha((float)0.2);
|
|
||||||
break;
|
|
||||||
case 1 :
|
|
||||||
imageView.setAlpha((float)0.3);
|
|
||||||
break;
|
|
||||||
case 2 :
|
|
||||||
imageView.setAlpha((float)0.4);
|
|
||||||
break;
|
|
||||||
case 3 :
|
|
||||||
imageView.setAlpha((float)0.5);
|
|
||||||
break;
|
|
||||||
case 4 :
|
|
||||||
imageView.setAlpha((float)0.6);
|
|
||||||
break;
|
|
||||||
case 5 :
|
|
||||||
imageView.setAlpha((float)0.7);
|
|
||||||
break;
|
|
||||||
case 6 :
|
|
||||||
imageView.setAlpha((float)0.8);
|
|
||||||
break;
|
|
||||||
case 7 :
|
|
||||||
imageView.setAlpha((float)0.9);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user