9
0
mirror of https://gitee.com/shuto/customCamera.git synced 2026-05-02 00:07:24 +08:00
Augmentation de l'envergure de la barre d'opacity (de 0 à 1)
This commit is contained in:
ChristopheBoucaut
2015-01-05 13:45:02 +01:00
2 changed files with 5 additions and 4 deletions
@@ -54,12 +54,12 @@
android:layout_gravity="center_vertical"
android:layout_weight="0"
android:alpha="0.6"
android:max="7"
android:max="10"
android:maxHeight="13dp"
android:minHeight="0dp"
android:progress="0"
android:progress="5"
android:progressDrawable="@drawable/custom_opacity_bar"
android:secondaryProgress="7"
android:secondaryProgress="10"
android:thumb="@drawable/thumb"
android:thumbOffset="-0.9px" />
</LinearLayout>
@@ -103,7 +103,7 @@ public class CameraActivity extends Activity {
boolean fromUser) {
progress = progressValue;
ImageView background = (ImageView) findViewById(R.id.background);
float newOpacity = (float) (0.2 + progress * 0.1);
float newOpacity = (float) (progress * 0.1);
background.setAlpha(newOpacity);
}
@@ -336,6 +336,7 @@ public class CameraActivity extends Activity {
// set image at the view.
ImageView background = (ImageView) findViewById(R.id.background);
background.setImageBitmap(imgBackgroundBitmap);
background.setAlpha((float)0.5); // Opacity at the beginning
paramsMiniature.addRule(RelativeLayout.CENTER_IN_PARENT,
RelativeLayout.TRUE);