Adjust Icon in FloatingActionButton to occupy entire width and height?
See original GitHub issueI am using the FloatingActionsMenu and under which there are two FloatingActionButton(s).
I am using a drawable icon for one of the FloatingActionButton.
Markup below.
<com.getbase.floatingactionbutton.FloatingActionsMenu
android:id="@+id/multiple_actions"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|right"
android:layout_margin="16dp"
fab:fab_addButtonColorNormal="@color/white"
fab:fab_addButtonColorPressed="@color/white_pressed"
fab:fab_addButtonPlusIconColor="@color/half_black"
fab:fab_labelStyle="@style/FABLabelStyle">
<com.getbase.floatingactionbutton.FloatingActionButton
android:id="@+id/action_dry_cleaning"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
fab:fab_icon="@drawable/ic_dry_cleaning"
fab:fab_colorNormal="@color/white"
fab:fab_title="Dry Cleaning"
fab:fab_size="mini"
fab:fab_colorPressed="@color/white_pressed"/>
<com.getbase.floatingactionbutton.FloatingActionButton
android:id="@+id/action_wash_and_iron"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
fab:fab_icon="@drawable/ic_add"
fab:fab_colorNormal="@color/white"
fab:fab_title="Wash and Iron"
fab:fab_size="mini"
fab:fab_colorPressed="@color/white_pressed"/>
</com.getbase.floatingactionbutton.FloatingActionsMenu>
UI below.
I want the image in the first FloatingActionButton to fitXY. How do i do this?
I have tried setting scaleType=“fitXY”. It doesn’t work. Please Help.
Thank you.
Issue Analytics
- State:
- Created 8 years ago
- Comments:6
Top Results From Across the Web
How to change the size of FloatingActionButton?
Set width and height using MediaQuery which will be same across the devices. Output: enter image description here. Share.
Read more >Adjust Icon in FloatingActionButton to occupy entire width and ...
I am using the FloatingActionsMenu and under which there are two FloatingActionButton(s). I am using a drawable icon for one of the ...
Read more >Buttons: floating action button - Material Design
The FloatingActionButton can be sized either by using the discrete sizing modes or a custom size. There are three app:fabSize modes: normal -...
Read more >ListTile class - material library - Flutter - Dart API docs
A list tile contains one to three lines of text optionally flanked by icons or other widgets, such as check boxes. The icons...
Read more >Ion-Grid: Display Grids to Build Mobile-First Custom App Layout
Grids take up the full width of their container, but adding the fixed property will set the width based on the screen size,...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Make this entry in dimens
<dimen name="design_fab_image_size" tools:override="true">36dp</dimen>
Ex
<resources xmlns:tools="http://schemas.android.com/tools"> <dimen name="fab_margin">16dp</dimen> <!--Floating action button--> <dimen name="design_fab_image_size" tools:override="true">42dp</dimen> </resources>
You can adjust its size according to your need.
@sytolk I want to reduce the spacing between FloatingActionsButton, How should i do this???