-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Override
*nestedScrollingEnabled
functions #41
- Loading branch information
Showing
4 changed files
with
84 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
demo/src/main/java/nl/joery/demo/animatedbottombar/bottomsheet/BottomSheetActivity.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package nl.joery.demo.animatedbottombar.bottomsheet | ||
|
||
import android.os.Bundle | ||
import android.view.View | ||
import androidx.appcompat.app.AppCompatActivity | ||
import com.google.android.material.bottomsheet.BottomSheetBehavior | ||
import kotlinx.android.synthetic.main.activity_bottom_sheet.* | ||
import nl.joery.demo.animatedbottombar.R | ||
import nl.joery.demo.animatedbottombar.dpPx | ||
|
||
|
||
class BottomSheetActivity : AppCompatActivity() { | ||
override fun onCreate(savedInstanceState: Bundle?) { | ||
super.onCreate(savedInstanceState) | ||
setContentView(R.layout.activity_bottom_sheet) | ||
|
||
bottom_bar.isNestedScrollingEnabled = false | ||
|
||
val bottomSheet: View = findViewById(R.id.bottom_sheet) | ||
val bottomSheetBehavior = BottomSheetBehavior.from(bottomSheet) | ||
bottomSheetBehavior.peekHeight = 150.dpPx | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:app="http://schemas.android.com/apk/res-auto" | ||
xmlns:tools="http://schemas.android.com/tools" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
tools:context=".bottomsheet.BottomSheetActivity"> | ||
|
||
<LinearLayout | ||
android:id="@+id/viewA" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:layout_weight="1" | ||
android:background="@android:color/holo_purple" | ||
android:orientation="horizontal"/> | ||
|
||
<androidx.core.widget.NestedScrollView | ||
android:id="@+id/bottom_sheet" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:background="@android:color/holo_blue_bright" | ||
app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior"> | ||
|
||
<LinearLayout | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:orientation="vertical"> | ||
|
||
<nl.joery.animatedbottombar.AnimatedBottomBar | ||
android:id="@+id/bottom_bar" | ||
android:layout_width="match_parent" | ||
android:layout_height="64dp" | ||
android:layout_margin="16dp" | ||
android:background="#FFF" | ||
app:abb_tabs="@menu/clock_tabs" | ||
/> | ||
<Space | ||
android:id="@+id/dummy" | ||
android:layout_width="match_parent" | ||
android:layout_height="600dp" /> | ||
</LinearLayout> | ||
</androidx.core.widget.NestedScrollView> | ||
</androidx.coordinatorlayout.widget.CoordinatorLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters