Polish the recording audio dialog a little

pull/14/head
Sam Bosley 13 years ago
parent 75ebb8d817
commit bd71eb16d2

@ -9,7 +9,7 @@ import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.TextView;
import android.widget.Chronometer;
import android.widget.Toast;
import com.timsu.astrid.R;
@ -17,7 +17,6 @@ import com.todoroo.aacenc.AACRecorder;
import com.todoroo.aacenc.AACRecorder.AACRecorderCallbacks;
import com.todoroo.aacenc.AACToM4A;
import com.todoroo.andlib.utility.DialogUtilities;
import com.todoroo.astrid.service.ThemeService;
public class AACRecordingActivity extends Activity implements AACRecorderCallbacks {
@ -26,6 +25,7 @@ public class AACRecordingActivity extends Activity implements AACRecorderCallbac
public static final String RESULT_FILENAME = "filename"; //$NON-NLS-1$
private AACRecorder recorder;
private Chronometer timer;
private String tempFile;
private ProgressDialog pd;
@ -43,11 +43,11 @@ public class AACRecordingActivity extends Activity implements AACRecorderCallbac
recorder = new AACRecorder();
recorder.setListener(this);
recorder.startRecording(tempFile);
timer.start();
}
private void setupUi() {
View stopRecording = findViewById(R.id.stop_recording);
stopRecording.setBackgroundColor(getResources().getColor(ThemeService.getThemeColor()));
stopRecording.setOnClickListener(new OnClickListener() {
@Override
@ -66,12 +66,12 @@ public class AACRecordingActivity extends Activity implements AACRecorderCallbac
}
});
TextView speechBubble = (TextView) findViewById(R.id.reminder_message);
speechBubble.setText(R.string.audio_speak_now);
timer = (Chronometer) findViewById(R.id.timer);
}
private void stopRecording() {
recorder.stopRecording();
timer.stop();
pd = DialogUtilities.progressDialog(this, getString(R.string.audio_encoding));
pd.show();

@ -14,7 +14,7 @@
android:orientation="horizontal"
android:layout_marginTop="5dip"
android:layout_marginRight="5dip"
android:layout_marginBottom="15dip"
android:layout_marginBottom="10dip"
android:layout_marginLeft="10dip">
<TextView
@ -35,6 +35,14 @@
</LinearLayout>
<Chronometer
android:id="@+id/timer"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dip"
android:textColor="@android:color/white"
android:textSize="24sp"
android:gravity="center"/>
<TextView
android:id="@+id/stop_recording"
@ -44,15 +52,9 @@
android:layout_marginRight="10dip"
android:layout_marginBottom="10dip"
android:textColor="@android:color/white"
android:background="@color/red_theme_color"
android:textSize="24sp"
android:gravity="center"
android:text="@string/audio_stop_recording"/>
<FrameLayout
android:id="@+id/missed_calls_speech_bubble"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<include layout="@layout/astrid_speech_bubble" />
</FrameLayout>
</LinearLayout>
Loading…
Cancel
Save