2
에서 액세스 기본 활동은 내가 안드로이드 - 사용자 정의 레이아웃
public class Footer extends RelativeLayout
어떻게 내가이 사용자 정의 개체에서에서 getSupportFragmentManager을 사용할 수 있습니다 RelativeLayout의
를 확장 내 조각에서 사용자 지정 레이아웃을 가지고? this.getContext()를 사용할 때 FragmentActivity가 아니라 Application을 제공합니다.The method getSupportFragmentManager() is undefined for the type Footer (extends RelativeLayout)
당신의 활동
MyFragmentActivity activity;
Footer(MyFragmentActivity activity)
{
this.context=context;
}
그리고 당신의 활동에서 MyFragmentActivity
이 활동 이름을 전송하자이
처럼 생성자에
감사에게 도움을
좋은 :) 매우 감사 작동 – dracula