made frequency plot taller in portrait mode

art
Ahmet Inan 2024-07-17 10:51:10 +02:00
rodzic 4518a4a0f8
commit 5aa34cd089
2 zmienionych plików z 4 dodań i 4 usunięć

Wyświetl plik

@ -632,7 +632,7 @@ public class MainActivity extends AppCompatActivity {
private void createScope(Configuration config) {
int screenWidthDp = config.screenWidthDp;
int screenHeightDp = config.screenHeightDp;
int freqPlotHeightDp = 64;
int freqPlotHeightDp = 240;
if (config.orientation == Configuration.ORIENTATION_LANDSCAPE)
screenWidthDp /= 2;
else
@ -654,7 +654,7 @@ public class MainActivity extends AppCompatActivity {
int width = freqPlotBuffer.width;
int height = freqPlotBuffer.height / 2;
if (config.orientation != Configuration.ORIENTATION_LANDSCAPE)
height /= 4;
height = 95;
freqPlotBitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);
int stride = freqPlotBuffer.width;
int offset = stride * (freqPlotBuffer.line + freqPlotBuffer.height / 2 - height);

Wyświetl plik

@ -21,7 +21,7 @@
<ImageView
android:id="@+id/freq_plot"
android:layout_width="0dp"
android:layout_height="64dp"
android:layout_height="240dp"
android:contentDescription="@string/freq_plot_description"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/peak_meter"
@ -31,7 +31,7 @@
<ImageView
android:id="@+id/peak_meter"
android:layout_width="16dp"
android:layout_height="64dp"
android:layout_height="240dp"
android:contentDescription="@string/peak_meter_description"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"