Xamarin Forms: Add Entry Bottom Line

On Android an Entry or EditText as it is called in Android Native, has by default a bottom border line when you tap inside the field. On iOS this line doesn’t exist, so if you want to have the same design on both platforms, you will have to create a custom render for iOS and also for Android (for Android I will show you 2 ways of creating the custom render because it depends on your Entry’s background, if it has one, or not).

<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="@dimen/photo_gallery_size"
    android:layout_height="@dimen/photo_gallery_size"
    android:orientation="vertical"
    android:layout_margin="@dimen/margin_medium">
    <ImageView
        android:id="@+id/imageView"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:scaleType="centerInside"/>
    <ImageView
        android:id="@+id/overlay_image_view"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_gravity="center"
        android:background="@color/black"
        android:scaleType="centerInside"
        android:cropToPadding="true"
        android:alpha="0.4"
        android:visibility="gone" />
    <ImageView
        android:id="@+id/action_image_view"
        android:layout_width="@dimen/action_icon_size"
        android:layout_height="@dimen/action_icon_size"
        android:layout_gravity="center"
        android:src="@drawable/tick_icon"
        android:visibility="gone" />
</FrameLayout>
Scroll to Top