안드로이드 초보입니다.. 아무리 찾아봐도 만족할만한 답변을 못찾고있고..
SharedPreference < 이 개념도 확실치 않아서 여기다 물어봅니다..
안드로이드강좌를 보고있고, 안드로이드 액티비티 라이프사이클을 배우는중입니다
순서에 맞게 코딩을 따라하고있는데 아래와 같은 부분이 나왔습니다
- Check to see if the header is currently visible, and if so put that visibility state into the state Bundle with the putBoolean() method and the key "reply_visible".
저기서 putBoolean 에 키는 "reply_visible"로 주고, 값은 true 로 주라고해서
if (mReplyHeadTextView.getVisibility() == View.VISIBLE) {
outState.putBoolean("reply_visible", true);
}
이렇게 했는데 저 키에 해당하는 "reply_visible"이 어디서 나왔는지를 모르겠습니다
SharedPreference 로 데이터를 저장하려면 Editor 클래스의 putter 함수를 이용하여 넣는다고하는데
저 key 는 임의로 지정하는것인지 아무것이나 써도되는것인지 왜 reply_visible 인지 이해가 가질 않습니다 ㅠㅠ
설명 부탁 드립니다..