Skip to content

Commit

Permalink
Merge pull request #137 from leinardi/feature/#11-fab-size
Browse files Browse the repository at this point in the history
Feature/#11 fab size
  • Loading branch information
leinardi authored Oct 7, 2019
2 parents 663b18e + 06212cd commit 8187528
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 61 deletions.
71 changes: 15 additions & 56 deletions .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# Change Log
## [3.2.0] - 2019-09-10
- Fix #11: Re-enabling FAB size

## [3.1.0] - 2019-09-10
- fixed #113: Main FAB opened image is not centered when using Theme.MaterialComponents
- fixed #101: Add ability to Disable Main Fab"
- fixed #101: Add ability to Disable Main Fab
- API changes:
- fixed #111: added option to tint Main FAB icon (`setMainFabClosedIconColor()` and `setMainFabOpenedIconColor()`)
- migrated Sample project to Kotlin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,8 @@ public FabWithLabelView createFabWithLabelView(Context context) {
return fabWithLabelView;
}

// Disabled due to https://issuetracker.google.com/issues/77303906
@FloatingActionButton.Size
/* public */ int getFabSize() {
public int getFabSize() {
return mFabSize;
}

Expand Down Expand Up @@ -271,8 +270,7 @@ public SpeedDialActionItem create() {
return new SpeedDialActionItem(this);
}

// Disabled due to https://issuetracker.google.com/issues/77303906
/* public */ Builder setFabSize(@FloatingActionButton.Size int fabSize) {
public Builder setFabSize(@FloatingActionButton.Size int fabSize) {
mFabSize = fabSize;
return this;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import android.view.Menu
import android.view.MenuItem
import androidx.appcompat.content.res.AppCompatResources
import androidx.core.content.res.ResourcesCompat
import com.google.android.material.floatingactionbutton.FloatingActionButton
import com.leinardi.android.speeddial.SpeedDialActionItem
import com.leinardi.android.speeddial.SpeedDialView
import com.leinardi.android.speeddial.sample.usecases.BaseUseCaseActivity
Expand Down Expand Up @@ -64,6 +65,7 @@ class MainActivity : BaseUseCaseActivity() {

speedDialView.addActionItem(SpeedDialActionItem.Builder(R.id.fab_long_label, R.drawable
.ic_lorem_ipsum)
.setFabSize(FloatingActionButton.SIZE_NORMAL)
.setLabel("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor " +
"incididunt ut labore et dolore magna aliqua.")
.create())
Expand Down

0 comments on commit 8187528

Please sign in to comment.