imagebutton.setOnClickListener(new View.OnClickListener()
{
@Override public void onClick(View v)
{
if(thide)
{ from.setVisibility(EditText.GONE); subject.setVisibility(EditText.GONE); body.setVisibility(EditText.GONE); attachment.setVisibility(EditText.GONE);
thide=false;
}
else
{ from.setVisibility(EditText.VISIBLE); subject.setVisibility(EditText.VISIBLE); body.setVisibility(EditText.VISIBLE); attachment.setVisibility(EditText.VISIBLE); thide=true;
}
}
});
My XML is
android:id="@+id/subject" android:singleLine="true" android:hint="Subject" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginLeft="40dip" android:layout_marginRight="40dip" android:layout_marginTop="5dip"> android:id="@+id/body" android:singleLine="true" android:hint="Body" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginLeft="40dip" android:layout_marginRight="40dip" android:layout_marginTop="5dip"> android:id="@+id/attachment" android:singleLine="true" android:hint="Attachment" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginLeft="40dip" android:layout_marginRight="40dip" android:layout_marginTop="5dip">
I have Written a code to show the tesxt fields n hide the text fields. At d start all the fields will be hidden when i will click on buton text fields ll be shown and vice versa,
Now i want UI to be changed, I want a button like spinner one which is having down arrow at the end of the button.
when i click on the down arrow i want all the fields to be shown. and again when i click on same arrow all the fields to be hidden