CircularDialogs
1.2
Circulardialogs는 사용자 정의 Android 대화 라이브러리로 성공, 경고 및 오류와 같은 일반적인 작업에 대한 사용자 피드백을 제공합니다. Gradle 파일에 종속성을 추가하여 IT를 쉽게 사용할 수 있습니다. 몇 줄의 코드만으로 아름다운 대화를 만들 수 있습니다. 사전 정의 된 항목 및 종료 애니메이션 중에서 선택할 수 있습니다. 아래에서 설명한대로 많은 옵션을 사용할 수 있습니다.
루트 빌드에 추가하십시오. 저장소 끝에서 Gradle :
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
종속성을 추가하십시오
dependencies {
compile 'com.github.hassanusman:CircularDialogs:1.2'
}
new CDialog(this).createAlert("You missed something",
CDConstants.WARNING, // Type of dialog
CDConstants.LARGE) // size of dialog
.setAnimation(CDConstants.SCALE_FROM_BOTTOM_TO_TOP) // Animation for enter/exit
.setDuration(2000) // in milliseconds
.setTextSize(CDConstants.LARGE_TEXT_SIZE) // CDConstants.LARGE_TEXT_SIZE, CDConstants.NORMAL_TEXT_SIZE
.show();
다음은 물건을 다르게 보이게하는 데 사용할 수있는 다양한 사용자 정의입니다.
애니메이션의 경우
CDConstants.SCALE_FROM_BOTTOM_TO_TOP, CDConstants.SCALE_FROM_RIGHT_TO_LEFT,
// Bottom and top can be exchanged as well as right to left.
// Like scale you can also use SLIDE animation just replace SLIDE with SCALE.
CDConstants.SLIDE_FROM_BOTTOM_TO_TOP
텍스트 크기
setTextSize(CDConstants.NORMAL_TEXT_SIZE | CDConstants.LARGE_TEXT_SIZE);
// NOTE: If you give any other value it won't work always use these two values only.
지속
밀리 초로 지속 시간을 줄 수 있습니다. 지속 시간을 제공하지 않으면 화면에서 사용자를 탭한 후에 닫힙니다.
.setDuration(2000) // in milliseconds
대화 유형
현재 3 가지 유형의 대화 상자 만 지원됩니다. CDCONSTANTS.SUCCES, CDCONSTANTS.WARNING 및 CDCONSTANTS.ERROR. 사용에 대한 상단 예제를 참조하십시오.
원하는 경우 자신의 아이콘을 사용할 수 있습니다. 방법은 다음과 같습니다.
CDialog createAlert(String message,Bitmap icon,int alertType,int size); // using Bitmap
CDialog createAlert(String message,Drawable icon,int alertType,int size); // Using Drawable
// Everything will be same just parameters are changed.
...
Hassanusman