ActionSheet
1.0.0
ActionSheet는 iOS 액션 시트 구성 요소의 Android 클론으로 iOS7 스타일에 전적으로 일반적입니다.

allprojects {
repositories {
.. .
maven { url " https://jitpack.io " }
}
}
dependencies {
implementation ' com.github.ShabanKamell:ActionSheet:x.y.z '
}(X, Y 및 Z를 최신 버전 번호로 교체하십시오 :)
val option1 = ActionItem (title = " Option 1 " ) {
// action selected
}
// You can set a tag
option1.tag = 0
val option2 = ActionItem (title = " Option 2 " , style = Style . DESTRUCTIVE ) {
// action selected
}
val option3 = ActionItem (title = " Option 3 " , isEnabled = false ) {
// action selected
}
// Using using DSL
ActionSheet .create {
title = " TITLE "
message = " MESSAGE "
actions = listOf (option1, option2, option3)
isCancelable = true // true by default
isCancelableOnActionClick = true // true by default
show(supportFragmentManager)
}
// Or using Kotlin Builder
ActionSheet . Builder ()
.actions( listOf (option1, option2, option3))
.title( " TITLE " )
.message( " MESSAGE " )
.show(supportFragmentManager) ActionItem option1 = new ActionItem (
"Option 1" ,
() -> {
// Do something
return Unit . INSTANCE ;
});
List < ActionItem > actions = new ArrayList <>();
actions . add ( option1 );
new ActionSheet . Builder ()
. title ( "TITLE" )
. message ( "MESSAGE" )
. actions ( actions )
. isCancelable ( true )
. show ( manager );모든 기부금은 항상 환영합니다. 풀 요청 PR을 제출하십시오.
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.