diff --git a/src/com/android/settings/deviceinfo/aboutphone/StorageCardView.java b/src/com/android/settings/deviceinfo/aboutphone/StorageCardView.java index 9d5c4481630..e930cf346d3 100644 --- a/src/com/android/settings/deviceinfo/aboutphone/StorageCardView.java +++ b/src/com/android/settings/deviceinfo/aboutphone/StorageCardView.java @@ -63,17 +63,18 @@ protected void init(Context context) { layout = new RelativeLayout(context); layout.setLayoutParams(new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.MATCH_PARENT, getResources().getDimensionPixelSize(R.dimen.storage_card_min_height))); waveView = new WaveView(context); + waveView.setLayoutParams(new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.MATCH_PARENT)); + waveView.setAlpha(0.5f); layout.setClickable(true); TextView storageTitle = new TextView(context); storageTitle.setTextSize(18); storageTitle.setTextColor(Utils.getColorAttrDefaultColor(context, android.R.attr.textColorPrimary)); storageTitle.setLayoutParams(new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT)); - storageTitle.setAlpha((float) 0.9); + storageTitle.setAlpha(0.9f); storageTitle.setPadding(defaultPadding,defaultPadding,0,0); storageTitle.setText(getResources().getString(R.string.storage_card_title)); layout.addView(waveView); layout.addView(storageTitle); - waveView.setLayoutParams(new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.MATCH_PARENT)); setupStorageInfo(context); addView(layout); setRadius(defaultRadius); @@ -88,7 +89,7 @@ private void setupStorageInfo(Context context) { params.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM); storageInfoUsed.setLayoutParams(params); storageInfoUsed.setGravity(Gravity.START|Gravity.BOTTOM); - storageInfoUsed.setAlpha((float) 0.9); + storageInfoUsed.setAlpha(0.9f); storageInfoUsed.setPadding(defaultPadding, 0,0,defaultPadding); TextView storageInfoTotal = new TextView(context); storageInfoTotal.setTextSize(16); @@ -97,14 +98,14 @@ private void setupStorageInfo(Context context) { params2.addRule(RelativeLayout.END_OF, R.id.storage_info_used_id); params2.addRule(RelativeLayout.ALIGN_BASELINE, R.id.storage_info_used_id); storageInfoTotal.setLayoutParams(params2); - storageInfoTotal.setAlpha((float) 0.9); + storageInfoTotal.setAlpha(0.9f); TextView storageInfo = new TextView(context); storageInfo.setTextSize(14); storageInfo.setTextColor(Utils.getColorAttrDefaultColor(context, android.R.attr.textColorSecondary)); RelativeLayout.LayoutParams params3 = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT); params3.addRule(RelativeLayout.ABOVE, R.id.storage_info_used_id); storageInfo.setLayoutParams(params3); - storageInfo.setAlpha((float) 0.7); + storageInfo.setAlpha(0.7f); storageInfo.setPadding(defaultPadding, 0,0,0); storageInfo.setText(getResources().getString(R.string.storage_card_info)); manageStorageInfo(storageInfoUsed, storageInfoTotal); @@ -279,8 +280,8 @@ protected class Wave extends View { private final float WAVE_HZ_FAST = 0.13f; private final float WAVE_HZ_NORMAL = 0.09f; private final float WAVE_HZ_SLOW = 0.05f; - public final int DEFAULT_ABOVE_WAVE_ALPHA = 100; - public final int DEFAULT_BLOW_WAVE_ALPHA = 50; + public final int DEFAULT_ABOVE_WAVE_ALPHA = 255; + public final int DEFAULT_BLOW_WAVE_ALPHA = 100; private final float X_SPACE = 20; private final double PI2 = 2 * Math.PI; private Path mAboveWavePath = new Path(); @@ -487,4 +488,4 @@ protected void onDraw(Canvas canvas) { canvas.drawRect(getLeft(), 0, getRight(), getBottom(), aboveWavePaint); } } -} \ No newline at end of file +}