kopia lustrzana https://github.com/sh123/codec2_talkie
Tuning main activity
rodzic
ab94938111
commit
72bae61c82
|
@ -160,18 +160,18 @@ public class MainActivity extends AppCompatActivity {
|
|||
@Override
|
||||
public void handleMessage(Message msg) {
|
||||
if (msg.what == Codec2Player.PLAYER_DISCONNECT) {
|
||||
_textStatus.setText("Disconnected from Bluetooth");
|
||||
_textStatus.setText("DISC");
|
||||
Toast.makeText(getBaseContext(), "Bluetooth disconnected", Toast.LENGTH_SHORT).show();
|
||||
startBluetoothConnectActivity();
|
||||
}
|
||||
else if (msg.what == Codec2Player.PLAYER_LISTENING) {
|
||||
_textStatus.setText("Waiting...");
|
||||
_textStatus.setText("IDLE");
|
||||
}
|
||||
else if (msg.what == Codec2Player.PLAYER_RECORDING) {
|
||||
_textStatus.setText("Transmitting to radio");
|
||||
_textStatus.setText("TX");
|
||||
}
|
||||
else if (msg.what == Codec2Player.PLAYER_PLAYING) {
|
||||
_textStatus.setText("Receiving from radio");
|
||||
_textStatus.setText("RX");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -20,12 +20,12 @@
|
|||
|
||||
<androidx.appcompat.widget.AppCompatButton
|
||||
android:id="@+id/btnPtt"
|
||||
android:layout_width="270dp"
|
||||
android:layout_height="230dp"
|
||||
android:layout_marginStart="134dp"
|
||||
android:layout_marginTop="526dp"
|
||||
android:layout_marginEnd="134dp"
|
||||
android:layout_marginBottom="157dp"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="32dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:background="@drawable/btn_ptt"
|
||||
android:hapticFeedbackEnabled="false"
|
||||
android:text="@string/push_to_talk"
|
||||
|
@ -33,8 +33,9 @@
|
|||
android:textSize="24sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.598"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
app:layout_constraintTop_toBottomOf="@+id/checkBoxLoopback" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/checkBoxLoopback"
|
||||
|
@ -42,7 +43,7 @@
|
|||
android:layout_height="48dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:text="Codec2 loopback test"
|
||||
android:text="codec2 loopback"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/spinnerCodecMode" />
|
||||
|
||||
|
@ -51,19 +52,19 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginTop="24dp"
|
||||
android:entries="@array/codec2_modes"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/textStatus" />
|
||||
app:layout_constraintTop_toBottomOf="@+id/textBtName" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textStatus"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:text="Disconnected"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/textBtName" />
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -2,13 +2,13 @@
|
|||
<string name="app_name">Codec2 Walkie Talkie</string>
|
||||
<string name="push_to_talk">push-to-talk</string>
|
||||
<string-array name="codec2_modes">
|
||||
<item>CODEC2_MODE_450=10</item>
|
||||
<item>CODEC2_MODE_700C=8</item>
|
||||
<item>CODEC2_MODE_1200=5</item>
|
||||
<item>CODEC2_MODE_1300=4</item>
|
||||
<item>CODEC2_MODE_1400=3</item>
|
||||
<item>CODEC2_MODE_1600=2</item>
|
||||
<item>CODEC2_MODE_2400=1</item>
|
||||
<item>CODEC2_MODE_3200=0</item>
|
||||
<item>MODE_450=10</item>
|
||||
<item>MODE_700C=8</item>
|
||||
<item>MODE_1200=5</item>
|
||||
<item>MODE_1300=4</item>
|
||||
<item>MODE_1400=3</item>
|
||||
<item>MODE_1600=2</item>
|
||||
<item>MODE_2400=1</item>
|
||||
<item>MODE_3200=0</item>
|
||||
</string-array>
|
||||
</resources>
|
Ładowanie…
Reference in New Issue