Hi, I want to show a WebView with some information at the start of my application. After clicking a button, this view should disappear for the SurfaceView of the app. In the following code I try to do this in several ways.
What happens is that the WebView disappears, but the SurfaceView doesnt show. I can click on the touchscreen and get events for it, but I dont see anything on the display. What am I doing wrong? @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Handler mHandler = new Handler(){ @Override public void handleMessage(Message msg) { super.handleMessage(msg); setContentView(R.layout.laska_layout); mLaskaView = (LaskaView) findViewById(R.id.laska); mLaskaView.setVisibility(View.VISIBLE); mInfoView.setVisibility(View.INVISIBLE); mInfoView.destroy(); mLaskaView.bringToFront(); mLaskaView.requestFocus(); mLaskaView.getHolder().getSurface().show(); mLaskaThread.doDraw(); } }; // turn off the window's title bar requestWindowFeature(Window.FEATURE_NO_TITLE); // tell system to use the layout defined in our XML file setContentView(R.layout.laska_layout); // get handles to the LaskaView from XML, and its LaskaThread mLaskaView = (LaskaView) findViewById(R.id.laska); mLaskaThread = mLaskaView.getThread(); // give the LaskaView a handle to the TextView used for messages mLaskaView.setTextView((TextView) findViewById(R.id.text)); ... setContentView(R.layout.info_layout); mInfoView = (InfoView) findViewById(R.id.info); mInfoView.setLaskaHandle(mHandler); } --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---