Skip to content
This repository has been archived by the owner on Jun 10, 2023. It is now read-only.
Mohammad Mahdi Nouri edited this page May 19, 2017 · 3 revisions

Welcome to the Fun wiki!

How to work with ?

first of all create a XML layout with root element of Funny tag :

<com.phelat.fun.Layouts.Funny 
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:id="@+id/mFunny">

</com.phelat.fun.Layouts.Funny>

inside of this tag add a FunnyButton tag :

<com.phelat.fun.Widget.FunnyButton
        android:layout_width="wrap_content"
        android:layout_height="wrap_content">

        <{VIEW_GROUP}>

             <{VIEW}
                  android:visibility="gone"/>

             <{VIEW}
                  android:visibility="gone"/>

        </{VIEW_GROUP}>

</com.phelat.fun.Widget.FunnyButton>

replace {VIEW_GROUP} with RelativeLayout || LinearLayout || ... and give it an id, something like funContainer.

inside {VIEW_GROUP} add those views you want to show to the user when FunnyButton is expanded and give all of them visibility attribute with "gone" value.

so we done with layout lets dive into our activity.

next we need to find our Funny viewGroup, our FunnyButton and funContainer {VIEW_GROUP}.

after doing all this we need something to control expanding and collapsing animation and that is FunControl

check out sample project

Clone this wiki locally