2018-01-21から1日間の記事一覧
android AlertDialog内にinflateしたLayout内のViewへのアクセス2018 Jan. 21.Viewへのアスセスにはそれが所属するLayoutを指定する。LayoutInflater inflater = (LayoutInflater) getSystemService(LAYOUT_INFLATER_SERVICE);View myLayout = inflater.infl…
android inflate先レイアウトのないinflate2018 Jan. 21.サンプル1LayoutInflater inflater = (LayoutInflater) getSystemService(LAYOUT_INFLATER_SERVICE);View myView = inflater.inflate(R.layout.my_view, null);setContentView(myView);サンプル2pub…
android Contextの取得2018 Jan. 21.HogeActivityのContextの取得 AlertDialog.Builder(Context)でのContextの取得 new AlertDialog.Builder(HogeActivity.this); getApplicationContext()ではエラーとなる。