Search code examples
androidxmllayout

How can i implement Hint View without using showcase library or any other third party library


Well I want to implement this

i do not want to use any showcase library and want implementation as shown in below images

enter image description here

enter image description here


Solution

  • You can use a FrameLayout and add two child :

    <TextView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:text="New Text"
        android:id="@+id/textView10"
        android:layout_gravity="left|top"
        android:layout_marginTop="10dp"
        android:background="@android:color/holo_orange_light"/>
    
    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="New Text"
        android:id="@+id/textView13"
        android:layout_gravity="center_horizontal|top"
        android:background="@android:color/holo_blue_light"
        android:paddingTop="5dp"
        android:paddingBottom="5dp"
        android:paddingLeft="10dp"
        android:paddingRight="10dp"/>
    

    The result is here : enter image description here

    Of course, it is up-to-you to design the look of your views as you desire.