-3

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

ucMedia
  • 4,105
  • 4
  • 38
  • 46
Quick learner
  • 10,632
  • 4
  • 45
  • 55

2 Answers2

1

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.

Zelig63
  • 1,592
  • 1
  • 23
  • 40
0

You could use a relative layout as a base, then 2 textView. One with alignParentTop and center horizontally, the second one you put the same width as the relative and add some margin on top to create the effect you want.

For the backgorund and borders you culd use something like this Set border and background color of textView

And for the round borders Rounded corner for textview in android

Community
  • 1
  • 1
acabezas
  • 731
  • 1
  • 7
  • 20