I want to design like
layout. for example: when user touch like button then show a layout above it to show stickers.
please see this picture too understand my mean:
Can you guide me?
you have to keep a hidden linear layout above your layout for like button, and make it visible when like is clicked.
this hidden layout will contain your stickers:
example :
layout will look something like this:
<LinearLayout
android:id="@+id/buttonContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:visibility="gone"
android:orientation="horizontal" >
<ImageView
android:id="@+id/option1"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:layout_weight="1"
android:scaleType="fitCenter"
android:src="@drawable/image1" />
<ImageView
android:id="@+id/option2"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:layout_weight="1"
android:scaleType="fitCenter"
android:src="@drawable/image2" />
<ImageView
android:id="@+id/option3"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:layout_weight="1"
android:scaleType="fitCenter"
android:src="@drawable/image3" />
</LinearLayout>
place it on top of layout for like button, customize it as per your need
and on click of your like button you have to make it visible like this;
findViewById(R.id.buttonContainer).setVisibility(View.VISIBLE);
and once an image is selected hide the view again like this:
findViewById(R.id.buttonContainer).setVisibility(View.GONE);
hope this will help.
Rahul Tiwari has Nice Solution, Also you can have Relative Layout
inside Relative Layout You have Horizontal Linear Layout
And Finally set animation to Hide And Show Horizontal Linear Layout
Horizontal Linear Layout should be Forground of view
read it to learn basic of animation
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With