Skip to content
Snippets Groups Projects
Commit b98c17a7 authored by Valentin Kravtsov's avatar Valentin Kravtsov Committed by Android Git Automerger
Browse files

am f9d0f3a8: Fix for: For Voice IME busy circle displayed below waveform

Merge commit 'f9d0f3a8' into froyo-plus-aosp

* commit 'f9d0f3a8':
  Fix for: For Voice IME busy circle displayed below waveform
parents 97f4b4ad f9d0f3a8
No related branches found
No related tags found
No related merge requests found
...@@ -63,8 +63,7 @@ ...@@ -63,8 +63,7 @@
<ProgressBar android:id="@+id/progress" <ProgressBar android:id="@+id/progress"
android:layout_height="60dip" android:layout_height="60dip"
android:layout_width="60dip" android:layout_width="60dip"
android:layout_marginTop="20dip" android:layout_gravity="center"
android:layout_gravity="center_horizontal"
android:visibility="gone" android:visibility="gone"
android:indeterminate="true" android:indeterminate="true"
android:indeterminateOnly="false" android:indeterminateOnly="false"
......
...@@ -274,12 +274,11 @@ public class RecognitionView { ...@@ -274,12 +274,11 @@ public class RecognitionView {
final int count = (endIndex - startIndex) / numSamplePerWave; final int count = (endIndex - startIndex) / numSamplePerWave;
final float deltaX = 1.0f * w / count; final float deltaX = 1.0f * w / count;
int yMax = h / 2 - 10; int yMax = h / 2 - 8;
Path path = new Path(); Path path = new Path();
c.translate(0, yMax); c.translate(0, yMax);
float x = 0; float x = 0;
path.moveTo(x, 0); path.moveTo(x, 0);
yMax -= 10;
for (int i = 0; i < count; i++) { for (int i = 0; i < count; i++) {
final int avabs = getAverageAbs(waveBuffer, startIndex, i , numSamplePerWave); final int avabs = getAverageAbs(waveBuffer, startIndex, i , numSamplePerWave);
int sign = ( (i & 01) == 0) ? -1 : 1; int sign = ( (i & 01) == 0) ? -1 : 1;
...@@ -297,8 +296,8 @@ public class RecognitionView { ...@@ -297,8 +296,8 @@ public class RecognitionView {
mImage.setImageBitmap(b); mImage.setImageBitmap(b);
mImage.setVisibility(View.VISIBLE); mImage.setVisibility(View.VISIBLE);
MarginLayoutParams mProgressParams = (MarginLayoutParams)mProgress.getLayoutParams(); MarginLayoutParams mProgressParams = (MarginLayoutParams)mProgress.getLayoutParams();
mProgressParams.topMargin = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, mProgressParams.topMargin = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_PX,
-h / 2 - 18, mContext.getResources().getDisplayMetrics()); -h , mContext.getResources().getDisplayMetrics());
// Tweak the padding manually to fill out the whole view horizontally. // Tweak the padding manually to fill out the whole view horizontally.
// TODO: Do this in the xml layout instead. // TODO: Do this in the xml layout instead.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment