SlideBottomPanel
????????????????β??????????????
??????????? ListView ? ScrollView??? ListView ? ScrollView ??????????????
Demo apk ????? SlideBottomPanelDemo ??
???? Android Support Library 23.2 ??? BottomSheet
????? Android Support Library 23.2
????? Teach you how to use Design Support Library: Bottom Sheets
????
- 1.0.6 ?????? displayPanel() ???????????
- 1.0.3 ????????????? PanelTitle ? Panel ????? Bug
How to use ????
###????
Gradle
compile 'com.github.kingideayou:SlideBottomPanel:1.0.6'
Import
???? SlideBottomPanel?? SlideBottomPanel ?????????????????setting.gradle??????????
include ":SlideBottomPanel"
??????????????module??build.gradle?????????:
compile project(':SlideBottomPanel')
????
?????????? XML ???????????????? FrameLayout ???????? ListView ?? ScrollView?
????????????????? Demo.
<!-- sbp_hide_panel_title ???????????????????????????????? FrameLayout? -->
<!-- background_layout ?????????????????????? WebView? -->
<me.next.slidebottompanel.SlideBottomPanel
android:id="@+id/sbv"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:sbp_title_height_no_display="55dp"
app:sbp_panel_height="380dp"
app:sbp_hide_panel_title="true"
app:sbp_background_layout="@layout/background_layout">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="380dp"
android:background="#ffffff"
android:orientation="vertical">
<ListView
android:id="@+id/list_view"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<!-- ???????????????? sbp_title_height_no_display="?????" -->
<TextView
android:layout_width="match_parent"
android:layout_height="55dp"
text="????"
android:orientation="horizontal"
android:gravity="center_vertical"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:background="#ffffff"/>
</FrameLayout> </me.next.slidebottompanel.SlideBottomPanel>
?????????????????β?????? FrameLayout ??? ViewGroup?ViewGroup ?? ListView ? ScrollView
<me.next.slidebottompanel.SlideBottomPanel
android:id="@+id/sbv"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:sbp_hide_panel_title="true"
app:sbp_title_height_no_display="55dp"
app:sbp_panel_height="380dp"
app:sbp_background_layout="@layout/background_layout">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="380dp"
android:background="#ffffff"
android:orientation="vertical">
<LinearLayout
android:weightSum="9"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<ListView
android:id="@+id/list_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="8"/>
<TextView
android:id="@+id/tv_edit"
android:layout_weight="1"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_gravity="center_vertical"
android:gravity="center_vertical"
android:layout_marginLeft="@dimen/activity_horizontal_margin"
android:text="???..."/>
</LinearLayout>
</FrameLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="55dp"
text="????"
android:orientation="horizontal"
android:gravity="center_vertical"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:background="#ffffff"/> </me.next.slidebottompanel.SlideBottomPanel>
????
????????? Activity ????????????
//?? SlideBottomPanel
if (sbv.isPanelShowing()) {
sbv.hide();
}
//?? SlideBottomPanel
sbv.displayPanel()
???
????:
??
????????? MultiCardMenu
License
Copyright 2015 NeXT 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.