title: Aligning icons to the top of a Seekbar
body: <p>I have a <code>Seekbar</code> with a <code>LinearLayout</code> of icons above it. I'm using <code>LinearLayout</code> <code>weightsum</code> and <code>weight</code> to align each one, however they are still not quite aligned.</p>
  <p><a href="https://i.stack.imgur.com/ySbEU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ySbEU.png" alt="enter image description here" /></a></p>
  <p>Is there a way to align them?</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
  &lt;androidx.constraintlayout.widget.ConstraintLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
      xmlns:app=&quot;http://schemas.android.com/apk/res-auto&quot;
      android:layout_width=&quot;match_parent&quot;
      android:layout_height=&quot;wrap_content&quot;
      android:background=&quot;@color/colorWhite&quot;
      android:orientation=&quot;vertical&quot;&gt;
  
  
      &lt;LinearLayout
          android:id=&quot;@+id/test_layout&quot;
          android:layout_width=&quot;0dp&quot;
          android:layout_height=&quot;wrap_content&quot;
          android:orientation=&quot;horizontal&quot;
          android:weightSum=&quot;5&quot;
          app:layout_constraintEnd_toEndOf=&quot;@+id/seekbar&quot;
          app:layout_constraintStart_toStartOf=&quot;@+id/seekbar&quot;
          app:layout_constraintTop_toTopOf=&quot;parent&quot;&gt;
  
          &lt;ImageView
              android:layout_width=&quot;wrap_content&quot;
              android:layout_height=&quot;wrap_content&quot;
              android:layout_weight=&quot;1&quot;
              app:srcCompat=&quot;@drawable/ic_black_trashcan_24dp&quot; /&gt;
  
          &lt;ImageView
              android:layout_width=&quot;wrap_content&quot;
              android:layout_height=&quot;wrap_content&quot;
              android:layout_weight=&quot;1&quot;
              app:srcCompat=&quot;@drawable/ic_black_trashcan_24dp&quot; /&gt;
  
          &lt;ImageView
              android:layout_width=&quot;wrap_content&quot;
              android:layout_height=&quot;wrap_content&quot;
              android:layout_weight=&quot;1&quot;
              app:srcCompat=&quot;@drawable/ic_black_trashcan_24dp&quot; /&gt;
  
          &lt;ImageView
              android:layout_width=&quot;wrap_content&quot;
              android:layout_height=&quot;wrap_content&quot;
              android:layout_weight=&quot;1&quot;
              app:srcCompat=&quot;@drawable/ic_black_trashcan_24dp&quot; /&gt;
  
          &lt;ImageView
              android:layout_width=&quot;wrap_content&quot;
              android:layout_height=&quot;wrap_content&quot;
              android:layout_weight=&quot;1&quot;
              app:srcCompat=&quot;@drawable/ic_black_trashcan_24dp&quot; /&gt;
      &lt;/LinearLayout&gt;
  
      &lt;SeekBar
          android:id=&quot;@+id/seekbar&quot;
          android:layout_width=&quot;0dp&quot;
          android:layout_height=&quot;wrap_content&quot;
          android:max=&quot;4&quot;
          android:theme=&quot;@style/Widget.AppCompat.SeekBar.Discrete&quot;
          android:thumb=&quot;@drawable/ic_black_navigation_24dp&quot;
          app:layout_constraintEnd_toEndOf=&quot;parent&quot;
          app:layout_constraintStart_toStartOf=&quot;parent&quot;
          app:layout_constraintTop_toBottomOf=&quot;@+id/test_layout&quot;
          app:layout_constraintWidth_percent=&quot;0.8&quot; /&gt;
  
  
  &lt;/androidx.constraintlayout.widget.ConstraintLayout&gt;
  </code></pre>
  <p><strong>Edit:</strong></p>
  <p>I am aware that you can use</p>
  <pre><code>android:paddingStart=&quot;-16dp&quot;
  android:paddingEnd=&quot;-16dp&quot;
  </code></pre>
  <p>to align them but I rather not prefer to use a set padding, because this causes readjusting the padding when you add another item.</p>
  <p>e.g changing icons to 6, need to change weightsum to 6, and also need to set padding to <code>-14dp</code>.</p>