フラグメントの左下隅にボタンを表示したいのですが、レイアウトのない抽象クラスにいるため、フラグメントのメイン レイアウトの ID がわかりません。
@EFragment(R.layout.exercise_test)
public class Exercise1 extends Exercice
public abstract class Exercice extends Fragment{
public void showValidateButton()
{
Button validateButton = new Button(this.getActivity().getBaseContext());
validateButton.setText("OK");
// Here I want to add the button to Exercise1
}
}
これを達成する方法はありますか?
ありがとうございました
ティエリー。