I want to recreate pulse like UI for one of my android app. I want to know How can I put transparent text over an image like pulse also how can I create 2nd screen like pulse where we read the stories. In this screen How this bottom selecting elements comes and hide automatically and when clicked is it the complete activity being changed or only the text changes?.
Find below the two UI which I am mentioning about
How this bottom navigation is hiding?
开发者_JAVA技巧Thanks pranay
User RelativeLayout
.
Here is an example which places a TextView on Top of an ImageView and centers the text on the image.
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<ImageView
android:layout_width="wrap_content"
android:id="@+id/MyImage"
android:adjustViewBounds="true"
android:layout_height="wrap_content"/>
<TextView
android:id="@+id/TextOnImage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_centerHorizontal="true"/>
</RelativeLayout>
A relativeLayout will solve your problem, because it allows you to define the position of every child element independantly from each other. Just use margin and paddings to adjust the exact layout you want.
You should use Relative layout
精彩评论