use a RelativeLayout at the player controls
This commit is contained in:
parent
e0e0c1fcb5
commit
daf4d9800a
3 changed files with 16 additions and 18 deletions
|
@ -60,5 +60,4 @@ dependencies {
|
||||||
implementation 'com.simplemobiletools:commons:5.24.9'
|
implementation 'com.simplemobiletools:commons:5.24.9'
|
||||||
implementation 'org.greenrobot:eventbus:3.2.0'
|
implementation 'org.greenrobot:eventbus:3.2.0'
|
||||||
implementation 'com.github.Armen101:AudioRecordView:1.0.2'
|
implementation 'com.github.Armen101:AudioRecordView:1.0.2'
|
||||||
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta4'
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -95,7 +95,7 @@
|
||||||
android:paddingEnd="@dimen/normal_margin"
|
android:paddingEnd="@dimen/normal_margin"
|
||||||
android:text="00:00" />
|
android:text="00:00" />
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<RelativeLayout
|
||||||
android:id="@+id/player_controls"
|
android:id="@+id/player_controls"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
@ -106,46 +106,44 @@
|
||||||
android:id="@+id/previous_btn"
|
android:id="@+id/previous_btn"
|
||||||
android:layout_width="@dimen/normal_icon_size"
|
android:layout_width="@dimen/normal_icon_size"
|
||||||
android:layout_height="@dimen/normal_icon_size"
|
android:layout_height="@dimen/normal_icon_size"
|
||||||
|
android:layout_alignTop="@+id/play_pause_btn"
|
||||||
|
android:layout_alignBottom="@+id/play_pause_btn"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:layout_toStartOf="@+id/play_pause_btn"
|
||||||
android:alpha="0.8"
|
android:alpha="0.8"
|
||||||
android:background="?attr/selectableItemBackgroundBorderless"
|
android:background="?attr/selectableItemBackgroundBorderless"
|
||||||
android:contentDescription="@string/previous"
|
android:contentDescription="@string/previous"
|
||||||
android:padding="@dimen/medium_margin"
|
android:padding="@dimen/medium_margin"
|
||||||
android:src="@drawable/ic_previous_vector_new"
|
android:src="@drawable/ic_previous_vector_new" />
|
||||||
app:layout_constraintBottom_toBottomOf="@+id/play_pause_btn"
|
|
||||||
app:layout_constraintEnd_toStartOf="@+id/play_pause_btn"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="@+id/play_pause_btn" />
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/play_pause_btn"
|
android:id="@+id/play_pause_btn"
|
||||||
android:layout_width="@dimen/toggle_recording_button_size"
|
android:layout_width="@dimen/toggle_recording_button_size"
|
||||||
android:layout_height="@dimen/toggle_recording_button_size"
|
android:layout_height="@dimen/toggle_recording_button_size"
|
||||||
android:layout_centerHorizontal="true"
|
android:layout_centerHorizontal="true"
|
||||||
|
android:layout_marginStart="@dimen/player_button_margin"
|
||||||
|
android:layout_marginEnd="@dimen/player_button_margin"
|
||||||
android:layout_marginBottom="@dimen/big_margin"
|
android:layout_marginBottom="@dimen/big_margin"
|
||||||
android:background="@drawable/circle_background"
|
android:background="@drawable/circle_background"
|
||||||
android:contentDescription="@string/playpause"
|
android:contentDescription="@string/playpause"
|
||||||
android:elevation="@dimen/medium_margin"
|
android:elevation="@dimen/medium_margin"
|
||||||
android:padding="@dimen/normal_margin"
|
android:padding="@dimen/normal_margin"
|
||||||
android:src="@drawable/ic_play_vector"
|
android:src="@drawable/ic_play_vector" />
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintHorizontal_bias="0.5"
|
|
||||||
app:layout_constraintStart_toStartOf="parent" />
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/next_btn"
|
android:id="@+id/next_btn"
|
||||||
android:layout_width="@dimen/normal_icon_size"
|
android:layout_width="@dimen/normal_icon_size"
|
||||||
android:layout_height="@dimen/normal_icon_size"
|
android:layout_height="@dimen/normal_icon_size"
|
||||||
|
android:layout_alignTop="@+id/play_pause_btn"
|
||||||
|
android:layout_alignBottom="@+id/play_pause_btn"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:layout_toEndOf="@+id/play_pause_btn"
|
||||||
android:alpha="0.8"
|
android:alpha="0.8"
|
||||||
android:background="?attr/selectableItemBackgroundBorderless"
|
android:background="?attr/selectableItemBackgroundBorderless"
|
||||||
android:contentDescription="@string/next"
|
android:contentDescription="@string/next"
|
||||||
android:padding="@dimen/medium_margin"
|
android:padding="@dimen/medium_margin"
|
||||||
android:src="@drawable/ic_next_vector_new"
|
android:src="@drawable/ic_next_vector_new" />
|
||||||
app:layout_constraintBottom_toBottomOf="@+id/play_pause_btn"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toEndOf="@+id/play_pause_btn"
|
|
||||||
app:layout_constraintTop_toTopOf="@+id/play_pause_btn" />
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</RelativeLayout>
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
</com.simplemobiletools.voicerecorder.fragments.PlayerFragment>
|
</com.simplemobiletools.voicerecorder.fragments.PlayerFragment>
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<dimen name="toggle_recording_button_size">64dp</dimen>
|
<dimen name="toggle_recording_button_size">64dp</dimen>
|
||||||
|
<dimen name="player_button_margin">48dp</dimen>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
Loading…
Reference in a new issue