9
0
mirror of https://gitee.com/shuto/customCamera.git synced 2026-04-14 00:00:03 +08:00

Augmentation de l'envergure de la barre d'opacity (de 0 à 1)

This commit is contained in:
Thomas BOY
2015-01-05 11:06:42 +01:00
parent d5f63b4b74
commit ed1c559e67
2 changed files with 6 additions and 5 deletions

View File

@@ -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>

View File

@@ -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);
}
@@ -331,6 +331,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);
@@ -735,7 +736,7 @@ public class CameraActivity extends Activity {
}
/**
* When the back button is pressed
* When the back button is pressed.
*/
@Override
public void onBackPressed() {