ui: tweak FABs to use the correct type
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
parent
e8ad75d924
commit
ba0f3ece04
@ -12,7 +12,7 @@ import androidx.core.view.marginRight
|
|||||||
import androidx.core.view.marginTop
|
import androidx.core.view.marginTop
|
||||||
import androidx.core.view.updateLayoutParams
|
import androidx.core.view.updateLayoutParams
|
||||||
import androidx.core.view.updatePadding
|
import androidx.core.view.updatePadding
|
||||||
import com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
|
import com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A utility for edge-to-edge display. It provides several features needed to make the app
|
* A utility for edge-to-edge display. It provides several features needed to make the app
|
||||||
@ -27,7 +27,7 @@ object EdgeToEdge {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
fun setUpScrollingContent(scrollingContent: ViewGroup, fab: ExtendedFloatingActionButton?) {
|
fun setUpScrollingContent(scrollingContent: ViewGroup, fab: FloatingActionButton?) {
|
||||||
val originalPaddingLeft = scrollingContent.paddingLeft
|
val originalPaddingLeft = scrollingContent.paddingLeft
|
||||||
val originalPaddingRight = scrollingContent.paddingRight
|
val originalPaddingRight = scrollingContent.paddingRight
|
||||||
val originalPaddingBottom = scrollingContent.paddingBottom
|
val originalPaddingBottom = scrollingContent.paddingBottom
|
||||||
@ -50,7 +50,7 @@ object EdgeToEdge {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
fun setUpFAB(fab: ExtendedFloatingActionButton) {
|
fun setUpFAB(fab: FloatingActionButton) {
|
||||||
val originalMarginLeft = fab.marginLeft
|
val originalMarginLeft = fab.marginLeft
|
||||||
val originalMarginRight = fab.marginRight
|
val originalMarginRight = fab.marginRight
|
||||||
val originalMarginBottom = fab.marginBottom
|
val originalMarginBottom = fab.marginBottom
|
||||||
|
@ -16,13 +16,12 @@
|
|||||||
tools:itemCount="20"
|
tools:itemCount="20"
|
||||||
tools:listitem="@layout/log_viewer_entry" />
|
tools:listitem="@layout/log_viewer_entry" />
|
||||||
|
|
||||||
<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
|
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||||
android:id="@+id/share_fab"
|
android:id="@+id/share_fab"
|
||||||
style="@style/Widget.MaterialComponents.ExtendedFloatingActionButton.Icon"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="bottom|end"
|
android:layout_gravity="bottom|end"
|
||||||
android:layout_margin="@dimen/fab_margin"
|
android:layout_margin="@dimen/fab_margin"
|
||||||
app:icon="@drawable/ic_action_share_white" />
|
app:srcCompat="@drawable/ic_action_share_white" />
|
||||||
|
|
||||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||||
|
@ -66,14 +66,13 @@
|
|||||||
android:textSize="20sp" />
|
android:textSize="20sp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
|
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||||
android:id="@+id/create_fab"
|
android:id="@+id/create_fab"
|
||||||
style="@style/Widget.MaterialComponents.ExtendedFloatingActionButton.Icon"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="bottom|end"
|
android:layout_gravity="bottom|end"
|
||||||
android:layout_margin="@dimen/fab_margin"
|
android:layout_margin="@dimen/fab_margin"
|
||||||
app:icon="@drawable/ic_action_add_white" />
|
app:srcCompat="@drawable/ic_action_add_white" />
|
||||||
|
|
||||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||||
</layout>
|
</layout>
|
||||||
|
Loading…
Reference in New Issue
Block a user