I have been reading posts on SO, and none of the solutions solved my problem.
Im using style="@style/Base.Widget.AppCompat.Spinner.Underlined
to add underline to the Spinner
but for somereason the baseline
of spinner is not aligning with EditText
.
here is my XML:
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:weightSum="5">
<!-- Phone Country code Spinner -->
<Spinner
android:id="@+id/spProfileDetailsUser_phoneNumberCode"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
style="@style/Base.Widget.AppCompat.Spinner.Underlined"
android:layout_gravity="bottom">
</Spinner>
<!-- Mobile Number Label -->
<android.support.design.widget.TextInputLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:layout_weight="4">
<EditText android:id="@+id/etProfileDetailsUser_phoneNumber"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:inputType="number"
android:hint="Mobile Number"
/>
</android.support.design.widget.TextInputLayout>
</LinearLayout>
Here is the result:
I have tried any solution I found for similar problems on SO trying to align the spinner
underline with EditTxt
. However, non helped. such as this post.
I am looking for solution or workaround to solve this issue.
Thanks