/
ap1k
/
MultimediaJavaAndroid
Обзор
Документация
Войти
/
ap1k
/
MultimediaJavaAndroid
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
app/src/main/res/layout/activity_audio_player.xml
133 строки
5 KB
Roman
Full proj
11 май 2025, 13:58
11 май 2025, 13:58
4ffd117
Код
Авторство
О чём код?
<?xml version="1.0" encoding="utf-8"?> <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@color/player_background" android:padding="16dp"> <TextView android:id="@+id/tvAudioTitle" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/audio_title" android:textSize="24sp" android:textStyle="bold" android:textColor="@color/player_text" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" /> <androidx.cardview.widget.CardView android:id="@+id/cardViewTrackInfo" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="32dp" app:cardCornerRadius="8dp" app:cardElevation="4dp" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/tvAudioTitle"> <androidx.constraintlayout.widget.ConstraintLayout android:layout_width="match_parent" android:layout_height="match_parent" android:padding="16dp"> <ImageView android:id="@+id/ivTrackCover" android:layout_width="100dp" android:layout_height="100dp" android:scaleType="centerCrop" android:src="@android:drawable/ic_media_play" android:background="@color/primary_light" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" app:layout_constraintBottom_toBottomOf="parent" /> <TextView android:id="@+id/tvTrackTitle" android:layout_width="0dp" android:layout_height="wrap_content" android:text="@string/track_title_1" android:textSize="18sp" android:textStyle="bold" android:layout_marginStart="16dp" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toEndOf="@+id/ivTrackCover" app:layout_constraintTop_toTopOf="@+id/ivTrackCover" /> </androidx.constraintlayout.widget.ConstraintLayout> </androidx.cardview.widget.CardView> <TextView android:id="@+id/tvCurrentTime" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="0:00" android:textSize="14sp" android:layout_marginTop="32dp" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/cardViewTrackInfo" /> <TextView android:id="@+id/tvTotalTime" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="0:00" android:textSize="14sp" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toTopOf="@+id/tvCurrentTime" /> <SeekBar android:id="@+id/seekBarAudio" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_marginTop="16dp" android:progressTint="@color/player_progress" android:thumbTint="@color/player_progress" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/tvCurrentTime" /> <LinearLayout android:id="@+id/linearLayoutAudioControls" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" android:gravity="center" android:layout_marginTop="32dp" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/seekBarAudio"> <com.google.android.material.floatingactionbutton.FloatingActionButton android:id="@+id/fabPlayAudio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginEnd="16dp" android:backgroundTint="@color/player_controls" android:src="@android:drawable/ic_media_play" app:tint="@color/white" /> <com.google.android.material.floatingactionbutton.FloatingActionButton android:id="@+id/fabPauseAudio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginEnd="16dp" android:backgroundTint="@color/player_controls" android:src="@android:drawable/ic_media_pause" app:tint="@color/white" /> <com.google.android.material.floatingactionbutton.FloatingActionButton android:id="@+id/fabStopAudio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:backgroundTint="@color/player_controls" android:src="@android:drawable/ic_media_previous" app:tint="@color/white" /> </LinearLayout> </androidx.constraintlayout.widget.ConstraintLayout>