Commit 42f5e6bb authored by Geoffrey Métais's avatar Geoffrey Métais

Fix equalizer layout for ConstraintLayout behavior

parent 6b2aee44
<?xml version="1.0" encoding="utf-8"?>
<layout>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<data>
<variable
name="state"
type="org.videolan.vlc.gui.audio.EqualizerFragment.EqualizerState" />
</data>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="wrap_content"
<android.support.constraint.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:minWidth="680dp"
android:minHeight="448dp"
android:padding="@dimen/default_margin" >
android:minHeight="320dp"
android:minWidth="448dp"
android:padding="@dimen/default_margin">
<android.support.constraint.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.SwitchCompat
android:id="@+id/equalizer_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toLeftOf="@+id/equalizer_presets"
app:layout_constraintHorizontal_chainStyle="spread_inside" />
<android.support.v7.widget.SwitchCompat
android:id="@+id/equalizer_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toLeftOf="@+id/equalizer_presets"
app:layout_constraintVertical_chainStyle="packed"/>
<android.support.v7.widget.AppCompatSpinner
android:id="@+id/equalizer_presets"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="@+id/equalizer_button"
app:layout_constraintLeft_toRightOf="@+id/equalizer_button"
app:layout_constraintRight_toLeftOf="@+id/equalizer_save"
app:layout_constraintTop_toTopOf="@+id/equalizer_button" />
<android.support.v7.widget.AppCompatSpinner
android:id="@+id/equalizer_presets"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="@+id/equalizer_button"
app:layout_constraintTop_toTopOf="@+id/equalizer_button"
app:layout_constraintLeft_toRightOf="@+id/equalizer_button"
app:layout_constraintRight_toLeftOf="@+id/equalizer_save"/>
<ImageView
android:visibility="@{state.saveButtonVisibility}"
android:id="@+id/equalizer_save"
android:layout_width="wrap_content"
android:layout_height="0dp"
app:layout_constraintWidth_min="wrap"
app:layout_constraintDimensionRatio="1"
android:src="?attr/ic_save"
app:layout_constraintBottom_toBottomOf="@+id/equalizer_presets"
app:layout_constraintTop_toTopOf="@+id/equalizer_presets"
app:layout_constraintLeft_toRightOf="@+id/equalizer_presets"
app:layout_constraintRight_toLeftOf="@+id/equalizer_revert"/>
<ImageView
android:visibility="@{state.saveButtonVisibility}"
android:id="@+id/equalizer_save"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintDimensionRatio="1"
android:src="?attr/ic_save"
app:layout_constraintBottom_toBottomOf="@+id/equalizer_presets"
app:layout_constraintTop_toTopOf="@+id/equalizer_presets"
app:layout_constraintLeft_toRightOf="@+id/equalizer_presets"
app:layout_constraintRight_toLeftOf="@+id/equalizer_revert"/>
<ImageView
android:visibility="@{state.revertButtonVisibility}"
android:id="@+id/equalizer_revert"
android:layout_width="wrap_content"
android:layout_height="0dp"
app:layout_constraintWidth_min="wrap"
app:layout_constraintDimensionRatio="1"
android:src="?attr/ic_reset"
app:layout_constraintBottom_toBottomOf="@+id/equalizer_save"
app:layout_constraintTop_toTopOf="@+id/equalizer_save"
app:layout_constraintLeft_toRightOf="@+id/equalizer_save"
app:layout_constraintRight_toLeftOf="@+id/guideine" />
<ImageView
android:visibility="@{state.revertButtonVisibility}"
android:id="@+id/equalizer_revert"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintDimensionRatio="1"
android:src="?attr/ic_reset"
app:layout_constraintBottom_toBottomOf="@+id/equalizer_save"
app:layout_constraintTop_toTopOf="@+id/equalizer_save"
app:layout_constraintLeft_toRightOf="@+id/equalizer_save"
app:layout_constraintRight_toLeftOf="@+id/guideine" />
<ImageView
android:visibility="@{state.deleteButtonVisibility}"
android:id="@+id/equalizer_delete"
android:layout_width="wrap_content"
android:layout_height="0dp"
app:layout_constraintWidth_min="wrap"
app:layout_constraintDimensionRatio="1"
android:src="?attr/ic_trash"
app:layout_constraintBottom_toBottomOf="@+id/equalizer_save"
app:layout_constraintTop_toTopOf="@+id/equalizer_save"
app:layout_constraintLeft_toLeftOf="@+id/equalizer_save"
app:layout_constraintRight_toRightOf="@+id/equalizer_save" />
<ImageView
android:visibility="@{state.deleteButtonVisibility}"
android:id="@+id/equalizer_delete"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintDimensionRatio="1"
android:src="?attr/ic_trash"
app:layout_constraintBottom_toBottomOf="@+id/equalizer_save"
app:layout_constraintTop_toTopOf="@+id/equalizer_save"
app:layout_constraintLeft_toLeftOf="@+id/equalizer_save"
app:layout_constraintRight_toRightOf="@+id/equalizer_save" />
<android.support.constraint.Guideline
android:id="@+id/guideine"
android:orientation="vertical"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintGuide_percent="0.5"
app:layout_constraintLeft_toRightOf="@+id/equalizer_revert"
app:layout_constraintRight_toLeftOf="@+id/equalizer_preamp" />
<android.support.constraint.Guideline
android:id="@+id/guideine"
android:orientation="vertical"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintGuide_percent="0.5"
app:layout_constraintLeft_toRightOf="@+id/equalizer_revert"
app:layout_constraintRight_toLeftOf="@+id/equalizer_preamp" />
<SeekBar
android:id="@+id/equalizer_preamp"
android:layout_width="0dp"
android:layout_height="0dp"
android:maxHeight="4dip"
android:minHeight="4dip"
android:progressDrawable="@drawable/po_seekbar"
android:thumb="@drawable/seekbar_thumb"
android:splitTrack="false"
app:layout_constraintBottom_toBottomOf="@+id/equalizer_revert"
app:layout_constraintTop_toTopOf="@+id/equalizer_revert"
app:layout_constraintLeft_toRightOf="@+id/guideine"
app:layout_constraintRight_toRightOf="parent" />
<SeekBar
android:id="@+id/equalizer_preamp"
android:layout_width="0dp"
android:layout_height="0dp"
android:maxHeight="4dip"
android:minHeight="4dip"
android:progressDrawable="@drawable/po_seekbar"
android:thumb="@drawable/seekbar_thumb"
android:splitTrack="false"
app:layout_constraintBottom_toBottomOf="@+id/equalizer_revert"
app:layout_constraintTop_toTopOf="@+id/equalizer_revert"
app:layout_constraintLeft_toRightOf="@+id/guideine"
app:layout_constraintRight_toRightOf="parent" />
<HorizontalScrollView
android:id="@+id/equalizer_scroll"
android:layout_width="wrap_content"
android:layout_height="0dp"
app:layout_constraintHorizontal_bias="0.5"
android:fillViewport="true"
android:fadeScrollbars="false"
app:layout_constraintTop_toBottomOf="@+id/equalizer_preamp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent">
<HorizontalScrollView
android:id="@+id/equalizer_scroll"
<LinearLayout
android:id="@+id/equalizer_bands"
android:layout_width="wrap_content"
android:layout_height="0dp"
app:layout_constraintHorizontal_bias="0.5"
android:fillViewport="true"
android:fadeScrollbars="false"
app:layout_constraintTop_toBottomOf="@+id/equalizer_preamp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent">
<LinearLayout
android:id="@+id/equalizer_bands"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="horizontal"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"/>
</HorizontalScrollView>
</android.support.constraint.ConstraintLayout>
android:layout_height="match_parent"
android:orientation="horizontal"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"/>
</HorizontalScrollView>
</LinearLayout>
</android.support.constraint.ConstraintLayout>
</layout>
\ No newline at end of file
......@@ -6,110 +6,107 @@
type="org.videolan.vlc.gui.audio.EqualizerFragment.EqualizerState" />
</data>
<LinearLayout
<android.support.constraint.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:minWidth="680dp"
android:minHeight="448dp"
android:minHeight="320dp"
android:padding="@dimen/default_margin" >
<android.support.constraint.ConstraintLayout
<android.support.v7.widget.SwitchCompat
android:id="@+id/equalizer_button"
android:layout_width="wrap_content"
android:layout_height="match_parent">
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintHorizontal_chainStyle="spread_inside"
app:layout_constraintVertical_chainStyle="packed"/>
<android.support.v7.widget.SwitchCompat
android:id="@+id/equalizer_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintHorizontal_chainStyle="packed"
app:layout_constraintVertical_chainStyle="packed"/>
<android.support.v7.widget.AppCompatSpinner
android:id="@+id/equalizer_presets"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="@+id/equalizer_button"
app:layout_constraintLeft_toRightOf="@+id/equalizer_button"
app:layout_constraintRight_toLeftOf="@+id/equalizer_save"
app:layout_constraintTop_toTopOf="@+id/equalizer_button"
app:layout_constraintVertical_bias="0.0"
app:layout_constraintWidth_max="512dp"
app:layout_constraintWidth_min="wrap" />
<android.support.v7.widget.AppCompatSpinner
android:id="@+id/equalizer_presets"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintWidth_max="512dp"
app:layout_constraintBottom_toBottomOf="@+id/equalizer_button"
app:layout_constraintTop_toTopOf="@+id/equalizer_button"
app:layout_constraintLeft_toRightOf="@+id/equalizer_button"
app:layout_constraintRight_toLeftOf="@+id/equalizer_save"/>
<ImageView
android:visibility="@{state.saveButtonVisibility}"
android:id="@+id/equalizer_save"
android:layout_width="wrap_content"
android:layout_height="0dp"
app:layout_constraintWidth_min="wrap"
app:layout_constraintDimensionRatio="1"
android:src="?attr/ic_save"
app:layout_constraintBottom_toBottomOf="@+id/equalizer_presets"
app:layout_constraintTop_toTopOf="@+id/equalizer_presets"
app:layout_constraintLeft_toRightOf="@+id/equalizer_presets"
app:layout_constraintRight_toLeftOf="@+id/equalizer_revert"/>
<ImageView
android:visibility="@{state.saveButtonVisibility}"
android:id="@+id/equalizer_save"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintDimensionRatio="1"
android:src="?attr/ic_save"
app:layout_constraintBottom_toBottomOf="@+id/equalizer_presets"
app:layout_constraintTop_toTopOf="@+id/equalizer_presets"
app:layout_constraintLeft_toRightOf="@+id/equalizer_presets"
app:layout_constraintRight_toLeftOf="@+id/equalizer_revert"/>
<ImageView
android:visibility="@{state.revertButtonVisibility}"
android:id="@+id/equalizer_revert"
android:layout_width="wrap_content"
android:layout_height="0dp"
app:layout_constraintWidth_min="wrap"
app:layout_constraintDimensionRatio="1"
android:src="?attr/ic_reset"
app:layout_constraintBottom_toBottomOf="@+id/equalizer_save"
app:layout_constraintTop_toTopOf="@+id/equalizer_save"
app:layout_constraintLeft_toRightOf="@+id/equalizer_save"
app:layout_constraintRight_toRightOf="parent" />
<ImageView
android:visibility="@{state.revertButtonVisibility}"
android:id="@+id/equalizer_revert"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintDimensionRatio="1"
android:src="?attr/ic_reset"
app:layout_constraintBottom_toBottomOf="@+id/equalizer_save"
app:layout_constraintTop_toTopOf="@+id/equalizer_save"
app:layout_constraintLeft_toRightOf="@+id/equalizer_save"
app:layout_constraintRight_toRightOf="parent" />
<ImageView
android:visibility="@{state.deleteButtonVisibility}"
android:id="@+id/equalizer_delete"
android:layout_width="wrap_content"
android:layout_height="0dp"
app:layout_constraintDimensionRatio="1"
android:src="?attr/ic_trash"
app:layout_constraintBottom_toBottomOf="@+id/equalizer_save"
app:layout_constraintTop_toTopOf="@+id/equalizer_save"
app:layout_constraintLeft_toLeftOf="@+id/equalizer_save"
app:layout_constraintRight_toRightOf="@+id/equalizer_save" />
<ImageView
android:visibility="@{state.deleteButtonVisibility}"
android:id="@+id/equalizer_delete"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintDimensionRatio="1"
android:src="?attr/ic_trash"
app:layout_constraintBottom_toBottomOf="@+id/equalizer_save"
app:layout_constraintTop_toTopOf="@+id/equalizer_save"
app:layout_constraintLeft_toLeftOf="@+id/equalizer_save"
app:layout_constraintRight_toRightOf="@+id/equalizer_save" />
<SeekBar
android:id="@+id/equalizer_preamp"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:maxHeight="4dip"
android:minHeight="4dip"
android:progressDrawable="@drawable/po_seekbar"
android:splitTrack="false"
android:thumb="@drawable/seekbar_thumb"
app:layout_constraintBottom_toTopOf="@+id/equalizer_scroll"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@+id/equalizer_button" />
<SeekBar
android:id="@+id/equalizer_preamp"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:maxHeight="4dip"
android:minHeight="4dip"
android:progressDrawable="@drawable/po_seekbar"
android:thumb="@drawable/seekbar_thumb"
android:splitTrack="false"
app:layout_constraintTop_toBottomOf="@+id/equalizer_button"
app:layout_constraintBottom_toTopOf="@+id/equalizer_scroll"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent" />
<HorizontalScrollView
android:id="@+id/equalizer_scroll"
android:layout_width="wrap_content"
android:layout_height="0dp"
app:layout_constraintHorizontal_bias="0.5"
android:fillViewport="true"
android:fadeScrollbars="false"
app:layout_constraintTop_toBottomOf="@+id/equalizer_preamp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent">
<HorizontalScrollView
android:id="@+id/equalizer_scroll"
<LinearLayout
android:id="@+id/equalizer_bands"
android:layout_width="wrap_content"
android:layout_height="0dp"
app:layout_constraintHorizontal_bias="0.5"
android:fillViewport="true"
android:fadeScrollbars="false"
app:layout_constraintTop_toBottomOf="@+id/equalizer_preamp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent">
<LinearLayout
android:id="@+id/equalizer_bands"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="horizontal"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"/>
</HorizontalScrollView>
</android.support.constraint.ConstraintLayout>
android:layout_height="match_parent"
android:orientation="horizontal"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"/>
</HorizontalScrollView>
</LinearLayout>
</android.support.constraint.ConstraintLayout>
</layout>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment