Reputation: 5
I called an intent from the class but on pressing back key it gives a blank screen. i want it to return to the previous list activity this class had been called from. my class is
package com.chirag.ipuconnect;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
public class GTBIT extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
String namaste="http://www.gtbit.org/";
Intent dex=new Intent(GTBIT.this,MainActivity.class);
dex.putExtra("url", namaste);
startActivity(dex);
}
}
Any help will be appreciated.
Upvotes: 0
Views: 657
Reputation: 9870
You need to set the content in this Activity
setContentView(R.layout.your_layout);
Or what You want to do with this Activity shown above? Is there a reason why You haven´t done this?
Upvotes: 2