taltstidl / AndroidSlidingUpPanel

This library provides a simple way to add a draggable sliding up panel (popularized by Google Music and Google Maps) to your Android application. Brought to you by Umano.
http://umano.me
Apache License 2.0
13 stars 6 forks source link

Setting Icon for FloatingActionMenu doesn't work #10

Closed Arash-gm closed 9 years ago

Arash-gm commented 9 years ago

i'm replacing your FloatingActionButton with FloatingActionMenu from Clans FAB (https://github.com/Clans/FloatingActionButton) , but setting Icon doesn't work , i've replace your library with umano library and Clan's FAB setting icon worked. can you check again that your code is compatible with Floating Action Menu?

taltstidl commented 9 years ago

@Arash-gm Do you set the icons in xml or via code?

Arash-gm commented 9 years ago

@Tr4Android : i've Checked setting both :

    <com.github.clans.fab.FloatingActionMenu
        android:id="@+id/serviceTypeMenu"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="right|bottom"
        android:layout_marginRight="@dimen/marginright_fab"
        android:layout_marginBottom="@dimen/marginbottom_fab"
        fab:menu_fab_size="normal"
        fab:menu_showShadow="true"
        fab:menu_shadowColor="#66000000"
        fab:menu_shadowRadius="@dimen/radius_fab_shadow"
        fab:menu_shadowXOffset="@dimen/offset_fab_x"
        fab:menu_shadowYOffset="@dimen/offset_fab_y"
        fab:menu_icon="@drawable/vehicle_taxi"
        fab:menu_colorNormal="@color/color_accent"
        fab:menu_colorRipple="#99FFFFFF"
        fab:menu_animationDelayPerItem="50"
        fab:menu_buttonSpacing="0dp"
        fab:menu_labels_margin="0dp"
        fab:menu_labels_showAnimation="@anim/fab_slide_in_from_right"
        fab:menu_labels_hideAnimation="@anim/fab_slide_out_to_right"
        fab:menu_labels_padding="@dimen/padding_view"
        fab:menu_labels_textColor="@color/color_primary_text"
        fab:menu_labels_textSize="@dimen/textsize_fab_labels"
        fab:menu_labels_cornerRadius="@dimen/radius_fab_corner"
        fab:menu_labels_colorNormal="@color/color_primary_text"
        fab:menu_labels_colorPressed="@color/color_light_primary"
        fab:menu_labels_colorRipple="#66FFFFFF"
        fab:menu_labels_singleLine="false"
        fab:menu_labels_ellipsize="none"
        fab:menu_labels_maxLines="-1">
    </com.github.clans.fab.FloatingActionMenu>

and :

serviceTypeMenu.getMenuIconView().setImageResource(R.drawable.vehicle_taxi);
taltstidl commented 9 years ago

@Arash-gm Strange, I'm not aware of changing anything that would alter drawing behavior. Are you using this as a second child for the FloatingActionButtonLayout or inside the main view of the SlidingUpPanelLayout?

Arash-gm commented 9 years ago

yes its strange .i'm using it as a second child of FloatingActionButtonLayout , first child is SlidingUpPanelLayout and second is FloatingActionMenu .

taltstidl commented 9 years ago

@Arash-gm After some more research, this also seems to be related to the library itself, because it seems to add another ImageView for the icon, which somehow isn't layouted correctly when used in conjunction with the FloatingActionButtonLayout (You'll see that when you enable layout boundaries in the developer options). I'll see what I can do, but maybe it's better to use other libraries for the FAB.

Arash-gm commented 9 years ago

@Tr4Android : it would be great that if you could find a way , because i've checked some other libraries before and every one of them have some other problems.

Arash-gm commented 9 years ago

@TR4Android : yes after checking layout bounderies the image drawable shown in the Floating action menu.

taltstidl commented 9 years ago

@Arash-gm I think I've found the cause for this issue. Update coming soon!

taltstidl commented 9 years ago

Commit 8b0fc496c68e9cb3676bfb7b17318525018ccc06 should fix this. Please download the updated master branch and tell me whether the problem is fixed. Thanks!

Arash-gm commented 9 years ago

@TR4Android : it has been fixed , appreciate your time & workkkk ;)

taltstidl commented 9 years ago

Sure. No problem :)