画像ボタンをタブメニューとして作成しました。このタブの下にウェブビューを表示したいとします。イメージボタンは機能しますが、宛先は新しいウィンドウで表示されます。私はアンドロイドの初心者です。あなたが知っているなら、私を助けてください。イメージボタンの下にWebビューを表示する方法は?
これは私のMainActivity.javaです。
public void onCreate(Bundle savedInstanceState) {
final Context context = this;
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Intent intent = new Intent(context, WebViewActivity.class);
startActivity(intent);
/*onClick Button Function*/
// addListeneHomeButton();
// addListenerLoginButton();
// button = (Button) findViewById(R.id.imageButtonHomeSelector);
// button.setFocusable(true);
//button.setFocusableInTouchMode(true);
button.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
Intent intent = new Intent(context, WebViewActivity.class);
startActivity(intent);
}
});
あなたはonCreate' 'で' intent'を置く理由。あなたの仕事は何ですか? –