EditText changing WebView page on separate xml files?

Amped216

New Member
I am developing an Android web browser, using the libraries ActionbarSherlock and SlidingMenu, I have an EditText as my URL bar, and because its a sliding menu it requires its own .xml file, how can I force my "Go" button to change webpage on another .xml file?If you need it, here is my code for the sliding menu's .xml~\[code\]import android.os.Bundle;import android.view.View;import android.view.View.OnClickListener;import android.webkit.WebView;import android.widget.Button;import android.widget.EditText;public EditText iText;public WebView iWeb;public class LeftMenu extends Home_View implements OnClickListener{ @Override public void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); setContentView(R.layout.left_slide); iText = (EditText)findViewById(R.id.urlText); Button go = (Button)findViewById(R.id.bGo); go.setOnClickListener(this); } @Override public void onClick(View v){ // TODO Auto-generated method stub switch(v.getId()){ case R.id.bGo: String page = iText.getText().toString(); iWeb.loadUrl(page); break; } }}\[/code\]
 
Back
Top