android.support.design.widget.BottomSheetBehavior#setHideable ( )源码实例Demo

下面列出了android.support.design.widget.BottomSheetBehavior#setHideable ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: SuntimesWidget   文件: AlarmDialog.java
private void expandSheet(DialogInterface dialog)
{
    if (dialog == null) {
        return;
    }

    BottomSheetDialog bottomSheet = (BottomSheetDialog) dialog;
    FrameLayout layout = (FrameLayout) bottomSheet.findViewById(android.support.design.R.id.design_bottom_sheet);  // for AndroidX, resource is renamed to com.google.android.material.R.id.design_bottom_sheet
    if (layout != null)
    {
        BottomSheetBehavior behavior = BottomSheetBehavior.from(layout);
        behavior.setHideable(true);
        behavior.setSkipCollapsed(true);
        behavior.setState(BottomSheetBehavior.STATE_EXPANDED);
    }
}
 
源代码2 项目: SuntimesWidget   文件: WorldMapDialog.java
private void expandSheet(Dialog dialog)
{
    if (dialog == null) {
        return;
    }

    BottomSheetDialog bottomSheet = (BottomSheetDialog) dialog;
    FrameLayout layout = (FrameLayout) bottomSheet.findViewById(android.support.design.R.id.design_bottom_sheet);
    if (layout != null)
    {
        BottomSheetBehavior behavior = BottomSheetBehavior.from(layout);
        behavior.setHideable(false);
        behavior.setSkipCollapsed(true);
        behavior.setPeekHeight((int)(dialogHeader.getHeight() + getResources().getDimension(R.dimen.dialog_margin) * 2));
        behavior.setState(BottomSheetBehavior.STATE_EXPANDED);
    }
}
 
源代码3 项目: SuntimesWidget   文件: WorldMapDialog.java
private void collapseSheet(Dialog dialog)
{
    if (dialog == null) {
        return;
    }

    BottomSheetDialog bottomSheet = (BottomSheetDialog) dialog;
    FrameLayout layout = (FrameLayout) bottomSheet.findViewById(android.support.design.R.id.design_bottom_sheet);
    if (layout != null)
    {
        BottomSheetBehavior behavior = BottomSheetBehavior.from(layout);
        behavior.setHideable(false);
        behavior.setSkipCollapsed(false);
        behavior.setPeekHeight((int)(dialogHeader.getHeight() + getResources().getDimension(R.dimen.dialog_margin) * 2));
        behavior.setState(BottomSheetBehavior.STATE_COLLAPSED);
    }
}
 
源代码4 项目: SuntimesWidget   文件: AboutDialog.java
private void expandSheet(DialogInterface dialog)
{
    if (dialog == null) {
        return;
    }

    BottomSheetDialog bottomSheet = (BottomSheetDialog) dialog;
    FrameLayout layout = (FrameLayout) bottomSheet.findViewById(android.support.design.R.id.design_bottom_sheet);  // for AndroidX, resource is renamed to com.google.android.material.R.id.design_bottom_sheet
    if (layout != null)
    {
        BottomSheetBehavior behavior = BottomSheetBehavior.from(layout);
        behavior.setHideable(false);
        behavior.setSkipCollapsed(true);
        behavior.setState(BottomSheetBehavior.STATE_EXPANDED);
    }
}
 
源代码5 项目: SuntimesWidget   文件: MoonDialog.java
private void expandSheet(DialogInterface dialog)
{
    if (dialog == null) {
        return;
    }

    BottomSheetDialog bottomSheet = (BottomSheetDialog) dialog;
    FrameLayout layout = (FrameLayout) bottomSheet.findViewById(android.support.design.R.id.design_bottom_sheet);  // for AndroidX, resource is renamed to com.google.android.material.R.id.design_bottom_sheet
    if (layout != null)
    {
        BottomSheetBehavior behavior = BottomSheetBehavior.from(layout);
        behavior.setHideable(false);
        behavior.setSkipCollapsed(true);
        behavior.setState(BottomSheetBehavior.STATE_EXPANDED);
    }
}
 
源代码6 项目: SuntimesWidget   文件: TimeZoneDialog.java
private void expandSheet(DialogInterface dialog)
{
    if (dialog == null) {
        return;
    }

    BottomSheetDialog bottomSheet = (BottomSheetDialog) dialog;
    FrameLayout layout = (FrameLayout) bottomSheet.findViewById(android.support.design.R.id.design_bottom_sheet);  // for AndroidX, resource is renamed to com.google.android.material.R.id.design_bottom_sheet
    if (layout != null)
    {
        BottomSheetBehavior behavior = BottomSheetBehavior.from(layout);
        behavior.setHideable(true);
        behavior.setSkipCollapsed(true);
        behavior.setState(BottomSheetBehavior.STATE_EXPANDED);
    }
}
 
源代码7 项目: SuntimesWidget   文件: LocationConfigDialog.java
private void expandSheet(DialogInterface dialog)
{
    if (dialog == null) {
        return;
    }

    BottomSheetDialog bottomSheet = (BottomSheetDialog) dialog;
    FrameLayout layout = (FrameLayout) bottomSheet.findViewById(android.support.design.R.id.design_bottom_sheet);  // for AndroidX, resource is renamed to com.google.android.material.R.id.design_bottom_sheet
    if (layout != null)
    {
        BottomSheetBehavior behavior = BottomSheetBehavior.from(layout);
        behavior.setHideable(false);
        behavior.setSkipCollapsed(true);
        behavior.setState(BottomSheetBehavior.STATE_EXPANDED);
    }
}
 
源代码8 项目: SuntimesWidget   文件: TimeDateDialog.java
private void expandSheet(DialogInterface dialog)
{
    if (dialog == null) {
        return;
    }

    BottomSheetDialog bottomSheet = (BottomSheetDialog) dialog;
    FrameLayout layout = (FrameLayout) bottomSheet.findViewById(android.support.design.R.id.design_bottom_sheet);  // for AndroidX, resource is renamed to com.google.android.material.R.id.design_bottom_sheet
    if (layout != null)
    {
        BottomSheetBehavior behavior = BottomSheetBehavior.from(layout);
        behavior.setHideable(false);
        behavior.setSkipCollapsed(true);
        behavior.setState(BottomSheetBehavior.STATE_EXPANDED);
    }
}
 
源代码9 项目: SuntimesWidget   文件: HelpDialog.java
private void expandSheet(DialogInterface dialog)
{
    if (dialog != null) {
        BottomSheetDialog bottomSheet = (BottomSheetDialog) dialog;
        FrameLayout layout = (FrameLayout) bottomSheet.findViewById(android.support.design.R.id.design_bottom_sheet);  // for AndroidX, resource is renamed to com.google.android.material.R.id.design_bottom_sheet
        if (layout != null) {
            BottomSheetBehavior behavior = BottomSheetBehavior.from(layout);
            behavior.setHideable(false);
            behavior.setSkipCollapsed(false);
            behavior.setPeekHeight(200);
            behavior.setState(BottomSheetBehavior.STATE_EXPANDED);
        }
    }
}
 
源代码10 项目: SuntimesWidget   文件: EquinoxDialog.java
private void expandSheet(DialogInterface dialog)
{
    if (dialog != null)
    {
        BottomSheetDialog bottomSheet = (BottomSheetDialog) dialog;
        FrameLayout layout = (FrameLayout) bottomSheet.findViewById(android.support.design.R.id.design_bottom_sheet);  // for AndroidX, resource is renamed to com.google.android.material.R.id.design_bottom_sheet
        if (layout != null)
        {
            BottomSheetBehavior behavior = BottomSheetBehavior.from(layout);
            behavior.setHideable(true);
            behavior.setSkipCollapsed(true);
            behavior.setState(BottomSheetBehavior.STATE_EXPANDED);
        }
    }
}
 
源代码11 项目: SuntimesWidget   文件: LightMapDialog.java
private void expandSheet(DialogInterface dialog)
{
    if (dialog != null) {
        BottomSheetDialog bottomSheet = (BottomSheetDialog) dialog;
        FrameLayout layout = (FrameLayout) bottomSheet.findViewById(android.support.design.R.id.design_bottom_sheet);  // for AndroidX, resource is renamed to com.google.android.material.R.id.design_bottom_sheet
        if (layout != null) {
            BottomSheetBehavior behavior = BottomSheetBehavior.from(layout);
            behavior.setHideable(false);
            behavior.setSkipCollapsed(true);
            behavior.setState(BottomSheetBehavior.STATE_EXPANDED);
        }
    }
}