getlayoutinflater1 static method 안에서 LayoutInflater 사용하기 alertDialog같은 팝업 UI등을 만들때 method나 class가 static으로 만들어야 하는 경우 LayoutInflater를 사용하여 특정 layout을 가져올려고 할 경우 에러가 발생합니다. 1LayoutInflater inflater = getLayoutInflater();cs static method에서는 사용할 수 없다고 오류를 발생시킵니다. 구글링해보니 context를 추가하면 된다고 되어있는데 안되네요. 결국 찾아낸 방법은 LayoutInflater.from(context)를 사용하면 됩니다. 1LayoutInflater inflater = LayoutInflater.from(mContext);cs mContext는 static 타입의 Context입니다. 12static Cont.. 2016. 8. 12. 이전 1 다음 인기글