Hi I am able to run bottom sheet on android 5.0 but not on kitkat.
Edited The strange thing is that when i presee recent app and open the app again it starts working? no clue O.o Here is my build.gradle
android {
compileSdkVersion 23
buildToolsVersion '23.0.2'
defaultConfig {
minSdkVersion 17
targetSdkVersion 23
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
..}
View mBottomSheet = view.findViewById(R.id.location_bottom_sheet);
BottomSheetBehavior mBehavior = BottomSheetBehavior.from(mBottomSheet);
mBehavior.setBottomSheetCallback(new BottomSheetBehavior.BottomSheetCallback() {
@Override
public void onStateChanged(@NonNull View bottomSheet, int newState) {
}
@Override
public void onSlide(@NonNull View bottomSheet, float slideOffset) {
}
});
on Click i am doing this
final Handler handler = new Handler();
handler.postDelayed(new Runnable() {
@Override
public void run() {
mBehavior.setState(BottomSheetBehavior.STATE_EXPANDED);
mBottomSheet.setVisibility(View.VISIBLE);
handler.removeCallbacks(this);
}
}, 500);
still it is not working anyboyd have any idea why is this happening.