Skip to content
Permalink
Browse files

Fix #109: Added resource ID for main FAB

  • Loading branch information...
leinardi committed Apr 6, 2019
1 parent 026a339 commit a23a16a513527716d951e1c6901fce0e05df9354
@@ -2,6 +2,7 @@

## next release
- fixed #100: Use unique view IDs
- fixed #109: Added resource ID for main FAB

## [2.0.1] - 2018-09-28
- fixed #95: support 28 workaround does not work on minified release apk
@@ -723,6 +723,7 @@ private FloatingActionButton createMainFab() {
int marginHorizontal = UiUtils.dpToPx(getContext(), MAIN_FAB_HORIZONTAL_MARGIN_IN_DP);
int marginVertical = UiUtils.dpToPx(getContext(), MAIN_FAB_VERTICAL_MARGIN_IN_DP);
layoutParams.setMargins(marginHorizontal, marginVertical, marginHorizontal, marginVertical);
floatingActionButton.setId(R.id.sd_main_fab);
floatingActionButton.setUseCompatPadding(true);
floatingActionButton.setLayoutParams(layoutParams);
floatingActionButton.setClickable(true);
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright 2019 Roberto Leinardi.
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->

<resources>
<item name="sd_main_fab" type="id" />
</resources>

0 comments on commit a23a16a

Please sign in to comment.
You can’t perform that action at this time.