Base Activity
A basic Activity that handles layout inflation automatically.
Extends RootActivity to inherit permission management.
레이아웃 인플레이션을 자동으로 처리하는 기본 Activity입니다.
RootActivity를 확장하여 권한 관리를 상속받습니다.
Features:
Automatic layout inflation in onCreate
Simple constructor-based layout resource injection
기능:onCreate에서 자동 레이아웃 인플레이션
생성자 기반의 간단한 레이아웃 리소스 주입
Usage example:
class MainActivity : BaseActivity(R.layout.activity_main) {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
// Layout is already inflated, start your logic here
// findViewById or view binding can be used
}
}Parameters
The layout resource ID to be inflated.
인플레이션할 레이아웃 리소스 ID.
See also
For DataBinding-enabled Activity.
DataBinding을 사용하는 Activity는 BaseBindingActivity를 참조하세요.
Properties
Functions
Returns and clears denied results that lost their callbacks after process restore.
Call this in onCreate to handle results from requests that were interrupted by process kill.
프로세스 복원 후 콜백을 잃은 거부 결과를 반환하고 비웁니다.
프로세스 킬로 중단된 요청의 결과를 처리하려면 onCreate에서 호출하세요.
Gets a color using ContextCompat for backward compatibility.
역호환성을 위해 ContextCompat을 사용하여 색상을 가져옵니다.
Gets dimension pixel offset for the given dimension resource.
주어진 dimension 리소스의 픽셀 오프셋을 가져옵니다.
Gets dimension pixel size for the given dimension resource.
주어진 dimension 리소스의 픽셀 크기를 가져옵니다.
Gets a drawable using ContextCompat for backward compatibility.
역호환성을 위해 ContextCompat을 사용하여 drawable을 가져옵니다.
Safely gets a drawable, returning null if resource is not found or invalid.
리소스를 찾을 수 없거나 유효하지 않은 경우 null을 반환하여 안전하게 drawable을 가져옵니다.
Gets integer value from resources.
리소스에서 정수 값을 가져옵니다.
Safely gets a string, returning empty string if resource is not found or invalid.
리소스를 찾을 수 없거나 유효하지 않은 경우 빈 문자열을 반환하여 안전하게 문자열을 가져옵니다.
Checks if the context is destroyed or finishing.
컨텍스트가 파괴되었거나 종료 중인지 확인합니다.
Requests runtime permissions and returns denied results via callback.
Delegates to PermissionRequester for actual permission handling.
런타임 권한을 요청하고 콜백을 통해 거부 결과를 반환합니다.
실제 권한 처리는 PermissionRequester에 위임합니다.
Creates a long duration Toast without showing it.
Allows further customization before displaying.
표시하지 않고 긴 시간 Toast를 생성합니다.
표시하기 전에 추가 커스터마이징이 가능합니다.
Creates a short duration Toast without showing it.
Allows further customization before displaying.
표시하지 않고 짧은 시간 Toast를 생성합니다.
표시하기 전에 추가 커스터마이징이 가능합니다.
Creates and shows a long duration Toast message.
긴 시간 Toast 메시지를 생성하고 표시합니다.
Creates and shows a short duration Toast message.
짧은 시간 Toast 메시지를 생성하고 표시합니다.