1
I have a menu, with floating action Buttons and would like to know how it is possible to put them smaller than the normal size, because they are equal, in size, to the menu, even open and the fabsize property does not work. And how to remove the title programmatically when clicking a button of these?
XML:
<com.getbase.floatingactionbutton.FloatingActionsMenu
android:id="@+id/map_btn_compartilhar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/pink_icon"
android:layout_alignEnd="@+id/multiple_actions_down"
android:layout_alignRight="@+id/multiple_actions_down"
android:layout_gravity="bottom|end"
android:layout_margin="@dimen/fab_margin"
android:src="@drawable/ic_share_white_24dp"
app:fab_addButtonStrokeVisible="true"
fab:fab_addButtonColorNormal="@color/fundo_3"
fab:fab_addButtonColorPressed="@color/fundo_1"
fab:fab_labelStyle="@style/menu_labels_style">
<com.getbase.floatingactionbutton.FloatingActionButton
android:id="@+id/fab_ativa_map"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_map_24dp_branco_deactive"
fab:fab_colorNormal="@color/white"
fab:fab_colorPressed="@color/white_pressed"
fab:fab_title="@string/ativarmap_map"/>
<com.getbase.floatingactionbutton.FloatingActionButton
android:id="@+id/fab_filtra_map"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_24dp_branco_deactive"
fab:fab_colorNormal="@color/white"
fab:fab_colorPressed="@color/fundo_2"
fab:fab_title="@string/filtra_map"/>
<com.getbase.floatingactionbutton.FloatingActionButton
android:id="@+id/fab_parar_map"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_24dp_branco_active"
android:visibility="gone"
fab:fab_colorNormal="@color/fundo_1"
fab:fab_colorPressed="@color/fundo_2"
fab:fab_title="@string/pararmap_map" />
</com.getbase.floatingactionbutton.FloatingActionsMenu>
Example of FAB code:
fabAtivamap = (com.getbase.floatingactionbutton.FloatingActionButton) activity.findViewById(R.id.fab_ativa_map);
fabAtivamap.setVisibility(View.VISIBLE);
fabAtivamap.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
......
// Reseta os botões
fabPararmap.setVisibility(View.VISIBLE);
fabAtivamap.setVisibility(View.GONE);
fabFiltramap.setVisibility(View.VISIBLE);
fabAtivamap.setTitle("");//retirar os titulos
......
});
I used it because that’s what I thought at the time. Like I said, it doesn’t work, that’s how you showed me.
– Henrique