Skip to content

Commit 10c970e

Browse files
authored
Merge pull request #117 from leinardi/feature/#109-main-fab-id
Fix #109: Added resource ID for main FAB
2 parents 026a339 + a23a16a commit 10c970e

File tree

3 files changed

+22
-0
lines changed

3 files changed

+22
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## next release
44
- fixed #100: Use unique view IDs
5+
- fixed #109: Added resource ID for main FAB
56

67
## [2.0.1] - 2018-09-28
78
- fixed #95: support 28 workaround does not work on minified release apk

library/src/main/java/com/leinardi/android/speeddial/SpeedDialView.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -723,6 +723,7 @@ private FloatingActionButton createMainFab() {
723723
int marginHorizontal = UiUtils.dpToPx(getContext(), MAIN_FAB_HORIZONTAL_MARGIN_IN_DP);
724724
int marginVertical = UiUtils.dpToPx(getContext(), MAIN_FAB_VERTICAL_MARGIN_IN_DP);
725725
layoutParams.setMargins(marginHorizontal, marginVertical, marginHorizontal, marginVertical);
726+
floatingActionButton.setId(R.id.sd_main_fab);
726727
floatingActionButton.setUseCompatPadding(true);
727728
floatingActionButton.setLayoutParams(layoutParams);
728729
floatingActionButton.setClickable(true);
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
~ Copyright 2019 Roberto Leinardi.
4+
~
5+
~ Licensed under the Apache License, Version 2.0 (the "License");
6+
~ you may not use this file except in compliance with the License.
7+
~ You may obtain a copy of the License at
8+
~
9+
~ http://www.apache.org/licenses/LICENSE-2.0
10+
~
11+
~ Unless required by applicable law or agreed to in writing, software
12+
~ distributed under the License is distributed on an "AS IS" BASIS,
13+
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
~ See the License for the specific language governing permissions and
15+
~ limitations under the License.
16+
-->
17+
18+
<resources>
19+
<item name="sd_main_fab" type="id" />
20+
</resources>

0 commit comments

Comments
 (0)