Removing an activity from the history stack > Kotlin/Java/Android

본문 바로가기
사이트 내 전체검색

Kotlin/Java/Android

Removing an activity from the history stack

페이지 정보

작성자 sbLAB 댓글 0건 조회 3,878회 작성일 20-07-08 09:15

본문

//로그인화면으로 PUSH
val intent = Intent(requireContext(), LoginActivity::class.java)
intent.flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TASK //기존 메인엑티비티 클리어
startActivity(intent)


Removing an activity from the history stack

Activity  위에 Activity  가 계속 쌓이는 상황(기존 실행중인 상태에서, 어플을 다시 처음부터 실행시켜 전역변수값을 적용하고 싶을때)에서
앞에 만들어진 Activity 를 제거 하는 옵션


https://stackoverflow.com/questions/1898886/removing-an-activity-from-the-history-stack 



<activity
    android:name=".AnyActivity"
    android:noHistory="true" />

댓글목록

등록된 댓글이 없습니다.

회원로그인

접속자집계

오늘
389
어제
417
최대
1,279
전체
221,160

그누보드5
Copyright © sebom.com All rights reserved.