Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Label not visible even after setting by fab_title #212

Closed
irtefa opened this issue Jun 4, 2015 · 10 comments
Closed

Label not visible even after setting by fab_title #212

irtefa opened this issue Jun 4, 2015 · 10 comments

Comments

@irtefa
Copy link

irtefa commented Jun 4, 2015

<com.getbase.floatingactionbutton.FloatingActionsMenu
    android:id="@+id/action_button"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_gravity="bottom|right"
    android:layout_alignParentLeft="true"
    android:layout_alignParentStart="true"
    android:layout_marginLeft="16dp"
    android:layout_marginStart="16dp"
    fab:fab_addButtonColorNormal="@color/brand_blue"
    fab:fab_addButtonColorPressed="@color/white"
    fab:fab_addButtonPlusIconColor="@color/white"
    fab:fab_labelsPosition="left">

    <com.getbase.floatingactionbutton.FloatingActionButton
        android:id="@+id/send_button"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        fab:fab_colorNormal="@color/brand_blue"
        fab:fab_title="Action A"
        fab:fab_colorPressed="@color/white"/>

    <com.getbase.floatingactionbutton.FloatingActionButton
        android:id="@+id/redeem_button"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        fab:fab_colorNormal="@color/brand_blue"
        fab:fab_title="Action with a very long name that won\'t fit on the screen"
        fab:fab_colorPressed="@color/white"/>

</com.getbase.floatingactionbutton.FloatingActionsMenu>
@irtefa irtefa closed this as completed Jun 4, 2015
@terell-brown-zz
Copy link

I am also a bit confused as to how to show labels beside the buttons. Is there a method for this or an xml attribute?

@chalup
Copy link
Contributor

chalup commented Jun 9, 2015

@young-Simba you have to set fab:fab_labelStyle on your FloatingActionsMenu

@terell-brown-zz
Copy link

@chalup thanks alot

@awong1900
Copy link

same question. thanks.

@achavhan
Copy link

label not visible plz help

<com.getbase.floatingactionbutton.FloatingActionsMenu
    android:id="@+id/multiple_actions"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentBottom="true"
    android:layout_alignParentRight="true"
    android:layout_alignParentEnd="true"
    fab:fab_labelStyle="@style/menu_labels_style"
    android:layout_marginBottom="16dp"
    android:layout_marginRight="8dp"
    android:layout_marginEnd="8dp"
    custom:fab_labelsPosition="left"
    >

</com.getbase.floatingactionbutton.FloatingActionsMenu>

<style name="menu_labels_style">
    <item name="android:background">@drawable/fab_label_background</item>
    <item name="android:textColor">@color/white</item>
</style>

    FloatingActionButton zz = new FloatingActionButton(getBaseContext());
    zz.setSize(FloatingActionButton.SIZE_MINI);
    zz.setIcon(R.drawable.smart_shopping_white_min);
    zz.setStrokeVisible(true);
    zz.setTitle("Smart Shopping");
    zz.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {

            menuMultipleActions.collapse();

        }
    });
    menuMultipleActions.addButton(zz);

@achavhan
Copy link

just found ans on another thread

xmlns:fab were
xmlns:fab="http://schemas.android.com/tools" (auto import)
This import fix is fixed the issue, labels are now visible:
xmlns:fab="http://schemas.android.com/apk/res-auto"

@gabriellferreira
Copy link

@achavhan you should win a prize, 2 hours trying make this lib to work
someone should write this down on Wiki

@ghost
Copy link

ghost commented Jan 13, 2017

My labels are not visible with :
xmlns:fab="http://schemas.android.com/apk/res-auto"
fab:fab_labelsPosition="right" and fab:fab_labelStyle setted

Any good idea ?

@ghost
Copy link

ghost commented Jan 14, 2017

My mistake, use fab:fab_title instand of fab:fab_label
And all is ok

@isuPatches
Copy link

@achavhan you're a hero

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants